Search in sources :

Example 1 with ItemFrameEntity

use of net.minecraft.entity.item.ItemFrameEntity in project Structurize by ldtteam.

the class ItemStackUtils method getListOfStackForEntity.

/**
 * Get the list of required resources for entities.
 *
 * @param entity the entity object.
 * @param pos the placer pos..
 * @return a list of stacks.
 */
public static List<ItemStack> getListOfStackForEntity(final Entity entity, final BlockPos pos) {
    if (entity != null) {
        final List<ItemStack> request = new ArrayList<>();
        if (entity instanceof ItemFrameEntity) {
            final ItemStack stack = ((ItemFrameEntity) entity).getItem();
            if (!ItemStackUtils.isEmpty(stack)) {
                stack.setCount(1);
                request.add(stack);
            }
            request.add(new ItemStack(Items.ITEM_FRAME, 1));
        } else if (entity instanceof ArmorStandEntity) {
            request.add(entity.getPickedResult(new RayTraceResult(Vector3d.atLowerCornerOf(pos)) {

                @NotNull
                @Override
                public Type getType() {
                    return Type.ENTITY;
                }
            }));
            entity.getArmorSlots().forEach(request::add);
            entity.getHandSlots().forEach(request::add);
        }
        return request.stream().filter(stack -> !stack.isEmpty()).collect(Collectors.toList());
    }
    return Collections.emptyList();
}
Also used : ContainerBlock(net.minecraft.block.ContainerBlock) Entity(net.minecraft.entity.Entity) IItemHandler(net.minecraftforge.items.IItemHandler) java.util(java.util) ICapabilityProvider(net.minecraftforge.common.capabilities.ICapabilityProvider) CompoundNBT(net.minecraft.nbt.CompoundNBT) net.minecraft.item(net.minecraft.item) BlockPos(net.minecraft.util.math.BlockPos) Type(net.minecraft.util.math.RayTraceResult.Type) Direction(net.minecraft.util.Direction) ArmorStandEntity(net.minecraft.entity.item.ArmorStandEntity) Collectors(java.util.stream.Collectors) net.minecraft.tileentity(net.minecraft.tileentity) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) RayTraceResult(net.minecraft.util.math.RayTraceResult) Nullable(org.jetbrains.annotations.Nullable) Vector3d(net.minecraft.util.math.vector.Vector3d) ItemStackHelper(net.minecraft.inventory.ItemStackHelper) ITEM_HANDLER_CAPABILITY(net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) NonNullList(net.minecraft.util.NonNullList) BlockState(net.minecraft.block.BlockState) NotNull(org.jetbrains.annotations.NotNull) Type(net.minecraft.util.math.RayTraceResult.Type) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) RayTraceResult(net.minecraft.util.math.RayTraceResult) ArmorStandEntity(net.minecraft.entity.item.ArmorStandEntity) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with ItemFrameEntity

use of net.minecraft.entity.item.ItemFrameEntity in project ChocolateQuestRepoured by TeamChocoQuest.

the class PreparableMapInfo method prepare.

