From ee6448b65d2fd0a6f97508e1f5a99005a7ff35c5 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Fri, 1 Aug 2014 19:30:43 +0200 Subject: [PATCH] After a lot of work, MobHeads are back! At least the items themselves + rendering. --- .../IguanaTweaksTConstruct.java | 2 + .../mobheads/IguanaMobHeads.java | 48 ++++++ .../mobheads/blocks/IguanaSkullBlock.java | 23 +++ .../mobheads/items/IguanaSkull.java | 150 ++++++++++++++++++ .../mobheads/proxy/MobHeadClientProxy.java | 12 ++ .../mobheads/proxy/MobHeadCommonProxy.java | 10 ++ .../IguanaTileEntitySkullRenderer.java | 100 ++++++++++++ .../renderers/RenderPlayerHandler.java | 25 +++ .../tileentities/IguanaSkullTileEntity.java | 9 ++ .../old/IguanaBlocks.java | 8 +- .../old/IguanaItems.java | 14 +- .../old/tweaks/ModifierTweaks.java | 4 +- 12 files changed, 392 insertions(+), 13 deletions(-) create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/IguanaMobHeads.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/blocks/IguanaSkullBlock.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/items/IguanaSkull.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadClientProxy.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadCommonProxy.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/IguanaTileEntitySkullRenderer.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/RenderPlayerHandler.java create mode 100644 src/main/java/iguanaman/iguanatweakstconstruct/mobheads/tileentities/IguanaSkullTileEntity.java diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/IguanaTweaksTConstruct.java b/src/main/java/iguanaman/iguanatweakstconstruct/IguanaTweaksTConstruct.java index 1bb0b05..36e4f0e 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/IguanaTweaksTConstruct.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/IguanaTweaksTConstruct.java @@ -15,6 +15,7 @@ import iguanaman.iguanatweakstconstruct.leveling.IguanaToolLeveling; import iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool; import iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP; import iguanaman.iguanatweakstconstruct.leveling.commands.debug; +import iguanaman.iguanatweakstconstruct.mobheads.IguanaMobHeads; import iguanaman.iguanatweakstconstruct.proxy.CommonProxy; import iguanaman.iguanatweakstconstruct.reference.Config; import iguanaman.iguanatweakstconstruct.reference.Reference; @@ -87,6 +88,7 @@ public class IguanaTweaksTConstruct { pulsar.registerPulse(new IguanaHarvestLevelTweaks()); pulsar.registerPulse(new IguanaToolLeveling()); pulsar.registerPulse(new IguanaToolPartReplacing()); + pulsar.registerPulse(new IguanaMobHeads()); pulsar.registerPulse(new IguanaItems()); pulsar.registerPulse(new IguanaTweaks()); pulsar.preInit(event); diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/IguanaMobHeads.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/IguanaMobHeads.java new file mode 100644 index 0000000..3c2d267 --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/IguanaMobHeads.java @@ -0,0 +1,48 @@ +package iguanaman.iguanatweakstconstruct.mobheads; + +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import iguanaman.iguanatweakstconstruct.mobheads.blocks.IguanaSkullBlock; +import iguanaman.iguanatweakstconstruct.mobheads.items.IguanaSkull; +import iguanaman.iguanatweakstconstruct.mobheads.proxy.MobHeadCommonProxy; +import iguanaman.iguanatweakstconstruct.mobheads.renderers.RenderPlayerHandler; +import iguanaman.iguanatweakstconstruct.mobheads.tileentities.IguanaSkullTileEntity; +import iguanaman.iguanatweakstconstruct.reference.Reference; +import mantle.pulsar.pulse.Handler; +import mantle.pulsar.pulse.Pulse; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraftforge.common.MinecraftForge; + +/** + * Adds additional MobHeads and controls MobHead dropping. + */ +@Pulse(id = Reference.PULSE_MOBHEADS, description = "Adds additional MobHeads and control over MobHead drops.") +public class IguanaMobHeads { + public static Item skullItem; + public static Block skullBlock; + + @SidedProxy(clientSide = "iguanaman.iguanatweakstconstruct.mobheads.proxy.MobHeadClientProxy", serverSide = "iguanaman.iguanatweakstconstruct.mobheads.proxy.MobHeadCommonProxy") + public static MobHeadCommonProxy proxy; + + @Handler + public void preInit(FMLPreInitializationEvent event) + { + proxy.initialize(); + + skullItem = new IguanaSkull(); + GameRegistry.registerItem(skullItem, "SkullItem"); + + skullBlock = new IguanaSkullBlock().setHardness(1.0F).setStepSound(Block.soundTypeSand).setBlockName("skullItem").setBlockTextureName("skullItem"); + GameRegistry.registerBlock(skullBlock, "SkullBlock"); + GameRegistry.registerTileEntity(IguanaSkullTileEntity.class, "SkullEntity"); + } + + @Handler + public void postInit(FMLPostInitializationEvent event) + { + MinecraftForge.EVENT_BUS.register(new RenderPlayerHandler()); + } +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/blocks/IguanaSkullBlock.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/blocks/IguanaSkullBlock.java new file mode 100644 index 0000000..bb6498d --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/blocks/IguanaSkullBlock.java @@ -0,0 +1,23 @@ +package iguanaman.iguanatweakstconstruct.mobheads.blocks; + +import iguanaman.iguanatweakstconstruct.mobheads.tileentities.IguanaSkullTileEntity; +import net.minecraft.block.BlockSkull; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class IguanaSkullBlock extends BlockSkull { + + public IguanaSkullBlock() { + super(); + } + + /** + * Returns a new instance of a block's tile entity class. Called on placing the block. + */ + @Override + public TileEntity createNewTileEntity(World world, int metadata) + { + return new IguanaSkullTileEntity(); + } + +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/items/IguanaSkull.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/items/IguanaSkull.java new file mode 100644 index 0000000..1ca8d7c --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/items/IguanaSkull.java @@ -0,0 +1,150 @@ +package iguanaman.iguanatweakstconstruct.mobheads.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import iguanaman.iguanatweakstconstruct.mobheads.IguanaMobHeads; +import iguanaman.iguanatweakstconstruct.reference.Reference; +import net.minecraft.block.BlockSkull; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntitySkull; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import java.util.List; + +public class IguanaSkull extends net.minecraft.item.ItemSkull { + public static final int META_ZOMBIE = 2; + public static final int META_SKELETON = 0; + public static final int META_ENDERMAN = 5; + public static final int META_PIGMAN = 6; + public static final int META_BLAZE = 7; + public static final int META_STEVE = 3; + public static final int META_CREEPER = 4; + + private static final String[] skullTypes = new String[] {"enderman", "pigman", "blaze"}; + public static final String[] field_94587_a = new String[] {"skull_enderman", "skull_pigman", "skull_blaze"}; + + @SideOnly(Side.CLIENT) + private IIcon field_94586_c []; + + public IguanaSkull() { + super(); + this.setContainerItem(Items.skull); + } + + /** + * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have + * different names based on their damage or NBT. + */ + @Override + public String getUnlocalizedName(ItemStack par1ItemStack) + { + int i = par1ItemStack.getItemDamage(); + + if (i < 0 || i >= skullTypes.length) + i = 0; + + return Reference.resource(field_94587_a[i]); + } + + /** + * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) + */ + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings({ "unchecked", "rawtypes" }) + public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) + { + for (int j = 0; j < skullTypes.length; ++j) + par3List.add(new ItemStack(par1, 1, j)); + } + + /** + * Gets an icon index based on an item's damage value + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) + { + if (par1 < 0 || par1 >= skullTypes.length) + par1 = 0; + + return field_94586_c[par1]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister par1IconRegister) + { + field_94586_c = new IIcon[field_94587_a.length]; + + for (int i = 0; i < field_94587_a.length; ++i) + field_94586_c[i] = par1IconRegister.registerIcon(Reference.resource(field_94587_a[i])); + } + + @Override + public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { + return armorType == 0; // 0 = helmet + } + + + // copy'n'paste of the ItemSkull method, but places our own skull instead of the vanilla one + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { + if (p_77648_7_ == 0) { + return false; + } else if (!p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_).getMaterial().isSolid()) { + return false; + } else { + if (p_77648_7_ == 1) { + ++p_77648_5_; + } + + if (p_77648_7_ == 2) { + --p_77648_6_; + } + + if (p_77648_7_ == 3) { + ++p_77648_6_; + } + + if (p_77648_7_ == 4) { + --p_77648_4_; + } + + if (p_77648_7_ == 5) { + ++p_77648_4_; + } + + if (!p_77648_3_.isRemote) { + p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, IguanaMobHeads.skullBlock, p_77648_7_, 2); + int i1 = 0; + + if (p_77648_7_ == 1) { + i1 = MathHelper.floor_double((double) (p_77648_2_.rotationYaw * 16.0F / 360.0F) + 0.5D) & 15; + } + + TileEntity tileentity = p_77648_3_.getTileEntity(p_77648_4_, p_77648_5_, p_77648_6_); + + if (tileentity != null && tileentity instanceof TileEntitySkull) { + + ((TileEntitySkull) tileentity).func_152107_a(p_77648_1_.getItemDamage()); + + ((TileEntitySkull) tileentity).func_145903_a(i1); + ((BlockSkull) IguanaMobHeads.skullBlock).func_149965_a(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, (TileEntitySkull) tileentity); + } + + --p_77648_1_.stackSize; + } + + return true; + } + } +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadClientProxy.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadClientProxy.java new file mode 100644 index 0000000..d5f03b9 --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadClientProxy.java @@ -0,0 +1,12 @@ +package iguanaman.iguanatweakstconstruct.mobheads.proxy; + +import cpw.mods.fml.client.registry.ClientRegistry; +import iguanaman.iguanatweakstconstruct.mobheads.renderers.IguanaTileEntitySkullRenderer; +import iguanaman.iguanatweakstconstruct.mobheads.tileentities.IguanaSkullTileEntity; + +public class MobHeadClientProxy extends MobHeadCommonProxy { + @Override + public void initialize() { + ClientRegistry.bindTileEntitySpecialRenderer(IguanaSkullTileEntity.class, IguanaTileEntitySkullRenderer.renderer); + } +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadCommonProxy.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadCommonProxy.java new file mode 100644 index 0000000..0407018 --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/proxy/MobHeadCommonProxy.java @@ -0,0 +1,10 @@ +package iguanaman.iguanatweakstconstruct.mobheads.proxy; + +import cpw.mods.fml.common.network.IGuiHandler; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +public class MobHeadCommonProxy { + + public void initialize() {} +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/IguanaTileEntitySkullRenderer.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/IguanaTileEntitySkullRenderer.java new file mode 100644 index 0000000..7b8eea2 --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/IguanaTileEntitySkullRenderer.java @@ -0,0 +1,100 @@ +package iguanaman.iguanatweakstconstruct.mobheads.renderers; + +import com.mojang.authlib.minecraft.MinecraftProfileTexture; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.client.model.ModelSkeletonHead; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.client.renderer.tileentity.TileEntitySkullRenderer; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntitySkull; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import java.util.Map; + +public class IguanaTileEntitySkullRenderer extends TileEntitySpecialRenderer { + public static IguanaTileEntitySkullRenderer renderer = new IguanaTileEntitySkullRenderer(); + + private ModelSkeletonHead modelSkull = new ModelSkeletonHead(0,0,64,32); // standard skull model + private ModelSkeletonHead modelZombie = new ModelSkeletonHead(0,0,64,64); // zombie skull model + + private ResourceLocation[] textures = new ResourceLocation[] { + new ResourceLocation("textures/entity/enderman/enderman.png"), + new ResourceLocation("textures/entity/zombie_pigman.png"), + new ResourceLocation("textures/entity/blaze.png") + }; + + public IguanaTileEntitySkullRenderer() + { + this.func_147497_a(TileEntityRendererDispatcher.instance); + } + + + + @Override + public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float f) { + if(!(entity instanceof TileEntitySkull)) + return; + TileEntitySkull entitySkull = (TileEntitySkull)entity; + + float r = (entitySkull.func_145906_b() * 360) / 16.0F; + renderSkull((float)x, (float)y, (float)z, r, entitySkull.getBlockMetadata(), entitySkull.func_145904_a()); + } + + public void renderSkull(float x, float y, float z, float r, int sidePlacement, int meta) + { + ModelSkeletonHead model = modelSkull; + // chose model + if(meta == 1) + model = modelZombie; + + // chose texture + this.bindTexture(textures[meta]); + + + // begin rendering + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_CULL_FACE); + + + if (sidePlacement != 1) + { + switch (sidePlacement) + { + case 2: + GL11.glTranslatef(x + 0.5F, y + 0.25F, z + 0.74F); + break; + case 3: + GL11.glTranslatef(x + 0.5F, y + 0.25F, z + 0.26F); + r = 180.0F; + break; + case 4: + GL11.glTranslatef(x + 0.74F, y + 0.25F, z + 0.5F); + r = 270.0F; + break; + case 5: + default: + GL11.glTranslatef(x + 0.26F, y + 0.25F, z + 0.5F); + r = 90.0F; + } + } + else + { + GL11.glTranslatef(x + 0.5F, y, z + 0.5F); + } + + + float f4 = 0.0625F; + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glScalef(-1.0F, -1.0F, 1.0F); + GL11.glEnable(GL11.GL_ALPHA_TEST); + + model.render(null, 0.0f, 0.0f, 0.0f, r, 0.0f, f4); + + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/RenderPlayerHandler.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/RenderPlayerHandler.java new file mode 100644 index 0000000..9b77965 --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/renderers/RenderPlayerHandler.java @@ -0,0 +1,25 @@ +package iguanaman.iguanatweakstconstruct.mobheads.renderers; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import iguanaman.iguanatweakstconstruct.mobheads.IguanaMobHeads; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.event.RenderPlayerEvent; +import org.lwjgl.opengl.GL11; + +public class RenderPlayerHandler { + @SubscribeEvent + public void renderSkullHelmet(RenderPlayerEvent.SetArmorModel event) + { + ItemStack itemStack = event.entityPlayer.inventory.armorItemInSlot(3); + if(itemStack == null || itemStack.getItem() != IguanaMobHeads.skullItem) + return; + + GL11.glPushMatrix(); + event.renderer.modelBipedMain.bipedHead.postRender(0.0625F); + float f1 = 1.0625F; + GL11.glScalef(f1, -f1, -f1); + IguanaTileEntitySkullRenderer.renderer.renderSkull(-0.5f, 0.0f, -0.5f, 180.0f, 1, itemStack.getItemDamage()); + //TileEntitySkullRenderer.field_147536_b.func_152674_a(-0.5F, 0.0F, -0.5F, 1, 00.0F, 0, null); + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/tileentities/IguanaSkullTileEntity.java b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/tileentities/IguanaSkullTileEntity.java new file mode 100644 index 0000000..b7e19bd --- /dev/null +++ b/src/main/java/iguanaman/iguanatweakstconstruct/mobheads/tileentities/IguanaSkullTileEntity.java @@ -0,0 +1,9 @@ +package iguanaman.iguanatweakstconstruct.mobheads.tileentities; + +import net.minecraft.tileentity.TileEntitySkull; + +public class IguanaSkullTileEntity extends TileEntitySkull { + + public IguanaSkullTileEntity() {} + +} diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaBlocks.java b/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaBlocks.java index 8e990ab..62a13e6 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaBlocks.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaBlocks.java @@ -36,11 +36,11 @@ public class IguanaBlocks { //SKULLS - Log.info("Adding skull blocks"); + Log.info("Adding skullItem blocks"); // TODO: Find a way to change vanilla skulls - /*Blocks.skull = null; - newSkullBlock = new IguanaBlockSkull().setHardness(1.0F).setStepSound(Block.soundTypeSand).setBlockName("skull").setBlockTextureName("skull"); - Blocks.skull = newSkullBlock; + /*Blocks.skullItem = null; + newSkullBlock = new IguanaBlockSkull().setHardness(1.0F).setStepSound(Block.soundTypeSand).setBlockName("skullItem").setBlockTextureName("skullItem"); + Blocks.skullItem = newSkullBlock; GameRegistry.registerBlock(newSkullBlock, "Skull"); GameRegistry.registerTileEntity(IguanaTileEntitySkull.class, "SkullEntity");*/ diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaItems.java b/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaItems.java index 1dbd59c..e9457b5 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaItems.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/old/IguanaItems.java @@ -115,13 +115,13 @@ public class IguanaItems { ToolBuilder.addCustomToolRecipe(new BowRecipe(TinkerTools.toolRod, TinkerTools.bowstring, TinkerTools.toolRod, TinkerTools.shortbow)); //SKULL ITEM - Log.info("Adding skull item"); - // TODO: find a way to replace vanilla skull - /*Item.itemsList[Item.skull.itemID] = null; - Item.skull = new IguanaItemSkull(141).setUnlocalizedName("skull").setTextureName("skull"); - LanguageRegistry.addName(new ItemStack(Item.skull, 1, 5), "Enderman Head"); - LanguageRegistry.addName(new ItemStack(Item.skull, 1, 6), "Zombie Pigman Head"); - LanguageRegistry.addName(new ItemStack(Item.skull, 1, 7), "Blaze Head");*/ + Log.info("Adding skullItem item"); + // TODO: find a way to replace vanilla skullItem + /*Item.itemsList[Item.skullItem.itemID] = null; + Item.skullItem = new IguanaItemSkull(141).setUnlocalizedName("skullItem").setTextureName("skullItem"); + LanguageRegistry.addName(new ItemStack(Item.skullItem, 1, 5), "Enderman Head"); + LanguageRegistry.addName(new ItemStack(Item.skullItem, 1, 6), "Zombie Pigman Head"); + LanguageRegistry.addName(new ItemStack(Item.skullItem, 1, 7), "Blaze Head");*/ //COBALT ARMOR diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/old/tweaks/ModifierTweaks.java b/src/main/java/iguanaman/iguanatweakstconstruct/old/tweaks/ModifierTweaks.java index 896e1d7..31dc4df 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/old/tweaks/ModifierTweaks.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/old/tweaks/ModifierTweaks.java @@ -63,9 +63,9 @@ public class ModifierTweaks if (IguanaConfig.partReplacement) ModifyBuilder.registerModifier(new IguanaModUpgrade()); ModifyBuilder.registerModifier(new IguanaModRepair()); - // TODO: Find a way to replace vanilla skull + // TODO: Find a way to replace vanilla skullItem /*if (!IguanaIguanaConfig.toolLevelingRandomBonuses) - ModifyBuilder.registerModifier(new ModExtraModifier(new ItemStack[] { new ItemStack(Items.sk, 1, 6), new ItemStack(Item.skull, 1, 7) }, "Tier2Free"));*/ + ModifyBuilder.registerModifier(new ModExtraModifier(new ItemStack[] { new ItemStack(Items.sk, 1, 6), new ItemStack(Item.skullItem, 1, 7) }, "Tier2Free"));*/ ModifyBuilder.registerModifier(new ModInteger(new ItemStack[] { new ItemStack(TinkerTools.materials, 1, 6) }, 4, "Moss", IguanaConfig.mossRepairSpeed, "\u00a72", "Auto-Repair")); ModifyBuilder.registerModifier(new ModDurability(new ItemStack[] { new ItemStack(Items.emerald) }, 1, 0, 0.5f, TConstructRegistry.getMaterial("Bronze").harvestLevel(), "Emerald", "\u00a72Durability +50%", "\u00a72"));