From a64991b75f188b453ceb1aff292ec81d741d906d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 28 Dec 2015 15:05:56 +0100 Subject: [PATCH] Removed Special Drops and added Solidified Experience as own item --- .../blocks/BlockXPSolidifier.java | 5 +- .../booklet/InitBooklet.java | 3 +- .../crafting/BlockCrafting.java | 5 +- .../crafting/ItemCrafting.java | 10 -- .../creative/CreativeTab.java | 2 +- .../event/LivingDropEvent.java | 13 +-- .../actuallyadditions/items/InitItems.java | 4 +- .../items/ItemSolidifiedExperience.java | 68 ++++++++++++ .../items/ItemSpecialDrop.java | 102 ------------------ .../items/metalists/TheSpecialDrops.java | 44 -------- .../actuallyadditions/ore/InitOreDict.java | 5 - .../recipe/HairyBallHandler.java | 5 +- .../recipe/TreasureChestHandler.java | 3 +- .../tile/TileEntityXPSolidifier.java | 11 +- .../assets/actuallyadditions/lang/en_US.lang | 7 +- .../items/itemSpecialBloodFragment.png | Bin 377 -> 0 bytes .../items/itemSpecialEmeraldShard.png | Bin 395 -> 0 bytes .../textures/items/itemSpecialHeartPart.png | Bin 557 -> 0 bytes .../textures/items/itemSpecialPearlShard.png | Bin 566 -> 0 bytes .../items/itemSpecialSolidifiedExperience.png | Bin 531 -> 0 bytes .../items/itemSpecialUnknownSubstance.png | Bin 631 -> 0 bytes 21 files changed, 89 insertions(+), 198 deletions(-) create mode 100644 src/main/java/ellpeck/actuallyadditions/items/ItemSolidifiedExperience.java delete mode 100644 src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java delete mode 100644 src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialBloodFragment.png delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialEmeraldShard.png delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialHeartPart.png delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialPearlShard.png delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialSolidifiedExperience.png delete mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialUnknownSubstance.png diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java index e9dcca54f..f81c3f616 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java @@ -16,7 +16,6 @@ import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.blocks.base.BlockContainerBase; import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.items.InitItems; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.tile.TileEntityXPSolidifier; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.Util; @@ -134,9 +133,9 @@ public class BlockXPSolidifier extends BlockContainerBase{ int stacks = solidifier.amount/64; int rest = solidifier.amount%64; for(int i = 0; i < stacks; i++){ - this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSpecialDrop, 64, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal())); + this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSolidifiedExperience, 64)); } - this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSpecialDrop, rest, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal())); + this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSolidifiedExperience, rest)); solidifier.amount = 0; } } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java index 95699d8d1..83b7f51df 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java @@ -26,7 +26,6 @@ import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.lens.LensNoneRecipeHandler; import ellpeck.actuallyadditions.items.metalists.TheFoods; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.tile.*; import ellpeck.actuallyadditions.util.Util; import net.minecraft.init.Items; @@ -93,7 +92,7 @@ public class InitBooklet{ new BookletChapter("phantomfaces", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface), new PageTextOnly(1).addTextReplacement("", TileEntityPhantomface.RANGE), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipePhantomface), new PageCrafting(4, BlockCrafting.recipeLiquiface), new PageCrafting(5, BlockCrafting.recipeEnergyface), new PageCrafting(6, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(7, BlockCrafting.recipePhantomBooster)).setImportant(); new BookletChapter("phantomBreaker", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker), new PageTextOnly(1).addTextReplacement("", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText()); new BookletChapter("esd", entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial(); - new BookletChapter("xpSolidifier", entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial(); + new BookletChapter("xpSolidifier", entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSolidifiedExperience)), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial(); new BookletChapter("greenhouseGlass", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass)); new BookletChapter("fishingNet", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText()); new BookletChapter("feeder", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText()); diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java index ceb71971c..eb7d94449 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java @@ -18,7 +18,6 @@ import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheCrystals; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.util.Util; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -211,7 +210,7 @@ public class BlockCrafting{ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSmileyCloud), " W ", "WXW", " W ", 'W', new ItemStack(Blocks.wool, 1, Util.WILDCARD), - 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()))); + 'X', new ItemStack(InitItems.itemSolidifiedExperience))); recipeSmileyCloud = Util.GetRecipes.lastIRecipe(); } @@ -228,7 +227,7 @@ public class BlockCrafting{ if(ConfigCrafting.XP_SOLIDIFIER.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockXPSolidifier), "XXX", "DCD", "XXX", - 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()), + 'X', new ItemStack(InitItems.itemSolidifiedExperience), 'D', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); recipeSolidifier = Util.GetRecipes.lastIRecipe(); diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java index 09f6e8a3e..49971a7d3 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java @@ -405,16 +405,6 @@ public class ItemCrafting{ recipeCoilAdvanced = Util.GetRecipes.lastIRecipe(); } - //Ender Pearl - GameRegistry.addRecipe(new ItemStack(Items.ender_pearl), - "XXX", "XXX", "XXX", - 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.PEARL_SHARD.ordinal())); - - //Emerald - GameRegistry.addRecipe(new ItemStack(Items.emerald), - "XXX", "XXX", "XXX", - 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.EMERALD_SHARD.ordinal())); - //Advanced Leaf Blower if(ConfigCrafting.LEAF_BLOWER_ADVANCED.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced), diff --git a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java index 062553e89..426edf340 100644 --- a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java +++ b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java @@ -172,7 +172,7 @@ public class CreativeTab extends CreativeTabs{ add(InitItems.itemKnife); add(InitItems.itemCrafterOnAStick); add(InitItems.itemDust); - add(InitItems.itemSpecialDrop); + add(InitItems.itemSolidifiedExperience); add(InitItems.itemLeafBlower); add(InitItems.itemLeafBlowerAdvanced); diff --git a/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java b/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java index c4a91c174..4ec5a6b13 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java @@ -14,8 +14,8 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import ellpeck.actuallyadditions.config.values.ConfigBoolValues; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.util.Util; +import net.minecraft.entity.EntityCreature; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.passive.EntityBat; import net.minecraft.entity.player.EntityPlayer; @@ -28,13 +28,10 @@ public class LivingDropEvent{ @SubscribeEvent public void onEntityDropEvent(LivingDropsEvent event){ if(event.source.getEntity() instanceof EntityPlayer){ - //Drop Special Items (Solidified Experience, Pearl Shards etc.) - for(int i = 0; i < TheSpecialDrops.values().length; i++){ - TheSpecialDrops theDrop = TheSpecialDrops.values()[i]; - if(theDrop.canDrop && theDrop.dropFrom.isAssignableFrom(event.entityLiving.getClass())){ - if(Util.RANDOM.nextInt(100)+1 <= theDrop.chance){ - event.entityLiving.entityDropItem(new ItemStack(InitItems.itemSpecialDrop, Util.RANDOM.nextInt(theDrop.maxAmount)+1, theDrop.ordinal()), 0); - } + //Drop Solidified XP + if(event.entityLiving instanceof EntityCreature){ + if(Util.RANDOM.nextInt(15) <= 0){ + event.entityLiving.entityDropItem(new ItemStack(InitItems.itemSolidifiedExperience, Util.RANDOM.nextInt(2)+1), 0); } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java index 411d580af..164969e9d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java +++ b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java @@ -37,7 +37,7 @@ public class InitItems{ public static Item itemKnife; public static Item itemCrafterOnAStick; public static Item itemDust; - public static Item itemSpecialDrop; + public static Item itemSolidifiedExperience; public static Item itemLeafBlower; public static Item itemLeafBlowerAdvanced; @@ -192,7 +192,7 @@ public class InitItems{ itemKnife = new ItemKnife("itemKnife"); itemCrafterOnAStick = new ItemCrafterOnAStick("itemCrafterOnAStick"); itemDust = new ItemDust("itemDust"); - itemSpecialDrop = new ItemSpecialDrop("itemSpecial"); + itemSolidifiedExperience = new ItemSolidifiedExperience("itemSolidifiedExperience"); itemLeafBlower = new ItemLeafBlower(false, "itemLeafBlower"); itemLeafBlowerAdvanced = new ItemLeafBlower(true, "itemLeafBlowerAdvanced"); itemPotionRing = new ItemPotionRing(false, "itemPotionRing"); diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemSolidifiedExperience.java b/src/main/java/ellpeck/actuallyadditions/items/ItemSolidifiedExperience.java new file mode 100644 index 000000000..eb2a90b7a --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemSolidifiedExperience.java @@ -0,0 +1,68 @@ +/* + * This file ("ItemSolidifiedExperience.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015 Ellpeck + */ + +package ellpeck.actuallyadditions.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.items.base.ItemBase; +import ellpeck.actuallyadditions.util.ModUtil; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.item.EntityXPOrb; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemSolidifiedExperience extends ItemBase{ + + public static final int SOLID_XP_AMOUNT = 8; + + public ItemSolidifiedExperience(String name){ + super(name); + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ + if(!world.isRemote){ + if(!player.isSneaking()){ + world.spawnEntityInWorld(new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, SOLID_XP_AMOUNT)); + if(!player.capabilities.isCreativeMode){ + stack.stackSize--; + } + } + else{ + world.spawnEntityInWorld(new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, SOLID_XP_AMOUNT*stack.stackSize)); + if(!player.capabilities.isCreativeMode){ + stack.stackSize = 0; + } + } + } + return stack; + } + + @Override + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.uncommon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconReg){ + this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int pass){ + return this.itemIcon; + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java b/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java deleted file mode 100644 index caa1a1f64..000000000 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * This file ("ItemSpecialDrop.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.items; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.items.base.ItemBase; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; -import ellpeck.actuallyadditions.util.ModUtil; -import ellpeck.actuallyadditions.util.StringUtil; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import java.util.List; - -public class ItemSpecialDrop extends ItemBase{ - - public static final int SOLID_XP_AMOUNT = 8; - - public static final TheSpecialDrops[] allDrops = TheSpecialDrops.values(); - @SideOnly(Side.CLIENT) - public IIcon[] textures; - - public ItemSpecialDrop(String name){ - super(name); - this.setHasSubtypes(true); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1){ - return par1 >= textures.length ? null : textures[par1]; - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ - if(!world.isRemote){ - if(stack.getItemDamage() == TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()){ - if(!player.isSneaking()){ - world.spawnEntityInWorld(new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, SOLID_XP_AMOUNT)); - if(!player.capabilities.isCreativeMode){ - stack.stackSize--; - } - } - else{ - world.spawnEntityInWorld(new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, SOLID_XP_AMOUNT*stack.stackSize)); - if(!player.capabilities.isCreativeMode){ - stack.stackSize = 0; - } - } - } - } - return stack; - } - - @Override - public int getMetadata(int damage){ - return damage; - } - - @Override - public String getUnlocalizedName(ItemStack stack){ - return stack.getItemDamage() >= allDrops.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allDrops[stack.getItemDamage()].name; - } - - @Override - public EnumRarity getRarity(ItemStack stack){ - return stack.getItemDamage() >= allDrops.length ? EnumRarity.common : allDrops[stack.getItemDamage()].rarity; - } - - @SuppressWarnings("all") - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tab, List list){ - for(int j = 0; j < allDrops.length; j++){ - list.add(new ItemStack(this, 1, j)); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.textures = new IIcon[allDrops.length]; - for(int i = 0; i < textures.length; i++){ - textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allDrops[i].name); - } - } -} diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java deleted file mode 100644 index 164483248..000000000 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file ("TheSpecialDrops.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.items.metalists; - -import ellpeck.actuallyadditions.config.values.ConfigBoolValues; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.item.EnumRarity; - -public enum TheSpecialDrops{ - - SOLIDIFIED_EXPERIENCE("SolidifiedExperience", 40, 3, EntityCreature.class, EnumRarity.uncommon, ConfigBoolValues.EXPERIENCE_DROP.isEnabled()), - BLOOD_FRAGMENT("BloodFragment", 15, 1, EntityCreature.class, EnumRarity.uncommon, ConfigBoolValues.BLOOD_DROP.isEnabled()), - HEART_PART("HeartPart", 5, 1, EntityCreature.class, EnumRarity.rare, ConfigBoolValues.HEART_DROP.isEnabled()), - UNKNOWN_SUBSTANCE("UnknownSubstance", 3, 1, EntitySkeleton.class, EnumRarity.epic, ConfigBoolValues.SUBSTANCE_DROP.isEnabled()), - PEARL_SHARD("PearlShard", 30, 3, EntityEnderman.class, EnumRarity.epic, ConfigBoolValues.PEARL_SHARD_DROP.isEnabled()), - EMERALD_SHARD("EmeraldShard", 30, 3, EntityCreeper.class, EnumRarity.rare, ConfigBoolValues.EMERALD_SHARD_CROP.isEnabled()); - - public final String name; - public final int chance; - public final int maxAmount; - public final Class dropFrom; - public final boolean canDrop; - public final EnumRarity rarity; - - TheSpecialDrops(String name, int chance, int maxAmount, Class dropFrom, EnumRarity rarity, boolean canDrop){ - this.name = name; - this.chance = chance; - this.rarity = rarity; - this.maxAmount = maxAmount; - this.dropFrom = dropFrom; - this.canDrop = canDrop; - } -} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java b/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java index 88d6e7f26..37a58a130 100644 --- a/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java +++ b/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java @@ -16,7 +16,6 @@ import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheDusts; import ellpeck.actuallyadditions.items.metalists.TheFoods; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.init.Blocks; @@ -59,10 +58,6 @@ public class InitOreDict{ //For Crafting addOre(InitItems.itemMisc, TheMiscItems.RICE_SLIME.ordinal(), "slimeball"); - //For Compat - addOre(InitItems.itemSpecialDrop, TheSpecialDrops.EMERALD_SHARD.ordinal(), "nuggetEmerald"); - addOre(InitItems.itemSpecialDrop, TheSpecialDrops.PEARL_SHARD.ordinal(), "nuggetEnderpearl"); - //For Crafting addOre(InitItems.itemMisc, TheMiscItems.BLACK_DYE.ordinal(), "dyeBlack"); } diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java index ca46805ae..bbd0f929a 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java @@ -11,7 +11,6 @@ package ellpeck.actuallyadditions.recipe; import ellpeck.actuallyadditions.items.InitItems; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -47,9 +46,7 @@ public class HairyBallHandler{ addReturn(new ItemStack(Blocks.sand), 50); addReturn(new ItemStack(Blocks.vine), 30); addReturn(new ItemStack(Blocks.web), 4); - addReturn(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()), 20); - addReturn(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.EMERALD_SHARD.ordinal()), 10); - addReturn(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.PEARL_SHARD.ordinal()), 10); + addReturn(new ItemStack(InitItems.itemSolidifiedExperience), 20); } public static void addReturn(ItemStack stack, int chance){ diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java index 9d1154882..ff6f929d9 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java @@ -13,7 +13,6 @@ package ellpeck.actuallyadditions.recipe; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheJams; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandom; @@ -32,7 +31,7 @@ public class TreasureChestHandler{ addReturn(new ItemStack(Items.ender_pearl), 10, 1, 2); addReturn(new ItemStack(Items.emerald), 3, 1, 1); addReturn(new ItemStack(Items.experience_bottle), 5, 3, 6); - addReturn(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()), 15, 3, 6); + addReturn(new ItemStack(InitItems.itemSolidifiedExperience), 15, 3, 6); addReturn(new ItemStack(Items.record_11), 1, 1, 1); addReturn(new ItemStack(Items.record_13), 1, 1, 1); addReturn(new ItemStack(Items.record_blocks), 1, 1, 1); diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java index 8293f574b..576319195 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java @@ -12,8 +12,7 @@ package ellpeck.actuallyadditions.tile; import ellpeck.actuallyadditions.items.InitItems; -import ellpeck.actuallyadditions.items.ItemSpecialDrop; -import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; +import ellpeck.actuallyadditions.items.ItemSolidifiedExperience; import ellpeck.actuallyadditions.network.gui.IButtonReactor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -36,7 +35,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I if(this.amount > 0){ if(this.slots[0] == null){ int toSet = this.amount > 64 ? 64 : this.amount; - this.slots[0] = new ItemStack(InitItems.itemSpecialDrop, toSet, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()); + this.slots[0] = new ItemStack(InitItems.itemSolidifiedExperience, toSet); this.amount -= toSet; } else if(this.slots[0].stackSize < 64){ @@ -84,9 +83,9 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I public void onButtonPressed(int buttonID, EntityPlayer player){ if(buttonID < this.buttonAmounts.length){ if(this.getPlayerXP(player) > 0){ - int xp = this.buttonAmounts[buttonID] == -999 ? this.getPlayerXP(player)/ItemSpecialDrop.SOLID_XP_AMOUNT : this.buttonAmounts[buttonID]; - if(this.amount < Short.MAX_VALUE-xp && this.getPlayerXP(player) >= ItemSpecialDrop.SOLID_XP_AMOUNT*xp){ - this.addPlayerXP(player, -(ItemSpecialDrop.SOLID_XP_AMOUNT*xp)); + int xp = this.buttonAmounts[buttonID] == -999 ? this.getPlayerXP(player)/ItemSolidifiedExperience.SOLID_XP_AMOUNT : this.buttonAmounts[buttonID]; + if(this.amount < Short.MAX_VALUE-xp && this.getPlayerXP(player) >= ItemSolidifiedExperience.SOLID_XP_AMOUNT*xp){ + this.addPlayerXP(player, -(ItemSolidifiedExperience.SOLID_XP_AMOUNT*xp)); if(!worldObj.isRemote){ this.amount += xp; } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 30559c9ff..f7505c468 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -280,12 +280,7 @@ item.actuallyadditions.itemMiscCoil.name=Basic Coil item.actuallyadditions.itemMiscCoilAdvanced.name=Advanced Coil item.actuallyadditions.itemPotionRing.name=Ring of item.actuallyadditions.itemPotionRingAdvanced.name=Advanced Ring of -item.actuallyadditions.itemSpecialUnknownSubstance.name=Unknown Substance -item.actuallyadditions.itemSpecialSolidifiedExperience.name=Solidified Experience -item.actuallyadditions.itemSpecialBloodFragment.name=Blood Fragment -item.actuallyadditions.itemSpecialHeartPart.name=Part of a Heart -item.actuallyadditions.itemSpecialPearlShard.name=Ender Pearl Shard -item.actuallyadditions.itemSpecialEmeraldShard.name=Emerald Shard +item.actuallyadditions.itemSolidifiedExperience.name=Solidified Experience item.actuallyadditions.itemDustIron.name=Crushed Iron item.actuallyadditions.itemDustGold.name=Crushed Gold item.actuallyadditions.itemDustDiamond.name=Crushed Diamond diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialBloodFragment.png b/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialBloodFragment.png deleted file mode 100644 index b4fbe1cbce383408d5c7e00fb778452c927c0a3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 377 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP~v#@|9&k}_LJAgv6nIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^Q2ef^i(`nz>7|n#vzQDeTKC&WHTi6u_>m)S3Hye(=d^ds z_C9mX)n8d|LCMwL>jlcO5-is1S2IpkGcJ*1VLJKy-*+dUNz5)$*VD_km#du=nqHh` zd(H29{Ijz)%Y3vLi*_0Y-ff)Ju!|?E!aug{&2JS(VdFg?_p_8rZn^cYpsDqHNa8G? z#9gm<&O8qkxUqk)!UHA2#`D2X{{G0F%em;t_18iI$;}fFG8cqhUVrG}@`p?&Z!f)l z|8fn(hPtXN#eo45b6Dg%e|R!Dh%U2QeQ>t-tj!Jkig>OBH1IM?9MGTjD{_^N>B|OC O2za{sxvX3kU zn0AHF{`dd;V}52~cJ9NcuU*!7^>J52V`HP^mKz`T`$s4=FPy@5xL3YkGVI@v&+~y2 zoRPf3dbeG>dH?@D+G}(c%wE={_wKc*^&}K zaL#_WqlH+)vTiZyf6u>%CnY>eO#Siwsrljcx8)`G#aEyHul03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00EInL_t(I%bk<4ZWBQe zhQC>#@6O~LIT6Sa(naJ%MMFmlo+dPTid13R=jvX31 z+S?cjvC?Rp`9F>3|3_4H7f`^he!s#eL7B)C{||sD5Z^#1Me%d3I-X9`4FCf;QPpi9 zGAW7*AQoXij`CND@*J-c=P}nuY{;D0@85AJ?09)d7s% zn2WmQ?Q+SvwY*p?IByyvdK}zoIn8q$LOOs_N^-f!)4^Rtdpz5D!2Na~aS<4|UWt0Y z8h^#L)M!#NmJvt8M~tIBb6Ma_L(~ra)*FX9fL~1?tw;1t%OI_I@4oT!>N970fpIA# zwr=^_0qn6$+gqaX6(8EKyedm#V|e}JJ9Br*fb@1SRCUX@@ifot!z?2e;ghwzxxVHw z%Q&-^li4itG9Z8vRn0uW8e*Sh831!@L$MzuBdR*wl*W~10G!Nb{UC{*3AQ)ff(y63 v&VHE0D9pCkq@IYs+=4`&6V4O<^Ev+ku2jhn6a^A<00000NkvXXu0mjfB@5%O diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialPearlShard.png b/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialPearlShard.png deleted file mode 100644 index abde59bd995e034dc01e58dca7c5dce01c9f3e15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}P)#UYPN0000ObVXQn zQ*UN;cVTj60B~VxZgehgWpp4kE-)@NWrZ?j0004@Nkl7J{S(hbMshnthW7vylM38;7}NUmBdxzYQDb~X)w8acV8SJXjCcZGQ$Dk!SA$Ec z-vv~^AF%?e4bQ~@`FNdS6lJNvct+7mw?k{EM^wJuQV)9Ueo7*s}mfsqda_6#(?6W}P0#h}1&p|wH9ofef2cLfxfYb0o7 z;2Iz}lg(2{XTV~x-4YnUyk?#cOmbM>pF88y8lbc7im>h1!5Z@WgA)+4mvBZW3*v01 zWAzn<5-#dQd@cs=XS7Bz0SKcw(dzAUDzKdvvRn@57mf*jBm^t}#zGzTOCjPAig;uT z0CsB@XP)Z_}I0000ObVXQn zQ*UN;cVTj60B~VxZgehgWpp4kE-)@NWrZ?j0004gNklKMTH*zjfiU26Qo)Hpji+-s4R@YihLAAgCNp;glIvNC>r!D8aHUraCO%4-m>l~ z3c9d3hkN$=_S*L$0NDSaCR4(^8V+q5HJVLX06ODWSs;d84;bDZz+^g%@l*t(d;J(n zMwLd?eo&VD0H7&e?8bK4g_E0Rq-suNuUfHi7C|f@3v;?uxj81J9J=nQ)WA508>&IRzfJGa! zE46mv!)o5IR(9uEy4EHEF16Pt;OvZFyc3^9AWhrlP8?L*^#ECDpGt?YoC_#Z^+lle zS_drUg37d2@<@mqd_#JGoSWSg;8~#ZR0nW``kV10Aya4p<$H(YyAgPg3087`^-a)h z0aPBGEwRI(dT@+P6W2tk3-N+iB`{~#0w@C5fuh0O(`cAk_q$J7qxa5+{_AfP;tjK7 VK0ZZdf=~be002ovPDHLkV1o3<+Oq%v diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialUnknownSubstance.png b/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialUnknownSubstance.png deleted file mode 100644 index b58d8cfebba92153abeb3c9f871b5b626850b6d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 631 zcmV--0*L*IP)WFU8GbZ8()Nlj2>E@cM*00G-cL_t(I%f*vFXj4%X z#(($So0m2(Z4*;NX^K!BN*%gntwRTgg5sa4VmJ4SgG(J91Q)js4#hf%1ROGmn+_Qz zie20bPb#5D2!y}2$87)=Wf;u#O;`_4Jv`40T=5aW`jQYnrUxo-O;0yPGlSzcQ4 zbFIZ;N*n5DPa;vjf#vejN<4pUn|^Patk&2@$m&Zx+#Px93dfz}OIzExJ)3q28E=vx zh>(e(`)U`!G`+eMu4_gnFqKO2YPI0syR(UBdSsm(J)=010}j9SiH-zwYd6WY0#V&3 z{dF1%@L}y-uyywq`AmXNl0a!RAE1Yt#_IwsT_lwx7wg2=@A`(M7kdoZGbj1p|? z5R^fRd8P(}q%0{+J2(@9g9(d%Xk$8h1ZM%%n;rFdr$!Q;XAmqhsk0Q7PeFeoFFsS6 zQOuRkkS|UV&N=`cQ>lnQt`MdXv8@O#MJg3CO!#37JS(LYbV;Iw?@w!{>D5a^A+2Mh z=z6oG9zJ_ZJ56X01U@!trc7uY0>Ib??@5iZR~V9*2J#~4>$k5ECJ+gmG=`ZZ<>2`v z|NY0;C2^XOgzFA?;R;}IdGm&FvLSEw_5f%!_GiW4Jjv?Dy1%-y?*H>|{0XqJ%%