From 80dff148ff0254253cc9f1894484cd1fd068d331 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 16 Mar 2017 05:22:33 +1300 Subject: [PATCH] Fixed up warnings in the file --- .../disguise/disguisetypes/MetaIndex.java | 319 ++++++++---------- 1 file changed, 134 insertions(+), 185 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/MetaIndex.java b/src/me/libraryaddict/disguise/disguisetypes/MetaIndex.java index 23971eef..974c27d5 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/MetaIndex.java +++ b/src/me/libraryaddict/disguise/disguisetypes/MetaIndex.java @@ -1,315 +1,266 @@ package me.libraryaddict.disguise.disguisetypes; +import com.comphenix.protocol.wrappers.BlockPosition; +import com.comphenix.protocol.wrappers.EnumWrappers.Direction; +import com.comphenix.protocol.wrappers.Vector3F; +import com.comphenix.protocol.wrappers.WrappedBlockData; +import com.google.common.base.Optional; +import me.libraryaddict.disguise.disguisetypes.watchers.*; +import org.bukkit.Color; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Map.Entry; import java.util.UUID; -import org.bukkit.Color; -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; - -import com.comphenix.protocol.wrappers.BlockPosition; -import com.comphenix.protocol.wrappers.EnumWrappers.Direction; -import com.comphenix.protocol.wrappers.Vector3F; -import com.comphenix.protocol.wrappers.WrappedBlockData; -import com.google.common.base.Optional; - -import me.libraryaddict.disguise.disguisetypes.watchers.AbstractHorseWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.AgeableWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.AreaEffectCloudWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ArmorStandWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ArrowWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.BatWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.BlazeWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.BoatWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ChestedHorseWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.CreeperWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.DroppedItemWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.EnderCrystalWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.EnderDragonWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.EndermanWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.EvokerWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.FallingBlockWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.FireworkWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.FishingHookWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.GhastWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.GuardianWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.HorseWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.InsentientWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.IronGolemWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ItemFrameWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.LivingWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.LlamaWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.MinecartWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.OcelotWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.PigWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.PlayerWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.PolarBearWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.RabbitWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.SheepWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ShulkerWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.SkeletonWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.SlimeWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.SnowmanWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.SpiderWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.SplashPotionWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.TNTWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.TameableWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.VexWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.VillagerWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.VindicatorWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.WitchWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.WitherSkullWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.WitherWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.WolfWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ZombieVillagerWatcher; -import me.libraryaddict.disguise.disguisetypes.watchers.ZombieWatcher; - public class MetaIndex { private static MetaIndex[] _values = new MetaIndex[0]; - public static MetaIndex AGEABLE_BABY = new MetaIndex(AgeableWatcher.class, 0, false); + public static MetaIndex AGEABLE_BABY = new MetaIndex<>(AgeableWatcher.class, 0, false); - public static MetaIndex AREA_EFFECT_CLOUD_COLOR = new MetaIndex(AreaEffectCloudWatcher.class, 1, + public static MetaIndex AREA_EFFECT_CLOUD_COLOR = new MetaIndex<>(AreaEffectCloudWatcher.class, 1, Color.BLACK.asRGB()); - public static MetaIndex AREA_EFFECT_IGNORE_RADIUS = new MetaIndex(AreaEffectCloudWatcher.class, 2, false); + public static MetaIndex AREA_EFFECT_IGNORE_RADIUS = new MetaIndex<>(AreaEffectCloudWatcher.class, 2, + false); - public static MetaIndex AREA_EFFECT_PARTICLE = new MetaIndex(AreaEffectCloudWatcher.class, 3, 0); + public static MetaIndex AREA_EFFECT_PARTICLE = new MetaIndex<>(AreaEffectCloudWatcher.class, 3, 0); - public static MetaIndex AREA_EFFECT_PARTICLE_PARAM_1 = new MetaIndex(AreaEffectCloudWatcher.class, 4, 0); + public static MetaIndex AREA_EFFECT_PARTICLE_PARAM_1 = new MetaIndex<>(AreaEffectCloudWatcher.class, 4, 0); - public static MetaIndex AREA_EFFECT_PARTICLE_PARAM_2 = new MetaIndex(AreaEffectCloudWatcher.class, 5, 0); + public static MetaIndex AREA_EFFECT_PARTICLE_PARAM_2 = new MetaIndex<>(AreaEffectCloudWatcher.class, 5, 0); - public static MetaIndex AREA_EFFECT_RADIUS = new MetaIndex(AreaEffectCloudWatcher.class, 0, 0F); + public static MetaIndex AREA_EFFECT_RADIUS = new MetaIndex<>(AreaEffectCloudWatcher.class, 0, 0F); - public static MetaIndex ARMORSTAND_BODY = new MetaIndex(ArmorStandWatcher.class, 2, + public static MetaIndex ARMORSTAND_BODY = new MetaIndex<>(ArmorStandWatcher.class, 2, new Vector3F(0, 0, 0)); - public static MetaIndex ARMORSTAND_HEAD = new MetaIndex(ArmorStandWatcher.class, 1, + public static MetaIndex ARMORSTAND_HEAD = new MetaIndex<>(ArmorStandWatcher.class, 1, new Vector3F(0, 0, 0)); - public static MetaIndex ARMORSTAND_LEFT_ARM = new MetaIndex(ArmorStandWatcher.class, 3, + public static MetaIndex ARMORSTAND_LEFT_ARM = new MetaIndex<>(ArmorStandWatcher.class, 3, new Vector3F(0, 0, 0)); - public static MetaIndex ARMORSTAND_LEFT_LEG = new MetaIndex(ArmorStandWatcher.class, 5, + public static MetaIndex ARMORSTAND_LEFT_LEG = new MetaIndex<>(ArmorStandWatcher.class, 5, new Vector3F(0, 0, 0)); - public static MetaIndex ARMORSTAND_META = new MetaIndex(ArmorStandWatcher.class, 0, (byte) 0); + public static MetaIndex ARMORSTAND_META = new MetaIndex<>(ArmorStandWatcher.class, 0, (byte) 0); - public static MetaIndex ARMORSTAND_RIGHT_ARM = new MetaIndex(ArmorStandWatcher.class, 4, + public static MetaIndex ARMORSTAND_RIGHT_ARM = new MetaIndex<>(ArmorStandWatcher.class, 4, new Vector3F(0, 0, 0)); - public static MetaIndex ARMORSTAND_RIGHT_LEG = new MetaIndex(ArmorStandWatcher.class, 6, + public static MetaIndex ARMORSTAND_RIGHT_LEG = new MetaIndex<>(ArmorStandWatcher.class, 6, new Vector3F(0, 0, 0)); - public static MetaIndex ARROW_CRITICAL = new MetaIndex(ArrowWatcher.class, 0, (byte) 0); + public static MetaIndex ARROW_CRITICAL = new MetaIndex<>(ArrowWatcher.class, 0, (byte) 0); - public static MetaIndex BAT_HANGING = new MetaIndex(BatWatcher.class, 0, (byte) 1); + public static MetaIndex BAT_HANGING = new MetaIndex<>(BatWatcher.class, 0, (byte) 1); - public static MetaIndex BLAZE_BLAZING = new MetaIndex(BlazeWatcher.class, 0, (byte) 0); + public static MetaIndex BLAZE_BLAZING = new MetaIndex<>(BlazeWatcher.class, 0, (byte) 0); - public static MetaIndex BOAT_DAMAGE = new MetaIndex(BoatWatcher.class, 2, 40F); + public static MetaIndex BOAT_DAMAGE = new MetaIndex<>(BoatWatcher.class, 2, 40F); - public static MetaIndex BOAT_DIRECTION = new MetaIndex(BoatWatcher.class, 1, 0); + public static MetaIndex BOAT_DIRECTION = new MetaIndex<>(BoatWatcher.class, 1, 0); - public static MetaIndex BOAT_LAST_HIT = new MetaIndex(BoatWatcher.class, 0, 0); + public static MetaIndex BOAT_LAST_HIT = new MetaIndex<>(BoatWatcher.class, 0, 0); - public static MetaIndex BOAT_LEFT_PADDLING = new MetaIndex(BoatWatcher.class, 5, false); + public static MetaIndex BOAT_LEFT_PADDLING = new MetaIndex<>(BoatWatcher.class, 5, false); - public static MetaIndex BOAT_RIGHT_PADDLING = new MetaIndex(BoatWatcher.class, 4, false); + public static MetaIndex BOAT_RIGHT_PADDLING = new MetaIndex<>(BoatWatcher.class, 4, false); - public static MetaIndex BOAT_TYPE = new MetaIndex(BoatWatcher.class, 3, 0); + public static MetaIndex BOAT_TYPE = new MetaIndex<>(BoatWatcher.class, 3, 0); - public static MetaIndex CREEPER_IGNITED = new MetaIndex(CreeperWatcher.class, 2, false); + public static MetaIndex CREEPER_IGNITED = new MetaIndex<>(CreeperWatcher.class, 2, false); - public static MetaIndex CREEPER_POWERED = new MetaIndex(CreeperWatcher.class, 1, false); + public static MetaIndex CREEPER_POWERED = new MetaIndex<>(CreeperWatcher.class, 1, false); - public static MetaIndex CREEPER_STATE = new MetaIndex(CreeperWatcher.class, 0, -1); + public static MetaIndex CREEPER_STATE = new MetaIndex<>(CreeperWatcher.class, 0, -1); - public static MetaIndex DROPPED_ITEM = new MetaIndex(DroppedItemWatcher.class, 0, + public static MetaIndex DROPPED_ITEM = new MetaIndex<>(DroppedItemWatcher.class, 0, new ItemStack(Material.STONE)); - public static MetaIndex> ENDER_CRYSTAL_BEAM = new MetaIndex>( - EnderCrystalWatcher.class, 0, Optional. absent()); + public static MetaIndex> ENDER_CRYSTAL_BEAM = new MetaIndex<>(EnderCrystalWatcher.class, 0, + Optional.absent()); - public static MetaIndex ENDER_CRYSTAL_PLATE = new MetaIndex(EnderCrystalWatcher.class, 1, false); + public static MetaIndex ENDER_CRYSTAL_PLATE = new MetaIndex<>(EnderCrystalWatcher.class, 1, false); - public static MetaIndex ENDERD_RAGON_PHASE = new MetaIndex(EnderDragonWatcher.class, 0, 0); + public static MetaIndex ENDERD_RAGON_PHASE = new MetaIndex<>(EnderDragonWatcher.class, 0, 0); - public static MetaIndex ENDERMAN_AGRESSIVE = new MetaIndex(EndermanWatcher.class, 1, false); + public static MetaIndex ENDERMAN_AGRESSIVE = new MetaIndex<>(EndermanWatcher.class, 1, false); - public static MetaIndex> ENDERMAN_ITEM = new MetaIndex>( - EndermanWatcher.class, 0, Optional. absent()); + public static MetaIndex> ENDERMAN_ITEM = new MetaIndex<>(EndermanWatcher.class, 0, + Optional.absent()); - public static MetaIndex ENTITY_AIR_TICKS = new MetaIndex(FlagWatcher.class, 1, 0); + public static MetaIndex ENTITY_AIR_TICKS = new MetaIndex<>(FlagWatcher.class, 1, 0); - public static MetaIndex ENTITY_CUSTOM_NAME = new MetaIndex(FlagWatcher.class, 2, ""); + public static MetaIndex ENTITY_CUSTOM_NAME = new MetaIndex<>(FlagWatcher.class, 2, ""); - public static MetaIndex ENTITY_CUSTOM_NAME_VISIBLE = new MetaIndex(FlagWatcher.class, 3, false); + public static MetaIndex ENTITY_CUSTOM_NAME_VISIBLE = new MetaIndex<>(FlagWatcher.class, 3, false); - public static MetaIndex ENTITY_META = new MetaIndex(FlagWatcher.class, 0, (byte) 0); + public static MetaIndex ENTITY_META = new MetaIndex<>(FlagWatcher.class, 0, (byte) 0); - public static MetaIndex ENTITY_NO_GRAVITY = new MetaIndex(FlagWatcher.class, 5, false); + public static MetaIndex ENTITY_NO_GRAVITY = new MetaIndex<>(FlagWatcher.class, 5, false); - public static MetaIndex ENTITY_SILENT = new MetaIndex(FlagWatcher.class, 4, false); + public static MetaIndex ENTITY_SILENT = new MetaIndex<>(FlagWatcher.class, 4, false); - public static MetaIndex EVOKER_SPELL_TICKS = new MetaIndex(EvokerWatcher.class, 0, (byte) 0); + public static MetaIndex EVOKER_SPELL_TICKS = new MetaIndex<>(EvokerWatcher.class, 0, (byte) 0); - public static MetaIndex FALLING_BLOCK_POSITION = new MetaIndex(FallingBlockWatcher.class, 0, + public static MetaIndex FALLING_BLOCK_POSITION = new MetaIndex<>(FallingBlockWatcher.class, 0, BlockPosition.ORIGIN); - public static MetaIndex FIREWORK_ITEM = new MetaIndex(FireworkWatcher.class, 0, + public static MetaIndex FIREWORK_ITEM = new MetaIndex<>(FireworkWatcher.class, 0, new ItemStack(Material.AIR)); - public static MetaIndex FIREWORK_ATTACHED_ENTITY = new MetaIndex(FireworkWatcher.class, 1, 0); + public static MetaIndex FIREWORK_ATTACHED_ENTITY = new MetaIndex<>(FireworkWatcher.class, 1, 0); - public static MetaIndex FISHING_HOOK_HOOKED = new MetaIndex(FishingHookWatcher.class, 0, 0); + public static MetaIndex FISHING_HOOK_HOOKED = new MetaIndex<>(FishingHookWatcher.class, 0, 0); - public static MetaIndex GHAST_AGRESSIVE = new MetaIndex(GhastWatcher.class, 0, false); + public static MetaIndex GHAST_AGRESSIVE = new MetaIndex<>(GhastWatcher.class, 0, false); - public static MetaIndex GUARDIAN_RETRACT_SPIKES = new MetaIndex(GuardianWatcher.class, 0, false); + public static MetaIndex GUARDIAN_RETRACT_SPIKES = new MetaIndex<>(GuardianWatcher.class, 0, false); - public static MetaIndex GUARDIAN_TARGET = new MetaIndex(GuardianWatcher.class, 1, 0); + public static MetaIndex GUARDIAN_TARGET = new MetaIndex<>(GuardianWatcher.class, 1, 0); - public static MetaIndex HORSE_ARMOR = new MetaIndex(HorseWatcher.class, 1, 0); + public static MetaIndex HORSE_ARMOR = new MetaIndex<>(HorseWatcher.class, 1, 0); - public static MetaIndex HORSE_CHESTED_CARRYING_CHEST = new MetaIndex(ChestedHorseWatcher.class, 0, false); + public static MetaIndex HORSE_CHESTED_CARRYING_CHEST = new MetaIndex<>(ChestedHorseWatcher.class, 0, + false); - public static MetaIndex HORSE_COLOR = new MetaIndex(HorseWatcher.class, 0, 0); + public static MetaIndex HORSE_COLOR = new MetaIndex<>(HorseWatcher.class, 0, 0); - public static MetaIndex HORSE_META = new MetaIndex(AbstractHorseWatcher.class, 0, (byte) 0); + public static MetaIndex HORSE_META = new MetaIndex<>(AbstractHorseWatcher.class, 0, (byte) 0); - public static MetaIndex> HORSE_OWNER = new MetaIndex>(AbstractHorseWatcher.class, 1, - Optional. absent()); + public static MetaIndex> HORSE_OWNER = new MetaIndex<>(AbstractHorseWatcher.class, 1, + Optional.absent()); - public static MetaIndex INSENTIENT_META = new MetaIndex(InsentientWatcher.class, 0, (byte) 0); + public static MetaIndex INSENTIENT_META = new MetaIndex<>(InsentientWatcher.class, 0, (byte) 0); - public static MetaIndex IRON_GOLEM_PLAYER_CREATED = new MetaIndex(IronGolemWatcher.class, 0, (byte) 0); + public static MetaIndex IRON_GOLEM_PLAYER_CREATED = new MetaIndex<>(IronGolemWatcher.class, 0, (byte) 0); - public static MetaIndex ITEMFRAME_ITEM = new MetaIndex(ItemFrameWatcher.class, 0, + public static MetaIndex ITEMFRAME_ITEM = new MetaIndex<>(ItemFrameWatcher.class, 0, new ItemStack(Material.AIR)); - public static MetaIndex ITEMFRAME_ROTATION = new MetaIndex(ItemFrameWatcher.class, 1, 0); + public static MetaIndex ITEMFRAME_ROTATION = new MetaIndex<>(ItemFrameWatcher.class, 1, 0); - public static MetaIndex LIVING_ARROWS = new MetaIndex(LivingWatcher.class, 4, 0); + public static MetaIndex LIVING_ARROWS = new MetaIndex<>(LivingWatcher.class, 4, 0); - public static MetaIndex LIVING_HAND = new MetaIndex(LivingWatcher.class, 0, (byte) 0); + public static MetaIndex LIVING_HAND = new MetaIndex<>(LivingWatcher.class, 0, (byte) 0); - public static MetaIndex LIVING_HEALTH = new MetaIndex(LivingWatcher.class, 1, 1F); + public static MetaIndex LIVING_HEALTH = new MetaIndex<>(LivingWatcher.class, 1, 1F); - public static MetaIndex LIVING_POTION_AMBIENT = new MetaIndex(LivingWatcher.class, 3, false); + public static MetaIndex LIVING_POTION_AMBIENT = new MetaIndex<>(LivingWatcher.class, 3, false); - public static MetaIndex LIVING_POTIONS = new MetaIndex(LivingWatcher.class, 2, 0); + public static MetaIndex LIVING_POTIONS = new MetaIndex<>(LivingWatcher.class, 2, 0); - public static MetaIndex LLAMA_CARPET = new MetaIndex(LlamaWatcher.class, 1, 0); + public static MetaIndex LLAMA_CARPET = new MetaIndex<>(LlamaWatcher.class, 1, 0); - public static MetaIndex LLAMA_COLOR = new MetaIndex(LlamaWatcher.class, 2, -1); + public static MetaIndex LLAMA_COLOR = new MetaIndex<>(LlamaWatcher.class, 2, -1); - public static MetaIndex LLAMA_STRENGTH = new MetaIndex(LlamaWatcher.class, 0, 0); + public static MetaIndex LLAMA_STRENGTH = new MetaIndex<>(LlamaWatcher.class, 0, 0); - public static MetaIndex MINECART_BLOCK = new MetaIndex(MinecartWatcher.class, 3, 0); + public static MetaIndex MINECART_BLOCK = new MetaIndex<>(MinecartWatcher.class, 3, 0); - public static MetaIndex MINECART_BLOCK_VISIBLE = new MetaIndex(MinecartWatcher.class, 5, false); + public static MetaIndex MINECART_BLOCK_VISIBLE = new MetaIndex<>(MinecartWatcher.class, 5, false); - public static MetaIndex MINECART_BLOCK_Y = new MetaIndex(MinecartWatcher.class, 4, 0); + public static MetaIndex MINECART_BLOCK_Y = new MetaIndex<>(MinecartWatcher.class, 4, 0); - public static MetaIndex MINECART_SHAKING_DIRECTION = new MetaIndex(MinecartWatcher.class, 1, 1); + public static MetaIndex MINECART_SHAKING_DIRECTION = new MetaIndex<>(MinecartWatcher.class, 1, 1); - public static MetaIndex MINECART_SHAKING_MULITPLIER = new MetaIndex(MinecartWatcher.class, 2, 0F); + public static MetaIndex MINECART_SHAKING_MULITPLIER = new MetaIndex<>(MinecartWatcher.class, 2, 0F); - public static MetaIndex MINECART_SHAKING_POWER = new MetaIndex(MinecartWatcher.class, 0, 0); + public static MetaIndex MINECART_SHAKING_POWER = new MetaIndex<>(MinecartWatcher.class, 0, 0); - public static MetaIndex OCELOT_TYPE = new MetaIndex(OcelotWatcher.class, 0, 0); + public static MetaIndex OCELOT_TYPE = new MetaIndex<>(OcelotWatcher.class, 0, 0); - public static MetaIndex PIG_SADDLED = new MetaIndex(PigWatcher.class, 0, false); + public static MetaIndex PIG_SADDLED = new MetaIndex<>(PigWatcher.class, 0, false); - public static MetaIndex PIG_UNKNOWN = new MetaIndex(PigWatcher.class, 1, 0); + public static MetaIndex PIG_UNKNOWN = new MetaIndex<>(PigWatcher.class, 1, 0); - public static MetaIndex PLAYER_ABSORPTION = new MetaIndex(PlayerWatcher.class, 0, 0F); + public static MetaIndex PLAYER_ABSORPTION = new MetaIndex<>(PlayerWatcher.class, 0, 0F); - public static MetaIndex PLAYER_HAND = new MetaIndex(PlayerWatcher.class, 3, (byte) 0); + public static MetaIndex PLAYER_HAND = new MetaIndex<>(PlayerWatcher.class, 3, (byte) 0); - public static MetaIndex PLAYER_SCORE = new MetaIndex(PlayerWatcher.class, 1, 0); + public static MetaIndex PLAYER_SCORE = new MetaIndex<>(PlayerWatcher.class, 1, 0); - public static MetaIndex PLAYER_SKIN = new MetaIndex(PlayerWatcher.class, 2, (byte) 127); + public static MetaIndex PLAYER_SKIN = new MetaIndex<>(PlayerWatcher.class, 2, (byte) 127); - public static MetaIndex POLAR_BEAR_STANDING = new MetaIndex(PolarBearWatcher.class, 0, false); + public static MetaIndex POLAR_BEAR_STANDING = new MetaIndex<>(PolarBearWatcher.class, 0, false); - public static MetaIndex RABBIT_TYPE = new MetaIndex(RabbitWatcher.class, 0, 0); + public static MetaIndex RABBIT_TYPE = new MetaIndex<>(RabbitWatcher.class, 0, 0); - public static MetaIndex SHEEP_WOOL = new MetaIndex(SheepWatcher.class, 0, (byte) 0); + public static MetaIndex SHEEP_WOOL = new MetaIndex<>(SheepWatcher.class, 0, (byte) 0); - public static MetaIndex> SHULKER_ATTACHED = new MetaIndex>( - ShulkerWatcher.class, 1, Optional. absent()); + public static MetaIndex> SHULKER_ATTACHED = new MetaIndex<>(ShulkerWatcher.class, 1, + Optional.absent()); - public static MetaIndex SHULKER_COLOR = new MetaIndex(ShulkerWatcher.class, 3, (byte) 10); + public static MetaIndex SHULKER_COLOR = new MetaIndex<>(ShulkerWatcher.class, 3, (byte) 10); - public static MetaIndex SHULKER_FACING = new MetaIndex(ShulkerWatcher.class, 0, Direction.DOWN); + public static MetaIndex SHULKER_FACING = new MetaIndex<>(ShulkerWatcher.class, 0, Direction.DOWN); - public static MetaIndex SHULKER_PEEKING = new MetaIndex(ShulkerWatcher.class, 2, (byte) 0); + public static MetaIndex SHULKER_PEEKING = new MetaIndex<>(ShulkerWatcher.class, 2, (byte) 0); - public static MetaIndex SKELETON_SWING_ARMS = new MetaIndex(SkeletonWatcher.class, 0, false); + public static MetaIndex SKELETON_SWING_ARMS = new MetaIndex<>(SkeletonWatcher.class, 0, false); - public static MetaIndex SLIME_SIZE = new MetaIndex(SlimeWatcher.class, 0, 0); + public static MetaIndex SLIME_SIZE = new MetaIndex<>(SlimeWatcher.class, 0, 0); - public static MetaIndex SNOWMAN_DERP = new MetaIndex(SnowmanWatcher.class, 0, (byte) 16); + public static MetaIndex SNOWMAN_DERP = new MetaIndex<>(SnowmanWatcher.class, 0, (byte) 16); - public static MetaIndex SPIDER_CLIMB = new MetaIndex(SpiderWatcher.class, 0, (byte) 0); + public static MetaIndex SPIDER_CLIMB = new MetaIndex<>(SpiderWatcher.class, 0, (byte) 0); - public static MetaIndex SPLASH_POTION_ITEM = new MetaIndex(SplashPotionWatcher.class, 1, + public static MetaIndex SPLASH_POTION_ITEM = new MetaIndex<>(SplashPotionWatcher.class, 1, new ItemStack(Material.SPLASH_POTION)); // Yeah, the '1' isn't a bug. No idea why but MC thinks - // there's a '0' already. + // there's a '0' already. - public static MetaIndex SPLASH_POTION_ITEM_BAD = new MetaIndex(SplashPotionWatcher.class, 0, + public static MetaIndex SPLASH_POTION_ITEM_BAD = new MetaIndex<>(SplashPotionWatcher.class, 0, new ItemStack(Material.SPLASH_POTION)); // Yeah, the '1' isn't a bug. No - // idea why but MC thinks there's a - // '0' already. + // idea why but MC thinks there's a + // '0' already. - public static MetaIndex TAMEABLE_META = new MetaIndex(TameableWatcher.class, 0, (byte) 0); + public static MetaIndex TAMEABLE_META = new MetaIndex<>(TameableWatcher.class, 0, (byte) 0); - public static MetaIndex> TAMEABLE_OWNER = new MetaIndex>(TameableWatcher.class, 1, - Optional. absent()); + public static MetaIndex> TAMEABLE_OWNER = new MetaIndex<>(TameableWatcher.class, 1, + Optional.absent()); - public static MetaIndex TIPPED_ARROW_COLOR = new MetaIndex(ArrowWatcher.class, 1, Color.WHITE.asRGB()); + public static MetaIndex TIPPED_ARROW_COLOR = new MetaIndex<>(ArrowWatcher.class, 1, Color.WHITE.asRGB()); - public static MetaIndex TNT_FUSE_TICKS = new MetaIndex(TNTWatcher.class, 0, Integer.MAX_VALUE); + public static MetaIndex TNT_FUSE_TICKS = new MetaIndex<>(TNTWatcher.class, 0, Integer.MAX_VALUE); - public static MetaIndex VEX_ANGRY = new MetaIndex(VexWatcher.class, 0, (byte) 0); + public static MetaIndex VEX_ANGRY = new MetaIndex<>(VexWatcher.class, 0, (byte) 0); - public static MetaIndex VILLAGER_PROFESSION = new MetaIndex(VillagerWatcher.class, 0, 0); + public static MetaIndex VILLAGER_PROFESSION = new MetaIndex<>(VillagerWatcher.class, 0, 0); - public static MetaIndex VINDICATOR_JOHNNY = new MetaIndex(VindicatorWatcher.class, 0, (byte) 0); + public static MetaIndex VINDICATOR_JOHNNY = new MetaIndex<>(VindicatorWatcher.class, 0, (byte) 0); - public static MetaIndex WITCH_AGGRESSIVE = new MetaIndex(WitchWatcher.class, 0, false); + public static MetaIndex WITCH_AGGRESSIVE = new MetaIndex<>(WitchWatcher.class, 0, false); - public static MetaIndex WITHER_INVUL = new MetaIndex(WitherWatcher.class, 3, 0); + public static MetaIndex WITHER_INVUL = new MetaIndex<>(WitherWatcher.class, 3, 0); - public static MetaIndex WITHER_TARGET_1 = new MetaIndex(WitherWatcher.class, 0, 0); + public static MetaIndex WITHER_TARGET_1 = new MetaIndex<>(WitherWatcher.class, 0, 0); - public static MetaIndex WITHER_TARGET_2 = new MetaIndex(WitherWatcher.class, 1, 0); + public static MetaIndex WITHER_TARGET_2 = new MetaIndex<>(WitherWatcher.class, 1, 0); - public static MetaIndex WITHER_TARGET_3 = new MetaIndex(WitherWatcher.class, 2, 0); + public static MetaIndex WITHER_TARGET_3 = new MetaIndex<>(WitherWatcher.class, 2, 0); - public static MetaIndex WITHER_SKULL_BLUE = new MetaIndex(WitherSkullWatcher.class, 0, false); + public static MetaIndex WITHER_SKULL_BLUE = new MetaIndex<>(WitherSkullWatcher.class, 0, false); - public static MetaIndex WOLF_BEGGING = new MetaIndex(WolfWatcher.class, 1, false); + public static MetaIndex WOLF_BEGGING = new MetaIndex<>(WolfWatcher.class, 1, false); - public static MetaIndex WOLF_COLLAR = new MetaIndex(WolfWatcher.class, 2, 14); + public static MetaIndex WOLF_COLLAR = new MetaIndex<>(WolfWatcher.class, 2, 14); - public static MetaIndex WOLF_DAMAGE = new MetaIndex(WolfWatcher.class, 0, 0F); + public static MetaIndex WOLF_DAMAGE = new MetaIndex<>(WolfWatcher.class, 0, 0F); - public static MetaIndex ZOMBIE_AGGRESSIVE = new MetaIndex(ZombieWatcher.class, 2, false); + public static MetaIndex ZOMBIE_AGGRESSIVE = new MetaIndex<>(ZombieWatcher.class, 2, false); - public static MetaIndex ZOMBIE_BABY = new MetaIndex(ZombieWatcher.class, 0, false); + public static MetaIndex ZOMBIE_BABY = new MetaIndex<>(ZombieWatcher.class, 0, false); - public static MetaIndex ZOMBIE_PLACEHOLDER = new MetaIndex(ZombieWatcher.class, 1, 0); + public static MetaIndex ZOMBIE_PLACEHOLDER = new MetaIndex<>(ZombieWatcher.class, 1, 0); - public static MetaIndex ZOMBIE_VILLAGER_PROFESSION = new MetaIndex(ZombieVillagerWatcher.class, 1, 0); + public static MetaIndex ZOMBIE_VILLAGER_PROFESSION = new MetaIndex<>(ZombieVillagerWatcher.class, 1, 0); - public static MetaIndex ZOMBIE_VILLAGER_SHAKING = new MetaIndex(ZombieVillagerWatcher.class, 0, false); + public static MetaIndex ZOMBIE_VILLAGER_SHAKING = new MetaIndex<>(ZombieVillagerWatcher.class, 0, false); static { for (MetaIndex flagType : values()) { @@ -317,14 +268,13 @@ public class MetaIndex { continue; flagType._index += getNoIndexes(flagType.getFlagWatcher().getSuperclass()); - } // Simple verification for the dev that he's setting up the FlagType's properly. // All flag types should be from 0 to with no empty numbers. // All flag types should never occur twice. - HashMap maxValues = new HashMap(); + HashMap maxValues = new HashMap<>(); for (MetaIndex type : values()) { if (maxValues.containsKey(type.getFlagWatcher()) && maxValues.get(type.getFlagWatcher()) > type.getIndex()) @@ -347,9 +297,8 @@ public class MetaIndex { continue; if (found != null) { - System.err.println(entry.getKey().getSimpleName() + " has multiple FlagType's registered for the index " - + i + " (" + type.getFlagWatcher().getSimpleName() + ", " + found.getFlagWatcher().getSimpleName() - + ")"); + System.err.println( + entry.getKey().getSimpleName() + " has multiple FlagType's registered for the index " + i + " (" + type.getFlagWatcher().getSimpleName() + ", " + found.getFlagWatcher().getSimpleName() + ")"); continue loop; } @@ -379,7 +328,7 @@ public class MetaIndex { } public static ArrayList getFlags(Class watcherClass) { - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList<>(); for (MetaIndex type : values()) { if (!type.getFlagWatcher().isAssignableFrom(watcherClass))