diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java index d695add3c..30f486721 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java @@ -22,9 +22,7 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.core.Direction; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.phys.AABB; -import net.minecraft.world.phys.Vec3; import javax.annotation.Nonnull; @@ -38,9 +36,6 @@ public class ReconstructorRenderer implements BlockEntityRenderer 0) { - AssetUtil.renderLaser(matrices, buffer, 0, 0, 0, rot, pitch, length, 0, color, 0.8f * tile.getProgress(), 0.2f); - tile.decTTL(); - } if (stack.isEmpty() || !(stack.getItem() instanceof ILensItem)) { return; } @@ -84,9 +71,6 @@ public class ReconstructorRenderer implements BlockEntityRenderer 0.0f) - return new AABB(Vec3.atCenterOf(blockEntity.getBlockPos()), Vec3.atCenterOf(blockEntity.getBlockPos()).add(1,1,1).relative(blockEntity.getBlockState().getValue(BlockStateProperties.FACING), 11)); - else - return BlockEntityRenderer.super.getRenderBoundingBox(blockEntity); + return BlockEntityRenderer.super.getRenderBoundingBox(blockEntity); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 361a074d3..ac45975f7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -22,7 +22,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTypes; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.particle.ParticleBeam; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; @@ -37,14 +36,12 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.resources.language.I18n; import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.phys.Vec3; import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; @@ -244,13 +241,8 @@ public final class AssetUtil { @OnlyIn(Dist.CLIENT) public static void spawnLaserWithTimeClient(double startX, double startY, double startZ, double endX, double endY, double endZ, int color, int maxAge, double rotationTime, float size, float alpha) { Minecraft mc = Minecraft.getInstance(); - BlockEntity tile = mc.level.getBlockEntity(BlockPos.containing(startX, startY, startZ)); - if (tile instanceof TileEntityAtomicReconstructor) { - ((TileEntityAtomicReconstructor) tile).resetBeam(maxAge, color); - } else { - if (mc.player != null && mc.player.distanceToSqr(startX, startY, startZ) <= 64 || mc.player.distanceToSqr(endX, endY, endZ) <= 64) { - mc.level.addParticle(ParticleBeam.Factory.createData(endX, endY, endZ, color, alpha, maxAge, rotationTime, size), startX, startY, startZ, 0, 0, 0); - } + if (mc.player != null && mc.player.distanceToSqr(startX, startY, startZ) <= 64 || mc.player.distanceToSqr(endX, endY, endZ) <= 64) { + mc.level.addParticle(ParticleBeam.Factory.createData(endX, endY, endZ, color, alpha, maxAge, rotationTime, size), startX, startY, startZ, 0, 0, 0); } } /* @OnlyIn(Dist.CLIENT)