diff --git a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java index 6cfb95643..bc3672dba 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java +++ b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java @@ -19,7 +19,7 @@ public class RenderPlayerEventAA{ @SubscribeEvent(priority = EventPriority.HIGHEST) public void RenderPlayerEvent(RenderPlayerEvent.Pre event){ - if(!event.entityPlayer.isInvisible()){ + if(!event.entityPlayer.isInvisible() && !event.entityPlayer.getHideCape()){ //Ellpeck if(event.entityPlayer.getUniqueID().equals(UUID.fromString("3f9f4a94-95e3-40fe-8895-e8e3e84d1468"))){ ellpeckRender.render(event.entityPlayer, event.partialRenderTick, 0.3F, 1F); diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java index 498d41b93..21d05f353 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java @@ -1,8 +1,11 @@ package ellpeck.actuallyadditions.items.tools; + import com.google.common.collect.Sets; import cpw.mods.fml.common.eventhandler.Event; +import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.KeyUtil; @@ -12,9 +15,7 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemTool; +import net.minecraft.item.*; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; @@ -28,9 +29,9 @@ import java.util.Set; @SuppressWarnings("unchecked") public class ItemAllToolAA extends ItemTool implements INameableItem{ - public static final Set axeSet = Sets.newHashSet(Blocks.planks, Blocks.bookshelf, Blocks.log, Blocks.log2, Blocks.chest, Blocks.pumpkin, Blocks.lit_pumpkin); - public static final Set pickSet = Sets.newHashSet(Blocks.cobblestone, Blocks.double_stone_slab, Blocks.stone_slab, Blocks.stone, Blocks.sandstone, Blocks.mossy_cobblestone, Blocks.iron_ore, Blocks.iron_block, Blocks.coal_ore, Blocks.gold_block, Blocks.gold_ore, Blocks.diamond_ore, Blocks.diamond_block, Blocks.ice, Blocks.netherrack, Blocks.lapis_ore, Blocks.lapis_block, Blocks.redstone_ore, Blocks.lit_redstone_ore, Blocks.rail, Blocks.detector_rail, Blocks.golden_rail, Blocks.activator_rail); - public static final Set shovelSet = Sets.newHashSet(Blocks.grass, Blocks.dirt, Blocks.sand, Blocks.gravel, Blocks.snow_layer, Blocks.snow, Blocks.clay, Blocks.farmland, Blocks.soul_sand, Blocks.mycelium); + public static final Set axeSet = ReflectionHelper.getPrivateValue(ItemAxe.class, (ItemAxe)InitItems.itemAxeEmerald, 0); + public static final Set pickSet = ReflectionHelper.getPrivateValue(ItemPickaxe.class, (ItemPickaxe)InitItems.itemPickaxeEmerald, 0); + public static final Set shovelSet = ReflectionHelper.getPrivateValue(ItemSpade.class, (ItemSpade)InitItems.itemShovelEmerald, 0); private static final Set allSet = Sets.newHashSet(); static{ @@ -42,14 +43,12 @@ public class ItemAllToolAA extends ItemTool implements INameableItem{ private String name; private EnumRarity rarity; private ItemStack repairItem; - private String oredictName; public ItemAllToolAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(5.0F, toolMat, allSet); this.repairItem = repairItem; this.name = unlocalizedName; - this.oredictName = unlocalizedName; this.rarity = rarity; this.setMaxDamage(this.getMaxDamage()*4); @@ -127,10 +126,6 @@ public class ItemAllToolAA extends ItemTool implements INameableItem{ return name; } - private String getOredictName(){ - return oredictName; - } - @Override public Set getToolClasses(ItemStack stack){ HashSet hashSet = new HashSet(); @@ -139,4 +134,4 @@ public class ItemAllToolAA extends ItemTool implements INameableItem{ hashSet.add("shovel"); return hashSet; } -} +} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java index c3f31cd92..07ac90f07 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java @@ -21,14 +21,12 @@ public class ItemAxeAA extends ItemAxe implements INameableItem{ private String name; private EnumRarity rarity; private ItemStack repairItem; - private String oredictName; public ItemAxeAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(toolMat); this.name = unlocalizedName; this.rarity = rarity; this.repairItem = repairItem; - this.oredictName = name; } @Override @@ -67,8 +65,4 @@ public class ItemAxeAA extends ItemAxe implements INameableItem{ public String getName(){ return name; } - - private String getOredictName(){ - return oredictName; - } }