Search in sources :

Example 16 with IColonyView

use of com.minecolonies.api.colony.IColonyView in project minecolonies by Minecolonies.

the class ClientEventHandler method handleRenderScepterGuard.

/**
 * Renders the guard scepter objects into the world.
 *
 * @param event  The caught event
 * @param world  The world in which to render
 * @param player The player for which to render
 */
private static void handleRenderScepterGuard(@NotNull final RenderWorldLastEvent event, final ClientWorld world, final PlayerEntity player) {
    final PlacementSettings settings = new PlacementSettings(Settings.instance.getMirror(), BlockPosUtil.getRotationFromRotations(Settings.instance.getRotation()));
    final ItemStack stack = player.getMainHandItem();
    if (!stack.hasTag()) {
        return;
    }
    final CompoundNBT compound = stack.getTag();
    final IColonyView colony = IColonyManager.getInstance().getColonyView(compound.getInt(TAG_ID), player.level.dimension());
    if (colony == null) {
        return;
    }
    final BlockPos guardTower = BlockPosUtil.read(compound, TAG_POS);
    final IBuildingView hut = colony.getBuilding(guardTower);
    if (hut == null) {
        return;
    }
    if (partolPointTemplate == null) {
        partolPointTemplate = new LoadOnlyStructureHandler(world, hut.getPosition(), "schematics/infrastructure/patrolpoint", settings, true).getBluePrint();
    }
    if (hut instanceof AbstractBuildingGuards.View) {
        StructureClientHandler.renderStructureAtPosList(partolPointTemplate, event.getPartialTicks(), ((AbstractBuildingGuards.View) hut).getPatrolTargets().stream().map(BlockPos::above).collect(Collectors.toList()), event.getMatrixStack());
    }
}
Also used : CompoundNBT(net.minecraft.nbt.CompoundNBT) IBuildingView(com.minecolonies.api.colony.buildings.views.IBuildingView) BlockPos(net.minecraft.util.math.BlockPos) PlacementSettings(com.ldtteam.structurize.util.PlacementSettings) ItemStack(net.minecraft.item.ItemStack) LoadOnlyStructureHandler(com.minecolonies.api.util.LoadOnlyStructureHandler) IColonyView(com.minecolonies.api.colony.IColonyView) IColonyView(com.minecolonies.api.colony.IColonyView) EmptyView(com.minecolonies.coremod.colony.buildings.views.EmptyView) IBuildingView(com.minecolonies.api.colony.buildings.views.IBuildingView)

Example 17 with IColonyView

use of com.minecolonies.api.colony.IColonyView in project minecolonies by Minecolonies.

the class DebugRendererChunkBorder method draw.

