Skip to content

Commit

Permalink
Made shiny variant more rare
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Jan 1, 2019
1 parent 537b7e4 commit 10ea2e1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
@Mod.EventBusSubscriber(modid = Reference.MOD_ID)
public class OneThreeFiveHandler {

public static final String SPECIAL = "135135";

public static HashMap<UUID, Long> SPECIAL_ENTITIES = new HashMap<>();

@SideOnly(Side.CLIENT)
Expand All @@ -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())).
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 10ea2e1

Please sign in to comment.