diff --git a/src/main/java/vazkii/botania/client/core/handler/BaubleRenderHandler.java b/src/main/java/vazkii/botania/client/core/handler/BaubleRenderHandler.java index d03c55bc7..cf181ad70 100644 --- a/src/main/java/vazkii/botania/client/core/handler/BaubleRenderHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/BaubleRenderHandler.java @@ -99,6 +99,7 @@ public final class BaubleRenderHandler implements LayerRenderer { } } + @SuppressWarnings("deprecation") private void renderManaTablet(EntityPlayer player) { boolean renderedOne = false; for(int i = 0; i < player.inventory.getSizeInventory(); i++) { diff --git a/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java b/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java index 235b8ccaf..9a2dfb5b5 100644 --- a/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java @@ -171,6 +171,7 @@ public final class ContributorFancinessHandler implements LayerRenderer ROTATIONS = ImmutableMap.of(EnumFacing.NORTH, 180, EnumFacing.SOUTH, 0, EnumFacing.WEST, 270, EnumFacing.EAST, 90); + @SuppressWarnings("deprecation") @Override public void renderTileEntityAt(TileIncensePlate plate, double d0, double d1, double d2, float ticks, int digProgress) { if (plate != null && plate.getWorld() != null && !plate.getWorld().isBlockLoaded(plate.getPos(), false)) { diff --git a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java index ceb77abca..c4847b868 100644 --- a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java @@ -17,11 +17,11 @@ import java.util.List; import java.util.Map; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.ChatStyle; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; import vazkii.botania.common.Botania; @@ -36,7 +36,6 @@ public final class ConfigHandler { public static Configuration config; public static ConfigAdaptor adaptor; - private static final String CATEGORY_POTIONS = "potions"; public static final int hardcorePassiveGeneration = 72000; @@ -99,23 +98,13 @@ public final class ConfigHandler { public static double flowerTallChance = 0.05; public static int mushroomQuantity = 40; - private static boolean verifiedPotionArray = false; - private static int potionArrayLimit = 0; // todo 1.8 potion things should be unneeded thanks to potion registry - - public static int potionIDSoulCross = 91; - public static int potionIDFeatherfeet = 92; - public static int potionIDEmptiness = 93; - public static int potionIDBloodthirst = 94; - public static int potionIDAllure = 95; - public static int potionIDClear = 96; - public static void loadConfig(File configFile) { config = new Configuration(configFile); config.load(); load(); - FMLCommonHandler.instance().bus().register(new ChangeListener()); + MinecraftForge.EVENT_BUS.register(new ChangeListener()); } public static void load() { @@ -281,13 +270,6 @@ public final class ConfigHandler { desc = "The quantity of Botania mushrooms to generate underground, in the world, defaults to 40, the lower the number the less patches generate."; mushroomQuantity = loadPropInt("worldgen.mushroom.quantity", desc, mushroomQuantity); -// potionIDSoulCross = loadPropPotionId(LibPotionNames.SOUL_CROSS, potionIDSoulCross); todo 1.8 should be unneeded thanks to potion registry -// potionIDFeatherfeet = loadPropPotionId(LibPotionNames.FEATHER_FEET, potionIDFeatherfeet); -// potionIDEmptiness = loadPropPotionId(LibPotionNames.EMPTINESS, potionIDEmptiness); -// potionIDBloodthirst = loadPropPotionId(LibPotionNames.BLOODTHIRST, potionIDBloodthirst); -// potionIDAllure = loadPropPotionId(LibPotionNames.ALLURE, potionIDAllure); -// potionIDClear = loadPropPotionId(LibPotionNames.CLEAR, potionIDClear); - if(config.hasChanged()) config.save(); } @@ -329,28 +311,6 @@ public final class ConfigHandler { return prop.getBoolean(default_); } - public static int loadPropPotionId(String propName, int default_) { - if(!verifiedPotionArray) - verifyPotionArray(); - - Property prop = config.get(CATEGORY_POTIONS, propName, default_); - int val = prop.getInt(default_); - if(val > potionArrayLimit) { - val = default_; - prop.set(default_); - } - - return val; - } - - private static void verifyPotionArray() { - if(Loader.isModLoaded("DragonAPI")) - potionArrayLimit = Potion.potionTypes.length; - else potionArrayLimit = 127; - - verifiedPotionArray = true; - } - public static class ConfigAdaptor { private boolean enabled; diff --git a/src/main/java/vazkii/botania/common/item/ItemKeepIvy.java b/src/main/java/vazkii/botania/common/item/ItemKeepIvy.java index 34fffa71d..2682d08fc 100644 --- a/src/main/java/vazkii/botania/common/item/ItemKeepIvy.java +++ b/src/main/java/vazkii/botania/common/item/ItemKeepIvy.java @@ -42,7 +42,6 @@ public class ItemKeepIvy extends ItemMod { GameRegistry.addRecipe(new KeepIvyRecipe()); RecipeSorter.register("botania:keepIvy", KeepIvyRecipe.class, Category.SHAPELESS, ""); MinecraftForge.EVENT_BUS.register(this); - FMLCommonHandler.instance().bus().register(this); } @SubscribeEvent diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBaubleCosmetic.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBaubleCosmetic.java index a4f9ccd5e..c7312e803 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBaubleCosmetic.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBaubleCosmetic.java @@ -309,6 +309,7 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble { GlStateManager.scale(f, f, f); } + @SuppressWarnings("deprecation") public void renderIcon(int i) { GlStateManager.pushMatrix(); renderStack.setItemDamage(i); diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java index a24717512..32166c620 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java @@ -130,7 +130,7 @@ public class ItemMagnetRing extends ItemBauble { } public static void addItemToBlackList(String item) { - BLACKLIST.add(item); + BLACKLIST.add(new ResourceLocation(item)); } @Override diff --git a/src/main/java/vazkii/botania/common/item/lens/LensFirework.java b/src/main/java/vazkii/botania/common/item/lens/LensFirework.java index 85f642b34..18608b1c9 100644 --- a/src/main/java/vazkii/botania/common/item/lens/LensFirework.java +++ b/src/main/java/vazkii/botania/common/item/lens/LensFirework.java @@ -61,7 +61,7 @@ public class LensFirework extends Lens { ItemNBTHelper.setCompound(stack, "Explosion", explosion); NBTTagCompound fireworks = new NBTTagCompound(); - fireworks.setInteger("Flight", (int) Math.random() * 3 + 2); + fireworks.setInteger("Flight", (int) (Math.random() * 3 + 2)); // todo 1.8 this bugged in 1.7 to always be 0 (cast before multiplication). is that intended now? NBTTagList explosions = new NBTTagList(); explosions.appendTag(explosion); diff --git a/src/main/java/vazkii/botania/common/lexicon/page/PageEntity.java b/src/main/java/vazkii/botania/common/lexicon/page/PageEntity.java index 9d115f811..db08da15c 100644 --- a/src/main/java/vazkii/botania/common/lexicon/page/PageEntity.java +++ b/src/main/java/vazkii/botania/common/lexicon/page/PageEntity.java @@ -104,7 +104,7 @@ public class PageEntity extends LexiconPage{ public void prepDummy() { if(dummyEntity == null || dummyEntity.isDead) { try { - dummyEntity = (Entity) entityConstructor.newInstance(new Object[] {Minecraft.getMinecraft().theWorld}); + dummyEntity = (Entity) entityConstructor.newInstance(Minecraft.getMinecraft().theWorld); } catch (Exception e) { e.printStackTrace(); }