@Override
protected GeneratablePosInfo prepare(World world, DungeonPlacement placement, BlockPos pos) {
    Direction transformedFacing = placement.getRotation().rotate(placement.getMirror().mirror(this.facing));
    ItemFrameEntity entity = new ItemFrameEntity(world, pos.toImmutable(), transformedFacing);
    switch(this.orientation) {
        case EAST:
            entity.setItemRotation(entity.getRotation() + 3);
            break;
        case SOUTH:
            entity.setItemRotation(entity.getRotation() + 2);
            break;
        case WEST:
            entity.setItemRotation(entity.getRotation() + 1);
            break;
        default:
            break;
    }
    int x1 = this.offsetX * (128 << this.scale);
    int z1 = this.offsetZ * (128 << this.scale);
    int x2 = this.originX;
    int z2 = this.originZ;
    switch(placement.getMirror()) {
        case LEFT_RIGHT:
            if (!this.lockOrientation) {
                if (this.orientation.getAxis() == Axis.Z) {
                    entity.setItemRotation(entity.getRotation() + 2);
                }
                z1 = -z1;
            } else {
                if (this.orientation.getAxis() == Axis.X) {
                    z1 = -z1;
                }
                if (this.orientation.getAxis() == Axis.Z) {
                    x1 = -x1;
                }
            }
            z2 = -z2;
            break;
        case FRONT_BACK:
            if (!this.lockOrientation) {
                if (this.orientation.getAxis() == Axis.X) {
                    entity.setItemRotation(entity.getRotation() + 2);
                }
                x1 = -x1;
            } else {
                if (this.orientation.getAxis() == Axis.X) {
                    z1 = -z1;
                }
                if (this.orientation.getAxis() == Axis.Z) {
                    x1 = -x1;
                }
            }
            x2 = -x2;
            break;
        default:
            break;
    }
    int x3 = x1;
    int z3 = z1;
    int x4 = x2;
    int z4 = z2;
    switch(placement.getRotation()) {
        case COUNTERCLOCKWISE_90:
            if (!this.lockOrientation) {
                entity.setItemRotation(entity.getRotation() + 1);
                x1 = z3;
                z1 = -x3;
            }
            x2 = z4;
            z2 = -x4;
            break;
        case CLOCKWISE_90:
            if (!this.lockOrientation) {
                entity.setItemRotation(entity.getRotation() + 3);
                x1 = -z3;
                z1 = x3;
            }
            x2 = -z4;
            z2 = x4;
            break;
        case CLOCKWISE_180:
            if (!this.lockOrientation) {
                entity.setItemRotation(entity.getRotation() + 2);
                x1 = -x3;
                z1 = -z3;
            }
            x2 = -x4;
            z2 = -z4;
            break;
        default:
            break;
    }
    return new GeneratableMapInfo(pos, entity, pos.getX() + x2, pos.getZ() + z2, pos.getX() + x1 + x2, pos.getZ() + z1 + z2, this.scale, this.fillMap, this.fillRadius);
}
Also used : ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) Direction(net.minecraft.util.Direction) GeneratableMapInfo(team.cqr.cqrepoured.world.structure.generation.generation.generatable.GeneratableMapInfo)

Example 3 with ItemFrameEntity

use of net.minecraft.entity.item.ItemFrameEntity in project minecolonies by Minecolonies.

the class ItemStackUtils method getListOfStackForEntity.

/**
 * Adds entities to the builder building if he needs it.
 *
 * @param entity the entity object.
 * @param placer the entity placer.
 * @return a list of stacks.
 */