private static Pair<DrawState, ByteBuffer> draw(final BufferBuilder bufferbuilder, final Map<ChunkPos, Integer> mapToDraw, final int playerColonyId, final ChunkPos playerChunkPos, final int playerRenderDist) {
    bufferbuilder.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);
    final MutableChunkPos mutableChunkPos = new MutableChunkPos(0, 0);
    final Map<Integer, Color> colonyColours = new HashMap<>();
    final boolean useColonyColour = IMinecoloniesAPI.getInstance().getConfig().getClient().colonyteamborders.get();
    mapToDraw.forEach((chunkPos, colonyId) -> {
        if (colonyId == 0 || chunkPos.x <= playerChunkPos.x - playerRenderDist || chunkPos.x >= playerChunkPos.x + playerRenderDist || chunkPos.z <= playerChunkPos.z - playerRenderDist || chunkPos.z >= playerChunkPos.z + playerRenderDist) {
            return;
        }
        final boolean isPlayerChunkX = colonyId == playerColonyId && chunkPos.x == playerChunkPos.x;
        final boolean isPlayerChunkZ = colonyId == playerColonyId && chunkPos.z == playerChunkPos.z;
        final double minX = chunkPos.getMinBlockX() + LINE_SHIFT;
        final double maxX = chunkPos.getMaxBlockX() + 1.0d - LINE_SHIFT;
        final double minZ = chunkPos.getMinBlockZ() + LINE_SHIFT;
        final double maxZ = chunkPos.getMaxBlockZ() + 1.0d - LINE_SHIFT;
        final int red;
        final int green;
        final int blue;
        final int alpha = 255;
        final int testedColonyId = colonyId;
        if (useColonyColour) {
            final Color colour = colonyColours.computeIfAbsent(colonyId, id -> {
                final IColonyView colony = IMinecoloniesAPI.getInstance().getColonyManager().getColonyView(id, Minecraft.getInstance().level.dimension());
                final TextFormatting team = colony != null ? colony.getTeamColonyColor() : id == playerColonyId ? TextFormatting.WHITE : TextFormatting.RED;
                return new Color(team.getColor());
            });
            red = colour.getRed();
            green = colour.getGreen();
            blue = colour.getBlue();
        } else if (colonyId == playerColonyId) {
            red = 255;
            green = 255;
            blue = 255;
        } else {
            red = 255;
            green = 70;
            blue = 70;
        }
        mutableChunkPos.setX(chunkPos.x);
        mutableChunkPos.setZ(chunkPos.z - 1);
        final boolean north = mapToDraw.containsKey(mutableChunkPos) && mapToDraw.get(mutableChunkPos) != testedColonyId;
        mutableChunkPos.setZ(chunkPos.z + 1);
        final boolean south = mapToDraw.containsKey(mutableChunkPos) && mapToDraw.get(mutableChunkPos) != testedColonyId;
        mutableChunkPos.setX(chunkPos.x + 1);
        mutableChunkPos.setZ(chunkPos.z);
        final boolean east = mapToDraw.containsKey(mutableChunkPos) && mapToDraw.get(mutableChunkPos) != testedColonyId;
        mutableChunkPos.setX(chunkPos.x - 1);
        final boolean west = mapToDraw.containsKey(mutableChunkPos) && mapToDraw.get(mutableChunkPos) != testedColonyId;
        // vert lines
        if (north || west) {
            bufferbuilder.vertex(minX, 0, minZ).color(red, green, blue, alpha).endVertex();
            bufferbuilder.vertex(minX, CHUNK_HEIGHT, minZ).color(red, green, blue, alpha).endVertex();
        }
        if (north || east) {
            bufferbuilder.vertex(maxX, 0, minZ).color(red, green, blue, alpha).endVertex();
            bufferbuilder.vertex(maxX, CHUNK_HEIGHT, minZ).color(red, green, blue, alpha).endVertex();
        }
        if (south || west) {
            bufferbuilder.vertex(minX, 0, maxZ).color(red, green, blue, alpha).endVertex();
            bufferbuilder.vertex(minX, CHUNK_HEIGHT, maxZ).color(red, green, blue, alpha).endVertex();
        }
        if (south || east) {
            bufferbuilder.vertex(maxX, 0, maxZ).color(red, green, blue, alpha).endVertex();
            bufferbuilder.vertex(maxX, CHUNK_HEIGHT, maxZ).color(red, green, blue, alpha).endVertex();
        }
        // horizontal lines
        if (north) {
            if (isPlayerChunkX) {
                for (int shift = PLAYER_CHUNK_STEP; shift < CHUNK_SIZE; shift += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(minX + shift, 0, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(minX + shift, CHUNK_HEIGHT, minZ).color(red, green, blue, alpha).endVertex();
                }
                for (int y = PLAYER_CHUNK_STEP; y < CHUNK_HEIGHT; y += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(minX, y, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, y, minZ).color(red, green, blue, alpha).endVertex();
                }
            } else {
                for (int y = CHUNK_SIZE; y < CHUNK_HEIGHT; y += CHUNK_SIZE) {
                    bufferbuilder.vertex(minX, y, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, y, minZ).color(red, green, blue, alpha).endVertex();
                }
            }
        }
        if (south) {
            if (isPlayerChunkX) {
                for (int shift = PLAYER_CHUNK_STEP; shift < CHUNK_SIZE; shift += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(minX + shift, 0, maxZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(minX + shift, CHUNK_HEIGHT, maxZ).color(red, green, blue, alpha).endVertex();
                }
                for (int y = PLAYER_CHUNK_STEP; y < CHUNK_HEIGHT; y += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(minX, y, maxZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, y, maxZ).color(red, green, blue, alpha).endVertex();
                }
            } else {
                for (int y = CHUNK_SIZE; y < CHUNK_HEIGHT; y += CHUNK_SIZE) {
                    bufferbuilder.vertex(minX, y, maxZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, y, maxZ).color(red, green, blue, alpha).endVertex();
                }
            }
        }
        if (west) {
            if (isPlayerChunkZ) {
                for (int shift = PLAYER_CHUNK_STEP; shift < CHUNK_SIZE; shift += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(minX, 0, minZ + shift).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(minX, CHUNK_HEIGHT, minZ + shift).color(red, green, blue, alpha).endVertex();
                }
                for (int y = PLAYER_CHUNK_STEP; y < CHUNK_HEIGHT; y += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(minX, y, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(minX, y, maxZ).color(red, green, blue, alpha).endVertex();
                }
            } else {
                for (int y = CHUNK_SIZE; y < CHUNK_HEIGHT; y += CHUNK_SIZE) {
                    bufferbuilder.vertex(minX, y, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(minX, y, maxZ).color(red, green, blue, alpha).endVertex();
                }
            }
        }
        if (east) {
            if (isPlayerChunkZ) {
                for (int shift = PLAYER_CHUNK_STEP; shift < CHUNK_SIZE; shift += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(maxX, 0, minZ + shift).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, CHUNK_HEIGHT, minZ + shift).color(red, green, blue, alpha).endVertex();
                }
                for (int y = PLAYER_CHUNK_STEP; y < CHUNK_HEIGHT; y += PLAYER_CHUNK_STEP) {
                    bufferbuilder.vertex(maxX, y, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, y, maxZ).color(red, green, blue, alpha).endVertex();
                }
            } else {
                for (int y = CHUNK_SIZE; y < CHUNK_HEIGHT; y += CHUNK_SIZE) {
                    bufferbuilder.vertex(maxX, y, minZ).color(red, green, blue, alpha).endVertex();
                    bufferbuilder.vertex(maxX, y, maxZ).color(red, green, blue, alpha).endVertex();
                }
            }
        }
    });
    bufferbuilder.end();
    // create bytebuffer copy since buffer builder uses slice
    final Pair<DrawState, ByteBuffer> preResult = bufferbuilder.popNextBuffer();
    ByteBuffer temp = GLAllocation.createByteBuffer(preResult.getSecond().capacity());
    ((Buffer) preResult.getSecond()).clear();
    ((Buffer) temp).clear();
    temp.put(preResult.getSecond());
    return Pair.of(preResult.getFirst(), temp);
}
Also used : ByteBuffer(java.nio.ByteBuffer) Buffer(java.nio.Buffer) HashMap(java.util.HashMap) DrawState(net.minecraft.client.renderer.BufferBuilder.DrawState) ByteBuffer(java.nio.ByteBuffer) TextFormatting(net.minecraft.util.text.TextFormatting) MutableChunkPos(com.minecolonies.coremod.util.MutableChunkPos) IColonyView(com.minecolonies.api.colony.IColonyView)

Example 18 with IColonyView

use of com.minecolonies.api.colony.IColonyView in project minecolonies by Minecolonies.

the class CitizenDataView method deserialize.

@Override
public void deserialize(@NotNull final PacketBuffer buf) {
    name = buf.readUtf(32767);
    female = buf.readBoolean();
    entityId = buf.readInt();
    paused = buf.readBoolean();
    isChild = buf.readBoolean();
    homeBuilding = buf.readBoolean() ? buf.readBlockPos() : null;
    workBuilding = buf.readBoolean() ? buf.readBlockPos() : null;
    // Attributes
    health = buf.readFloat();
    maxHealth = buf.readFloat();
    saturation = buf.readDouble();
    happiness = buf.readDouble();
    citizenSkillHandler.read(buf.readNbt());
    job = buf.readUtf(32767);
    colonyId = buf.readInt();
    final CompoundNBT compound = buf.readNbt();
    inventory = new InventoryCitizen(this.name, true);
    final ListNBT ListNBT = compound.getList("inventory", 10);
    this.inventory.read(ListNBT);
    this.inventory.setHeldItem(Hand.MAIN_HAND, compound.getInt(TAG_HELD_ITEM_SLOT));
    this.inventory.setHeldItem(Hand.OFF_HAND, compound.getInt(TAG_OFFHAND_HELD_ITEM_SLOT));
    position = buf.readBlockPos();
    citizenChatOptions.clear();
    final int size = buf.readInt();
    for (int i = 0; i < size; i++) {
        final CompoundNBT compoundNBT = buf.readNbt();
        final ServerCitizenInteraction handler = (ServerCitizenInteraction) MinecoloniesAPIProxy.getInstance().getInteractionResponseHandlerDataManager().createFrom(this, compoundNBT);
        citizenChatOptions.put(handler.getInquiry(), handler);
    }
    sortedInteractions = citizenChatOptions.values().stream().sorted(Comparator.comparingInt(e -> e.getPriority().getPriority())).collect(Collectors.toList());
    citizenHappinessHandler.read(buf.readNbt());
    int statusindex = buf.readInt();
    statusIcon = statusindex >= 0 ? VisibleCitizenStatus.getForId(statusindex) : null;
    if (buf.readBoolean()) {
        final IColonyView colonyView = IColonyManager.getInstance().getColonyView(colonyId, Minecraft.getInstance().level.dimension());
        jobView = IJobDataManager.getInstance().createViewFrom(colonyView, this, buf);
    } else {
        jobView = null;
    }
    children.clear();
    siblings.clear();
    partner = buf.readInt();
    final int siblingsSize = buf.readInt();
    for (int i = 0; i < siblingsSize; i++) {
        siblings.add(buf.readInt());
    }
    final int childrenSize = buf.readInt();
    for (int i = 0; i < childrenSize; i++) {
        children.add(buf.readInt());
    }
    final String parentA = buf.readUtf();
    final String parentB = buf.readUtf();
    parents = new Tuple<>(parentA, parentB);
}
Also used : java.util(java.util) Suppression(com.minecolonies.api.util.constant.Suppression) CompoundNBT(net.minecraft.nbt.CompoundNBT) ITextComponent(net.minecraft.util.text.ITextComponent) MinecoloniesAPIProxy(com.minecolonies.api.MinecoloniesAPIProxy) ICitizenSkillHandler(com.minecolonies.api.entity.citizen.citizenhandlers.ICitizenSkillHandler) Tuple(com.minecolonies.api.util.Tuple) TAG_OFFHAND_HELD_ITEM_SLOT(com.minecolonies.api.util.constant.NbtTagConstants.TAG_OFFHAND_HELD_ITEM_SLOT) Minecraft(net.minecraft.client.Minecraft) IJobDataManager(com.minecolonies.api.colony.jobs.registry.IJobDataManager) IInteractionResponseHandler(com.minecolonies.api.colony.interactionhandling.IInteractionResponseHandler) Hand(net.minecraft.util.Hand) CitizenSkillHandler(com.minecolonies.coremod.entity.citizen.citizenhandlers.CitizenSkillHandler) Constants(com.minecolonies.api.util.constant.Constants) ListNBT(net.minecraft.nbt.ListNBT) IColonyView(com.minecolonies.api.colony.IColonyView) ICitizenHappinessHandler(com.minecolonies.api.entity.citizen.citizenhandlers.ICitizenHappinessHandler) IColonyManager(com.minecolonies.api.colony.IColonyManager) VisibleCitizenStatus(com.minecolonies.api.entity.citizen.VisibleCitizenStatus) ICitizenDataView(com.minecolonies.api.colony.ICitizenDataView) ChatPriority(com.minecolonies.api.colony.interactionhandling.ChatPriority) BlockPos(net.minecraft.util.math.BlockPos) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) InventoryCitizen(com.minecolonies.api.inventory.InventoryCitizen) IJobView(com.minecolonies.api.colony.jobs.IJobView) ResourceLocation(net.minecraft.util.ResourceLocation) ServerCitizenInteraction(com.minecolonies.coremod.colony.interactionhandling.ServerCitizenInteraction) NotNull(org.jetbrains.annotations.NotNull) CitizenHappinessHandler(com.minecolonies.coremod.entity.citizen.citizenhandlers.CitizenHappinessHandler) PacketBuffer(net.minecraft.network.PacketBuffer) ListNBT(net.minecraft.nbt.ListNBT) CompoundNBT(net.minecraft.nbt.CompoundNBT) ServerCitizenInteraction(com.minecolonies.coremod.colony.interactionhandling.ServerCitizenInteraction) InventoryCitizen(com.minecolonies.api.inventory.InventoryCitizen) IColonyView(com.minecolonies.api.colony.IColonyView)

Example 19 with IColonyView

use of com.minecolonies.api.colony.IColonyView in project minecolonies by Minecolonies.

the class WindowBuildDecoration method updateBuilders.

/**
 * Update the builders list but try to keep the same one.
 */
private void updateBuilders() {
    IColonyView colony = (IColonyView) IColonyManager.getInstance().getIColony(Minecraft.getInstance().level, structurePos);
    if (colony == null) {
        if (structureName.getStyle().equals("supplycamp") || structureName.getStyle().equals("supplyship")) {
            LanguageHandler.sendPlayerMessage(Minecraft.getInstance().player, TranslationConstants.NO_COLONY_YET);
        } else {
            LanguageHandler.sendPlayerMessage(Minecraft.getInstance().player, TranslationConstants.OUT_OF_COLONY, structureName.getSchematic(), structurePos.getX(), structurePos.getZ());
        }
        close();
        return;
    }
    builders.clear();
    builders.add(new Tuple<>(new TranslationTextComponent(ModJobs.builder.getTranslationKey()).getString() + ":", BlockPos.ZERO));
    builders.addAll(colony.getBuildings().stream().filter(build -> build instanceof AbstractBuildingBuilderView && !((AbstractBuildingBuilderView) build).getWorkerName().isEmpty() && build.getBuildingType() != ModBuildings.miner).map(build -> new Tuple<>(((AbstractBuildingBuilderView) build).getWorkerName(), build.getPosition())).sorted(Comparator.comparing(item -> item.getB().distSqr(structurePos))).collect(Collectors.toList()));
    initBuilderNavigation();
}
Also used : StructurePlacer(com.ldtteam.structurize.placement.StructurePlacer) java.util(java.util) LanguageHandler(com.ldtteam.structurize.util.LanguageHandler) DropDownList(com.ldtteam.blockout.views.DropDownList) ItemStackUtils(com.minecolonies.api.util.ItemStackUtils) Structures(com.ldtteam.structurize.management.Structures) ScrollingList(com.ldtteam.blockout.views.ScrollingList) LoadOnlyStructureHandler(com.minecolonies.api.util.LoadOnlyStructureHandler) BuildToolPlaceMessage(com.minecolonies.coremod.network.messages.server.BuildToolPlaceMessage) ItemIcon(com.ldtteam.blockout.controls.ItemIcon) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) ItemStack(net.minecraft.item.ItemStack) ServerLifecycleHooks(net.minecraftforge.fml.server.ServerLifecycleHooks) Minecraft(net.minecraft.client.Minecraft) ModJobs(com.minecolonies.api.colony.jobs.ModJobs) SchematicRequestMessage(com.ldtteam.structurize.network.messages.SchematicRequestMessage) Network(com.minecolonies.coremod.Network) Log(com.minecolonies.api.util.Log) StructurePhasePlacementResult(com.ldtteam.structurize.placement.StructurePhasePlacementResult) Constants(com.minecolonies.api.util.constant.Constants) TranslationConstants(com.minecolonies.api.util.constant.TranslationConstants) Color(com.ldtteam.blockout.Color) IColonyView(com.minecolonies.api.colony.IColonyView) StructureName(com.ldtteam.structurize.management.StructureName) AbstractBuildingBuilderView(com.minecolonies.coremod.colony.buildings.views.AbstractBuildingBuilderView) World(net.minecraft.world.World) IColonyManager(com.minecolonies.api.colony.IColonyManager) Tuple(net.minecraft.util.Tuple) BlockPos(net.minecraft.util.math.BlockPos) NULL_POS(com.ldtteam.structurize.placement.AbstractBlueprintIterator.NULL_POS) Pane(com.ldtteam.blockout.Pane) PlacementSettings(com.ldtteam.structurize.util.PlacementSettings) Collectors(java.util.stream.Collectors) Text(com.ldtteam.blockout.controls.Text) ModBuildings(com.minecolonies.api.colony.buildings.ModBuildings) Nullable(org.jetbrains.annotations.Nullable) Button(com.ldtteam.blockout.controls.Button) WindowConstants(com.minecolonies.api.util.constant.WindowConstants) BlockPlacementResult(com.ldtteam.structurize.placement.BlockPlacementResult) ItemStorage(com.minecolonies.api.crafting.ItemStorage) NotNull(org.jetbrains.annotations.NotNull) AbstractBuildingBuilderView(com.minecolonies.coremod.colony.buildings.views.AbstractBuildingBuilderView) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) IColonyView(com.minecolonies.api.colony.IColonyView) Tuple(net.minecraft.util.Tuple)

