Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ public abstract class AbstractJobStructure<AI extends AbstractAISkeleton<J>, J e
*/
private int workOrderId;

/**
* The structure the job should build.
*/
protected Blueprint blueprint;

/**
* Initialize citizen data.
*
Expand Down Expand Up @@ -105,6 +100,7 @@ public void complete()
{
getWorkOrder().onCompleted(getCitizen().getColony(), this.getCitizen());

final Blueprint blueprint = getWorkOrder().getBlueprint();
if (blueprint != null)
{
final CompoundTag[][][] tileEntityData = blueprint.getTileEntities();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.ldtteam.structurize.blocks.interfaces.ILeveledBlueprintAnchorBlock;
import com.ldtteam.structurize.blueprints.v1.Blueprint;
import com.ldtteam.structurize.placement.handlers.placement.PlacementHandlers;
import com.ldtteam.structurize.storage.ISurvivalBlueprintHandler;
import com.ldtteam.structurize.storage.StructurePacks;
import com.ldtteam.structurize.util.PlacementSettings;
Expand Down Expand Up @@ -39,9 +40,7 @@
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.BlockSnapshot;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.event.level.BlockEvent;
import net.minecraftforge.event.level.BlockEvent.EntityPlaceEvent;
import net.minecraftforge.items.wrapper.InvWrapper;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -168,6 +167,7 @@ public void handle(

world.destroyBlock(blockPos, true);
world.setBlockAndUpdate(blockPos, anchor);
PlacementHandlers.handleTileEntityPlacement(blueprint.getTileEntityData(blockPos, blueprint.getPrimaryBlockOffset()), world, blockPos);
((AbstractBlockHut<?>) anchor.getBlock()).onBlockPlacedByBuildTool(world,
blockPos,
anchor,
Expand Down