public static List<ItemStorage> getListOfStackForEntity(final Entity entity, final Entity placer) {
    if (entity != null) {
        final List<ItemStorage> request = new ArrayList<>();
        if (entity instanceof ItemFrameEntity) {
            final ItemStack stack = ((ItemFrameEntity) entity).getItem();
            if (!ItemStackUtils.isEmpty(stack)) {
                ItemStackUtils.setSize(stack, 1);
                request.add(new ItemStorage(stack));
            }
            request.add(new ItemStorage(new ItemStack(Items.ITEM_FRAME, 1)));
        } else if (entity instanceof ArmorStandEntity) {
            request.add(new ItemStorage(entity.getPickedResult(new EntityRayTraceResult(placer))));
            entity.getArmorSlots().forEach(item -> request.add(new ItemStorage(item)));
            entity.getHandSlots().forEach(item -> request.add(new ItemStorage(item)));
        }
        return request.stream().filter(stack -> !stack.getItemStack().isEmpty()).collect(Collectors.toList());
    }
    return Collections.emptyList();
}
Also used : EntityType(net.minecraft.entity.EntityType) java.util(java.util) SMELTABLE_SLOT(com.minecolonies.api.util.constant.Constants.SMELTABLE_SLOT) ModTags.fungi(com.minecolonies.api.items.ModTags.fungi) Compatibility(com.minecolonies.api.compatibility.Compatibility) CompoundNBT(net.minecraft.nbt.CompoundNBT) ArmorStandEntity(net.minecraft.entity.item.ArmorStandEntity) JsonToNBT(net.minecraft.nbt.JsonToNBT) MinecoloniesAPIProxy(com.minecolonies.api.MinecoloniesAPIProxy) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) Lists(com.google.common.collect.Lists) Block(net.minecraft.block.Block) EntityRayTraceResult(net.minecraft.util.math.EntityRayTraceResult) ModItems(com.minecolonies.api.items.ModItems) FUEL_SLOT(com.minecolonies.api.util.constant.Constants.FUEL_SLOT) ListNBT(net.minecraft.nbt.ListNBT) Entity(net.minecraft.entity.Entity) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ItemTags(net.minecraft.tags.ItemTags) World(net.minecraft.world.World) Predicate(java.util.function.Predicate) IColonyManager(com.minecolonies.api.colony.IColonyManager) net.minecraft.item(net.minecraft.item) FurnaceTileEntity(net.minecraft.tileentity.FurnaceTileEntity) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) EquipmentSlotType(net.minecraft.inventory.EquipmentSlotType) ResourceLocation(net.minecraft.util.ResourceLocation) ToolType(com.minecolonies.api.util.constant.ToolType) ItemStorage(com.minecolonies.api.crafting.ItemStorage) IToolType(com.minecolonies.api.util.constant.IToolType) NotNull(org.jetbrains.annotations.NotNull) CommandSyntaxException(com.mojang.brigadier.exceptions.CommandSyntaxException) ForgeRegistries(net.minecraftforge.registries.ForgeRegistries) EntityRayTraceResult(net.minecraft.util.math.EntityRayTraceResult) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) ArmorStandEntity(net.minecraft.entity.item.ArmorStandEntity) ItemStorage(com.minecolonies.api.crafting.ItemStorage)

Example 4 with ItemFrameEntity

use of net.minecraft.entity.item.ItemFrameEntity in project Arclight by IzzelAliz.

the class TrackedEntityMixin method tick.

/**
 * @author IzzelAliz
 * @reason
 */