Example 20 with IColonyView

use of com.minecolonies.api.colony.IColonyView in project minecolonies by ldtteam.

the class WindowBuildDecoration method updateBuilders.

/**
 * Update the builders list but try to keep the same one.
 */
private void updateBuilders() {
    IColonyView colony = (IColonyView) IColonyManager.getInstance().getIColony(Minecraft.getInstance().level, structurePos);
    if (colony == null) {
        if (structureName.getStyle().equals("supplycamp") || structureName.getStyle().equals("supplyship")) {
            LanguageHandler.sendPlayerMessage(Minecraft.getInstance().player, TranslationConstants.NO_COLONY_YET);
        } else {
            LanguageHandler.sendPlayerMessage(Minecraft.getInstance().player, TranslationConstants.OUT_OF_COLONY, structureName.getSchematic(), structurePos.getX(), structurePos.getZ());
        }
        close();
        return;
    }
    builders.clear();
    builders.add(new Tuple<>(new TranslationTextComponent(ModJobs.builder.getTranslationKey()).getString() + ":", BlockPos.ZERO));
    builders.addAll(colony.getBuildings().stream().filter(build -> build instanceof AbstractBuildingBuilderView && !((AbstractBuildingBuilderView) build).getWorkerName().isEmpty() && build.getBuildingType() != ModBuildings.miner).map(build -> new Tuple<>(((AbstractBuildingBuilderView) build).getWorkerName(), build.getPosition())).sorted(Comparator.comparing(item -> item.getB().distSqr(structurePos))).collect(Collectors.toList()));
    initBuilderNavigation();
}
Also used : StructurePlacer(com.ldtteam.structurize.placement.StructurePlacer) java.util(java.util) LanguageHandler(com.ldtteam.structurize.util.LanguageHandler) DropDownList(com.ldtteam.blockout.views.DropDownList) ItemStackUtils(com.minecolonies.api.util.ItemStackUtils) Structures(com.ldtteam.structurize.management.Structures) ScrollingList(com.ldtteam.blockout.views.ScrollingList) LoadOnlyStructureHandler(com.minecolonies.api.util.LoadOnlyStructureHandler) BuildToolPlaceMessage(com.minecolonies.coremod.network.messages.server.BuildToolPlaceMessage) ItemIcon(com.ldtteam.blockout.controls.ItemIcon) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) ItemStack(net.minecraft.item.ItemStack) ServerLifecycleHooks(net.minecraftforge.fml.server.ServerLifecycleHooks) Minecraft(net.minecraft.client.Minecraft) ModJobs(com.minecolonies.api.colony.jobs.ModJobs) SchematicRequestMessage(com.ldtteam.structurize.network.messages.SchematicRequestMessage) Network(com.minecolonies.coremod.Network) Log(com.minecolonies.api.util.Log) StructurePhasePlacementResult(com.ldtteam.structurize.placement.StructurePhasePlacementResult) Constants(com.minecolonies.api.util.constant.Constants) TranslationConstants(com.minecolonies.api.util.constant.TranslationConstants) Color(com.ldtteam.blockout.Color) IColonyView(com.minecolonies.api.colony.IColonyView) StructureName(com.ldtteam.structurize.management.StructureName) AbstractBuildingBuilderView(com.minecolonies.coremod.colony.buildings.views.AbstractBuildingBuilderView) World(net.minecraft.world.World) IColonyManager(com.minecolonies.api.colony.IColonyManager) Tuple(net.minecraft.util.Tuple) BlockPos(net.minecraft.util.math.BlockPos) NULL_POS(com.ldtteam.structurize.placement.AbstractBlueprintIterator.NULL_POS) Pane(com.ldtteam.blockout.Pane) PlacementSettings(com.ldtteam.structurize.util.PlacementSettings) Collectors(java.util.stream.Collectors) Text(com.ldtteam.blockout.controls.Text) ModBuildings(com.minecolonies.api.colony.buildings.ModBuildings) Nullable(org.jetbrains.annotations.Nullable) Button(com.ldtteam.blockout.controls.Button) WindowConstants(com.minecolonies.api.util.constant.WindowConstants) BlockPlacementResult(com.ldtteam.structurize.placement.BlockPlacementResult) ItemStorage(com.minecolonies.api.crafting.ItemStorage) NotNull(org.jetbrains.annotations.NotNull) AbstractBuildingBuilderView(com.minecolonies.coremod.colony.buildings.views.AbstractBuildingBuilderView) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) IColonyView(com.minecolonies.api.colony.IColonyView) Tuple(net.minecraft.util.Tuple)

