From 4c03406640fda92a8a7dfcc3a42796855f53026c Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Tue, 26 Apr 2022 01:53:47 +0800 Subject: [PATCH] Minor code maintenance --- .../gtnewhorizon/structurelib/StructureLibAPI.java | 2 +- .../gtnewhorizon/structurelib/proxy/ClientProxy.java | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java b/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java index 70f89bd7..f876e5d4 100644 --- a/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java +++ b/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java @@ -46,7 +46,7 @@ public class StructureLibAPI { } /** - * Start current batch of hinting. All hints particles generated during one batch will be considered to belong to one hologram. + * End current batch of hinting. All hints particles generated during one batch will be considered to belong to one hologram. *
* You don't need to call this unless your constructable tool didn't call {@link com.gtnewhorizon.structurelib.alignment.constructable.ConstructableUtility#handle(ItemStack, EntityPlayer, World, int, int, int, int)} */ diff --git a/src/main/java/com/gtnewhorizon/structurelib/proxy/ClientProxy.java b/src/main/java/com/gtnewhorizon/structurelib/proxy/ClientProxy.java index 36b77959..8457391c 100644 --- a/src/main/java/com/gtnewhorizon/structurelib/proxy/ClientProxy.java +++ b/src/main/java/com/gtnewhorizon/structurelib/proxy/ClientProxy.java @@ -26,6 +26,9 @@ import java.util.List; import static com.gtnewhorizon.structurelib.StructureLib.RANDOM; public class ClientProxy extends CommonProxy { + + private static final short[] NO_TINT = {255, 255, 255, 0}; + @Override public void hintParticleTinted(World w, int x, int y, int z, IIcon[] icons, short[] RGBa) { EntityFXBlockHint hint = new EntityFXBlockHint(w, x, y, z, icons).withColorTint(RGBa); @@ -46,10 +49,6 @@ public class ClientProxy extends CommonProxy { allHints.forcePut(hint, info); } currentHints.add(hint); - - EntityFX particle = new WeightlessParticleFX(w, x + RANDOM.nextFloat() * 0.5F, y + RANDOM.nextFloat() * 0.5F, z + RANDOM.nextFloat() * 0.5F, 0, 0, 0); - particle.setRBGColorF(0, 0.6F * RANDOM.nextFloat(), 0.8f); - Minecraft.getMinecraft().effectRenderer.addEffect(particle); } @Override @@ -59,12 +58,12 @@ public class ClientProxy extends CommonProxy { @Override public void hintParticle(World w, int x, int y, int z, IIcon[] icons) { - hintParticleTinted(w, x, y, z, icons, new short[]{255, 255, 255, 0}); + hintParticleTinted(w, x, y, z, icons, NO_TINT); } @Override public void hintParticle(World w, int x, int y, int z, Block block, int meta) { - hintParticleTinted(w, x, y, z, createIIconFromBlock(block, meta), new short[]{255, 255, 255, 0}); + hintParticleTinted(w, x, y, z, createIIconFromBlock(block, meta), NO_TINT); } private static IIcon[] createIIconFromBlock(Block block, int meta) {