@Overwrite
public void tick() {
    List<Entity> list = this.trackedEntity.getPassengers();
    if (!list.equals(this.passengers)) {
        this.passengers = list;
        this.sendPacket(new SSetPassengersPacket(this.trackedEntity));
    }
    if (this.trackedEntity instanceof ItemFrameEntity) {
        ItemFrameEntity entityitemframe = (ItemFrameEntity) this.trackedEntity;
        ItemStack itemstack = entityitemframe.getDisplayedItem();
        if (this.updateCounter % 10 == 0 && itemstack.getItem() instanceof FilledMapItem) {
            MapData worldmap = FilledMapItem.getMapData(itemstack, this.world);
            for (ServerPlayerEntity entityplayer : this.trackedPlayers) {
                worldmap.updateVisiblePlayers(entityplayer, itemstack);
                IPacket<?> packet = ((FilledMapItem) itemstack.getItem()).getUpdatePacket(itemstack, this.world, entityplayer);
                if (packet != null) {
                    entityplayer.connection.sendPacket(packet);
                }
            }
        }
        this.sendMetadata();
    }
    if (this.updateCounter % this.updateFrequency == 0 || this.trackedEntity.isAirBorne || this.trackedEntity.getDataManager().isDirty()) {
        if (this.trackedEntity.isPassenger()) {
            int i = MathHelper.floor(this.trackedEntity.rotationYaw * 256.0f / 360.0f);
            int j = MathHelper.floor(this.trackedEntity.rotationPitch * 256.0f / 360.0f);
            boolean flag = Math.abs(i - this.encodedRotationYaw) >= 1 || Math.abs(j - this.encodedRotationPitch) >= 1;
            if (flag) {
                this.packetConsumer.accept(new SEntityPacket.LookPacket(this.trackedEntity.getEntityId(), (byte) i, (byte) j, this.trackedEntity.onGround));
                this.encodedRotationYaw = i;
                this.encodedRotationPitch = j;
            }
            this.updateEncodedPosition();
            this.sendMetadata();
            this.riding = true;
        } else {
            ++this.ticksSinceAbsoluteTeleport;
            int i = MathHelper.floor(this.trackedEntity.rotationYaw * 256.0f / 360.0f);
            int j = MathHelper.floor(this.trackedEntity.rotationPitch * 256.0f / 360.0f);
            Vec3d vec3d = this.trackedEntity.getPositionVec().subtract(SEntityPacket.func_218744_a(this.encodedPosX, this.encodedPosY, this.encodedPosZ));
            boolean flag2 = vec3d.lengthSquared() >= 7.62939453125E-6;
            IPacket<?> packet2 = null;
            boolean flag3 = flag2 || this.updateCounter % 60 == 0;
            boolean flag4 = Math.abs(i - this.encodedRotationYaw) >= 1 || Math.abs(j - this.encodedRotationPitch) >= 1;
            if (flag3) {
                this.updateEncodedPosition();
            }
            if (flag4) {
                this.encodedRotationYaw = i;
                this.encodedRotationPitch = j;
            }
            if (this.updateCounter > 0 || this.trackedEntity instanceof AbstractArrowEntity) {
                long k = SEntityPacket.func_218743_a(vec3d.x);
                long l = SEntityPacket.func_218743_a(vec3d.y);
                long i2 = SEntityPacket.func_218743_a(vec3d.z);
                boolean flag5 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i2 < -32768L || i2 > 32767L;
                if (!flag5 && this.ticksSinceAbsoluteTeleport <= 400 && !this.riding && this.onGround == this.trackedEntity.onGround) {
                    if ((!flag3 || !flag4) && !(this.trackedEntity instanceof AbstractArrowEntity)) {
                        if (flag3) {
                            packet2 = new SEntityPacket.RelativeMovePacket(this.trackedEntity.getEntityId(), (short) k, (short) l, (short) i2, this.trackedEntity.onGround);
                        } else if (flag4) {
                            packet2 = new SEntityPacket.LookPacket(this.trackedEntity.getEntityId(), (byte) i, (byte) j, this.trackedEntity.onGround);
                        }
                    } else {
                        packet2 = new SEntityPacket.MovePacket(this.trackedEntity.getEntityId(), (short) k, (short) l, (short) i2, (byte) i, (byte) j, this.trackedEntity.onGround);
                    }
                } else {
                    this.onGround = this.trackedEntity.onGround;
                    this.ticksSinceAbsoluteTeleport = 0;
                    packet2 = new SEntityTeleportPacket(this.trackedEntity);
                }
            }
            if ((this.sendVelocityUpdates || this.trackedEntity.isAirBorne || (this.trackedEntity instanceof LivingEntity && ((LivingEntity) this.trackedEntity).isElytraFlying())) && this.updateCounter > 0) {
                Vec3d vec3d2 = this.trackedEntity.getMotion();
                double d0 = vec3d2.squareDistanceTo(this.velocity);
                if (d0 > 1.0E-7 || (d0 > 0.0 && vec3d2.lengthSquared() == 0.0)) {
                    this.velocity = vec3d2;
                    this.packetConsumer.accept(new SEntityVelocityPacket(this.trackedEntity.getEntityId(), this.velocity));
                }
            }
            if (packet2 != null) {
                this.packetConsumer.accept(packet2);
            }
            this.sendMetadata();
            this.riding = false;
        }
        int i = MathHelper.floor(this.trackedEntity.getRotationYawHead() * 256.0f / 360.0f);
        if (Math.abs(i - this.encodedRotationYawHead) >= 1) {
            this.packetConsumer.accept(new SEntityHeadLookPacket(this.trackedEntity, (byte) i));
            this.encodedRotationYawHead = i;
        }
        this.trackedEntity.isAirBorne = false;
    }
    ++this.updateCounter;
    if (this.trackedEntity.velocityChanged) {
        boolean cancelled = false;
        if (this.trackedEntity instanceof ServerPlayerEntity) {
            Player player = ((ServerPlayerEntityBridge) this.trackedEntity).bridge$getBukkitEntity();
            Vector velocity = player.getVelocity();
            PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
            Bukkit.getPluginManager().callEvent(event);
            if (event.isCancelled()) {
                cancelled = true;
            } else if (!velocity.equals(event.getVelocity())) {
                player.setVelocity(event.getVelocity());
            }
        }
        if (!cancelled) {
            this.sendPacket(new SEntityVelocityPacket(this.trackedEntity));
        }
        this.trackedEntity.velocityChanged = false;
    }
}
Also used : AbstractArrowEntity(net.minecraft.entity.projectile.AbstractArrowEntity) LivingEntity(net.minecraft.entity.LivingEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) MobEntity(net.minecraft.entity.MobEntity) Entity(net.minecraft.entity.Entity) TrackedEntity(net.minecraft.world.TrackedEntity) PlayerVelocityEvent(org.bukkit.event.player.PlayerVelocityEvent) SEntityHeadLookPacket(net.minecraft.network.play.server.SEntityHeadLookPacket) ServerPlayerEntityBridge(io.izzel.arclight.common.bridge.entity.player.ServerPlayerEntityBridge) LivingEntity(net.minecraft.entity.LivingEntity) SEntityVelocityPacket(net.minecraft.network.play.server.SEntityVelocityPacket) MapData(net.minecraft.world.storage.MapData) FilledMapItem(net.minecraft.item.FilledMapItem) SEntityTeleportPacket(net.minecraft.network.play.server.SEntityTeleportPacket) Vector(org.bukkit.util.Vector) Player(org.bukkit.entity.Player) SEntityPacket(net.minecraft.network.play.server.SEntityPacket) SEntityHeadLookPacket(net.minecraft.network.play.server.SEntityHeadLookPacket) SSetPassengersPacket(net.minecraft.network.play.server.SSetPassengersPacket) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity) Vec3d(net.minecraft.util.math.Vec3d) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) ItemStack(net.minecraft.item.ItemStack) AbstractArrowEntity(net.minecraft.entity.projectile.AbstractArrowEntity) Overwrite(org.spongepowered.asm.mixin.Overwrite)