Aggregations

IColonyView (com.minecolonies.api.colony.IColonyView)26 BlockPos (net.minecraft.util.math.BlockPos)14 IColonyManager (com.minecolonies.api.colony.IColonyManager)8 ItemStack (net.minecraft.item.ItemStack)8 CompoundNBT (net.minecraft.nbt.CompoundNBT)8 World (net.minecraft.world.World)8 NotNull (org.jetbrains.annotations.NotNull)8 PlacementSettings (com.ldtteam.structurize.util.PlacementSettings)6 IBuildingView (com.minecolonies.api.colony.buildings.views.IBuildingView)6 java.util (java.util)6 Minecraft (net.minecraft.client.Minecraft)6 Nullable (org.jetbrains.annotations.Nullable)6 LoadOnlyStructureHandler (com.minecolonies.api.util.LoadOnlyStructureHandler)5 Pane (com.ldtteam.blockout.Pane)4 StructureName (com.ldtteam.structurize.management.StructureName)4 SchematicRequestMessage (com.ldtteam.structurize.network.messages.SchematicRequestMessage)4 LanguageHandler (com.ldtteam.structurize.util.LanguageHandler)4 MinecoloniesAPIProxy (com.minecolonies.api.MinecoloniesAPIProxy)4 Constants (com.minecolonies.api.util.constant.Constants)3 MutableChunkPos (com.minecolonies.coremod.util.MutableChunkPos)3