From 10ea2e1fae946799850620ed6989e7d0b8a382c1 Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Tue, 1 Jan 2019 18:31:33 +0100 Subject: [PATCH] Made shiny variant more rare --- .../industrial/item/infinity/OneThreeFiveHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/buuz135/industrial/item/infinity/OneThreeFiveHandler.java b/src/main/java/com/buuz135/industrial/item/infinity/OneThreeFiveHandler.java index 70e3d643a..01997a118 100644 --- a/src/main/java/com/buuz135/industrial/item/infinity/OneThreeFiveHandler.java +++ b/src/main/java/com/buuz135/industrial/item/infinity/OneThreeFiveHandler.java @@ -28,6 +28,8 @@ @Mod.EventBusSubscriber(modid = Reference.MOD_ID) public class OneThreeFiveHandler { + public static final String SPECIAL = "135135"; + public static HashMap SPECIAL_ENTITIES = new HashMap<>(); @SideOnly(Side.CLIENT) @@ -36,7 +38,7 @@ public static void onClientTick(TickEvent.ClientTickEvent event) { if (Minecraft.getMinecraft().player != null && Minecraft.getMinecraft().player.world != null && !Minecraft.getMinecraft().isGamePaused() && Minecraft.getMinecraft().player.world.getTotalWorldTime() % 2 == 0) { BlockPos pos = new BlockPos(Minecraft.getMinecraft().player.posX, Minecraft.getMinecraft().player.posY, Minecraft.getMinecraft().player.posZ); Minecraft.getMinecraft().player.world.getEntitiesWithinAABB(EntityLiving.class, new AxisAlignedBB(pos.add(32, 32, 32), pos.add(-32, -32, -32)), - input -> input.getUniqueID().toString().contains("135")). + input -> input.getUniqueID().toString().contains(SPECIAL)). forEach(living -> Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleVex(living))); Minecraft.getMinecraft().player.world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos.add(32, 32, 32), pos.add(-32, -32, -32)), input -> SPECIAL_ENTITIES.containsKey(input.getUniqueID())). @@ -67,7 +69,7 @@ public static void onPlayerTick(TickEvent.PlayerTickEvent event) { @SubscribeEvent public static void onEntityKill(LivingDeathEvent event) { - if (event.getEntityLiving().getUniqueID().toString().contains("135") && event.getSource().getTrueSource() instanceof EntityPlayer && !(event.getSource().getTrueSource() instanceof FakePlayer)) { + if (event.getEntityLiving().getUniqueID().toString().contains(SPECIAL) && event.getSource().getTrueSource() instanceof EntityPlayer && !(event.getSource().getTrueSource() instanceof FakePlayer)) { EntityPlayer player = (EntityPlayer) event.getSource().getTrueSource(); if (player.getHeldItemMainhand().getItem().equals(ItemRegistry.itemInfinityDrill)) { player.getHeldItemMainhand().getTagCompound().setBoolean("Special", true);