Example 5 with ItemFrameEntity

use of net.minecraft.entity.item.ItemFrameEntity in project Structurize by ldtteam.

the class BlueprintRenderer method draw.

/**
 * Draws structure into world.
 */
public void draw(final BlockPos pos, final MatrixStack matrixStack, final float partialTicks) {
    Minecraft.getInstance().getProfiler().push("struct_render_init");
    if (Settings.instance.shouldRefresh()) {
        init();
    }
    Minecraft.getInstance().getProfiler().popPush("struct_render_blocks");
    final Minecraft mc = Minecraft.getInstance();
    final Vector3d viewPosition = mc.gameRenderer.getMainCamera().getPosition();
    final BlockPos primaryBlockOffset = blockAccess.getBlueprint().getPrimaryBlockOffset();
    final int x = pos.getX() - primaryBlockOffset.getX();
    final int y = pos.getY() - primaryBlockOffset.getY();
    final int z = pos.getZ() - primaryBlockOffset.getZ();
    // missing clipping helper? frustum?
    // missing chunk system and render distance!
    matrixStack.pushPose();
    matrixStack.translate(x - viewPosition.x(), y - viewPosition.y(), z - viewPosition.z());
    final Matrix4f rawPosMatrix = matrixStack.last().pose();
    // Render blocks
    Minecraft.getInstance().getProfiler().popPush("struct_render_blocks_finish");
    renderBlockLayer(RenderType.solid(), rawPosMatrix);
    // FORGE: fix flickering leaves when mods mess up the blurMipmap settings
    mc.getModelManager().getAtlas(AtlasTexture.LOCATION_BLOCKS).setBlurMipmap(false, mc.options.mipmapLevels > 0);
    renderBlockLayer(RenderType.cutoutMipped(), rawPosMatrix);
    mc.getModelManager().getAtlas(AtlasTexture.LOCATION_BLOCKS).restoreLastBlurMipmap();
    renderBlockLayer(RenderType.cutout(), rawPosMatrix);
    OptifineCompat.getInstance().endTerrainBeginEntities();
    Minecraft.getInstance().getProfiler().popPush("struct_render_entities");
    final IRenderTypeBuffer.Impl renderBufferSource = ClientEventSubscriber.renderBuffers.bufferSource();
    // Entities
    // if clipping etc., see WorldRenderer for what's missing
    entities.forEach(entity -> {
        if (entity instanceof ItemFrameEntity && ((ItemFrameEntity) entity).getItem().getItem() instanceof CompassItem) {
            final ItemFrameEntity copy = EntityType.ITEM_FRAME.create(blockAccess);
            copy.restoreFrom(entity);
            copy.setItem(ItemStack.EMPTY);
            entity = copy;
        }
        OptifineCompat.getInstance().preRenderEntity(entity);
        Minecraft.getInstance().getEntityRenderDispatcher().render(entity, entity.getX(), entity.getY(), entity.getZ(), MathHelper.lerp(partialTicks, entity.yRotO, entity.yRot), 0, matrixStack, renderBufferSource, 200);
    });
    Minecraft.getInstance().getProfiler().popPush("struct_render_entities_finish");
    renderBufferSource.endBatch(RenderType.entitySolid(AtlasTexture.LOCATION_BLOCKS));
    renderBufferSource.endBatch(RenderType.entityCutout(AtlasTexture.LOCATION_BLOCKS));
    renderBufferSource.endBatch(RenderType.entityCutoutNoCull(AtlasTexture.LOCATION_BLOCKS));
    renderBufferSource.endBatch(RenderType.entitySmoothCutout(AtlasTexture.LOCATION_BLOCKS));
    OptifineCompat.getInstance().endEntitiesBeginBlockEntities();
    // Block entities
    Minecraft.getInstance().getProfiler().popPush("struct_render_blockentities");
    final ActiveRenderInfo oldActiveRenderInfo = TileEntityRendererDispatcher.instance.camera;
    final World oldWorld = TileEntityRendererDispatcher.instance.level;
    TileEntityRendererDispatcher.instance.camera = new ActiveRenderInfo();
    TileEntityRendererDispatcher.instance.camera.setPosition(viewPosition.subtract(x, y, z));
    TileEntityRendererDispatcher.instance.level = blockAccess;
    tileEntities.forEach(tileEntity -> {
        final BlockPos tePos = tileEntity.getBlockPos();
        matrixStack.pushPose();
        matrixStack.translate(tePos.getX(), tePos.getY(), tePos.getZ());
        OptifineCompat.getInstance().preRenderBlockEntity(tileEntity);
        TileEntityRendererDispatcher.instance.render(tileEntity, partialTicks, matrixStack, renderBufferSource);
        matrixStack.popPose();
    });
    TileEntityRendererDispatcher.instance.camera = oldActiveRenderInfo;
    TileEntityRendererDispatcher.instance.level = oldWorld;
    Minecraft.getInstance().getProfiler().popPush("struct_render_blockentities_finish");
    renderBufferSource.endBatch(RenderType.solid());
    renderBufferSource.endBatch(Atlases.solidBlockSheet());
    renderBufferSource.endBatch(Atlases.cutoutBlockSheet());
    renderBufferSource.endBatch(Atlases.bedSheet());
    renderBufferSource.endBatch(Atlases.shulkerBoxSheet());
    renderBufferSource.endBatch(Atlases.signSheet());
    renderBufferSource.endBatch(Atlases.chestSheet());
    if (OptifineCompat.getInstance().isOptifineEnabled()) {
        renderBufferSource.endBatch(Atlases.bannerSheet());
    }
    // not used now
    ClientEventSubscriber.renderBuffers.outlineBufferSource().endOutlineBatch();
    OptifineCompat.getInstance().endBlockEntitiesBeginDebug();
    renderBufferSource.endBatch(Atlases.translucentCullBlockSheet());
    renderBufferSource.endBatch(Atlases.bannerSheet());
    renderBufferSource.endBatch(Atlases.shieldSheet());
    renderBufferSource.endBatch(RenderType.armorGlint());
    renderBufferSource.endBatch(RenderType.armorEntityGlint());
    renderBufferSource.endBatch(RenderType.glint());
    renderBufferSource.endBatch(RenderType.glintDirect());
    renderBufferSource.endBatch(RenderType.glintTranslucent());
    renderBufferSource.endBatch(RenderType.entityGlint());
    renderBufferSource.endBatch(RenderType.entityGlintDirect());
    renderBufferSource.endBatch(RenderType.waterMask());
    // not used now
    ClientEventSubscriber.renderBuffers.crumblingBufferSource().endBatch();
    renderBufferSource.endBatch(RenderType.lines());
    renderBufferSource.endBatch();
    Minecraft.getInstance().getProfiler().popPush("struct_render_blocks_finish2");
    OptifineCompat.getInstance().endDebugPreWaterBeginWater();
    renderBlockLayer(RenderType.translucent(), rawPosMatrix);
    OptifineCompat.getInstance().endWater();
    renderBlockLayer(RenderType.tripwire(), rawPosMatrix);
    matrixStack.popPose();
    Minecraft.getInstance().getProfiler().pop();
}
Also used : Matrix4f(net.minecraft.util.math.vector.Matrix4f) ItemFrameEntity(net.minecraft.entity.item.ItemFrameEntity) Vector3d(net.minecraft.util.math.vector.Vector3d) BlockPos(net.minecraft.util.math.BlockPos) World(net.minecraft.world.World) Minecraft(net.minecraft.client.Minecraft) Blueprint(com.ldtteam.structures.blueprints.v1.Blueprint) CompassItem(net.minecraft.item.CompassItem)

