From 4a4166fe7ec7845415a2ad24f3f9341d349987f2 Mon Sep 17 00:00:00 2001 From: LexManos Date: Sun, 21 Oct 2012 10:00:02 -0700 Subject: [PATCH] Update for new names in 1.4 --- client/net/minecraftforge/client/ForgeHooksClient.java | 8 ++++---- .../net/minecraftforge/client/event/TextureLoadEvent.java | 6 +++--- .../event/entity/player/PlayerDropsEvent.java | 2 +- common/net/minecraftforge/oredict/ShapedOreRecipe.java | 3 ++- common/net/minecraftforge/oredict/ShapelessOreRecipe.java | 3 ++- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/client/net/minecraftforge/client/ForgeHooksClient.java b/client/net/minecraftforge/client/ForgeHooksClient.java index 80aeed04c..9cf3cac45 100644 --- a/client/net/minecraftforge/client/ForgeHooksClient.java +++ b/client/net/minecraftforge/client/ForgeHooksClient.java @@ -14,6 +14,7 @@ import net.minecraft.src.Block; import net.minecraft.src.EntityItem; import net.minecraft.src.EntityLiving; import net.minecraft.src.EntityPlayer; +import net.minecraft.src.ITexturePack; import net.minecraft.src.Item; import net.minecraft.src.ItemBlock; import net.minecraft.src.ItemStack; @@ -23,7 +24,6 @@ import net.minecraft.src.RenderBlocks; import net.minecraft.src.RenderEngine; import net.minecraft.src.RenderGlobal; import net.minecraft.src.Tessellator; -import net.minecraft.src.TexturePackBase; import net.minecraftforge.client.event.DrawBlockHighlightEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.client.event.TextureLoadEvent; @@ -298,7 +298,7 @@ public class ForgeHooksClient if(inColor) { - int color = Item.itemsList[item.itemID].getColorFromDamage(item.getItemDamage(), 0); + int color = Item.itemsList[item.itemID].func_82790_a(item, 0); float r = (float)(color >> 16 & 0xff) / 255F; float g = (float)(color >> 8 & 0xff) / 255F; float b = (float)(color & 0xff) / 255F; @@ -319,7 +319,7 @@ public class ForgeHooksClient if (inColor) { - int color = Item.itemsList[item.itemID].getColorFromDamage(item.getItemDamage(), 0); + int color = Item.itemsList[item.itemID].func_82790_a(item, 0); float r = (float)(color >> 16 & 255) / 255.0F; float g = (float)(color >> 8 & 255) / 255.0F; float b = (float)(color & 255) / 255.0F; @@ -384,7 +384,7 @@ public class ForgeHooksClient MinecraftForge.EVENT_BUS.post(new RenderWorldLastEvent(context, partialTicks)); } - public static void onTextureLoad(String texture, TexturePackBase pack) + public static void onTextureLoad(String texture, ITexturePack pack) { MinecraftForge.EVENT_BUS.post(new TextureLoadEvent(texture, pack)); } diff --git a/client/net/minecraftforge/client/event/TextureLoadEvent.java b/client/net/minecraftforge/client/event/TextureLoadEvent.java index 06e31b58c..96b313c06 100644 --- a/client/net/minecraftforge/client/event/TextureLoadEvent.java +++ b/client/net/minecraftforge/client/event/TextureLoadEvent.java @@ -1,15 +1,15 @@ package net.minecraftforge.client.event; -import net.minecraft.src.TexturePackBase; +import net.minecraft.src.ITexturePack; import net.minecraftforge.event.Event; public class TextureLoadEvent extends Event { public final String texture; - public final TexturePackBase pack; + public final ITexturePack pack; - public TextureLoadEvent(String texture, TexturePackBase pack) + public TextureLoadEvent(String texture, ITexturePack pack) { this.texture = texture; this.pack = pack; diff --git a/common/net/minecraftforge/event/entity/player/PlayerDropsEvent.java b/common/net/minecraftforge/event/entity/player/PlayerDropsEvent.java index 106093283..5fec2d063 100644 --- a/common/net/minecraftforge/event/entity/player/PlayerDropsEvent.java +++ b/common/net/minecraftforge/event/entity/player/PlayerDropsEvent.java @@ -27,7 +27,7 @@ public class PlayerDropsEvent extends LivingDropsEvent { super(entity, source, drops, (source.getEntity() instanceof EntityPlayer) ? - EnchantmentHelper.getLootingModifier(((EntityPlayer)source.getEntity()).inventory) : 0, + EnchantmentHelper.getLootingModifier(((EntityPlayer)source.getEntity())) : 0, recentlyHit, 0); this.entityPlayer = entity; diff --git a/common/net/minecraftforge/oredict/ShapedOreRecipe.java b/common/net/minecraftforge/oredict/ShapedOreRecipe.java index eb04970a0..e1c0e5aa0 100644 --- a/common/net/minecraftforge/oredict/ShapedOreRecipe.java +++ b/common/net/minecraftforge/oredict/ShapedOreRecipe.java @@ -9,6 +9,7 @@ import net.minecraft.src.InventoryCrafting; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.ShapedRecipes; +import net.minecraft.src.World; public class ShapedOreRecipe implements IRecipe { @@ -124,7 +125,7 @@ public class ShapedOreRecipe implements IRecipe public ItemStack getRecipeOutput(){ return output; } @Override - public boolean matches(InventoryCrafting inv) + public boolean matches(InventoryCrafting inv, World world) { for (int x = 0; x <= MAX_CRAFT_GRID_WIDTH - width; x++) { diff --git a/common/net/minecraftforge/oredict/ShapelessOreRecipe.java b/common/net/minecraftforge/oredict/ShapelessOreRecipe.java index 9e8365a7d..626d01f32 100644 --- a/common/net/minecraftforge/oredict/ShapelessOreRecipe.java +++ b/common/net/minecraftforge/oredict/ShapelessOreRecipe.java @@ -10,6 +10,7 @@ import net.minecraft.src.InventoryCrafting; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.ShapelessRecipes; +import net.minecraft.src.World; public class ShapelessOreRecipe implements IRecipe { @@ -63,7 +64,7 @@ public class ShapelessOreRecipe implements IRecipe public ItemStack getCraftingResult(InventoryCrafting var1){ return output.copy(); } @Override - public boolean matches(InventoryCrafting var1) + public boolean matches(InventoryCrafting var1, World world) { ArrayList required = new ArrayList(input);