Aggregations

ItemFrameEntity (net.minecraft.entity.item.ItemFrameEntity)6 Entity (net.minecraft.entity.Entity)4 java.util (java.util)3 Collectors (java.util.stream.Collectors)3 ArmorStandEntity (net.minecraft.entity.item.ArmorStandEntity)3 net.minecraft.item (net.minecraft.item)3 CompoundNBT (net.minecraft.nbt.CompoundNBT)3 World (net.minecraft.world.World)3 NotNull (org.jetbrains.annotations.NotNull)3 Nullable (org.jetbrains.annotations.Nullable)3 Lists (com.google.common.collect.Lists)2 MinecoloniesAPIProxy (com.minecolonies.api.MinecoloniesAPIProxy)2 IColonyManager (com.minecolonies.api.colony.IColonyManager)2 Compatibility (com.minecolonies.api.compatibility.Compatibility)2 ItemStorage (com.minecolonies.api.crafting.ItemStorage)2 AbstractEntityCitizen (com.minecolonies.api.entity.citizen.AbstractEntityCitizen)2 ModItems (com.minecolonies.api.items.ModItems)2 ModTags.fungi (com.minecolonies.api.items.ModTags.fungi)2 FUEL_SLOT (com.minecolonies.api.util.constant.Constants.FUEL_SLOT)2 SMELTABLE_SLOT (com.minecolonies.api.util.constant.Constants.SMELTABLE_SLOT)2