Inital update to 1.4.6, Version bumped to 6.5

This commit is contained in:
LexManos 2012-12-17 22:33:28 -08:00
parent 420e04f1b9
commit a2f4a0d2dd
70 changed files with 761 additions and 744 deletions

View file

@ -251,7 +251,8 @@ public class ForgeHooksClient
float scale = (renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2 ? 0.5F : 0.25F);
GL11.glScalef(scale, scale, scale);
int size = entity.item.stackSize;
int size = item.stackSize;
int count = (size > 20 ? 4 : (size > 5 ? 3 : (size > 1 ? 2 : 1)));
for(int j = 0; j < count; j++)

View file

@ -1,12 +1,11 @@
package net.minecraftforge.client;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.WorldClient;
//To-Do: Rename this to something more generic.. IRenderHandler?
public abstract class SkyProvider
public abstract class IRenderHandler
{
@SideOnly(Side.CLIENT)
public abstract void render(float partialTicks, WorldClient world, Minecraft mc);

View file

@ -1,83 +1,84 @@
#Main Forge Access Transformer configuration file
# RailLogic.getNAdjacentTracks
public all.a(Lall;)I #MD:RailLogic/func_73650_a
public als.a(Lals;)I #MD:RailLogic/func_73650_a
# Tessellator
public-f bao.a #FD:Tessellator/field_78398_a #instance
public bao.u #FD:Tessellator/field_78409_u #drawMode
public bao.v #FD:Tessellator/field_78408_v #xOffset
public bao.w #FD:Tessellator/field_78407_w #yOffset
public bao.x #FD:Tessellator/field_78417_x #zOffset
public bao.z #FD:Tessellator/field_78415_z #isDrawing
public-f baz.a #FD:Tessellator/field_78398_a #instance
public baz.u #FD:Tessellator/field_78409_u #drawMode
public baz.v #FD:Tessellator/field_78408_v #xOffset
public baz.w #FD:Tessellator/field_78407_w #yOffset
public baz.x #FD:Tessellator/field_78417_x #zOffset
public baz.z #FD:Tessellator/field_78415_z #isDrawing
# ItemPickaxe
public ut.<init>(ILul;)V #MD:ItemPickaxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f ut.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst
public uy.<init>(ILuq;)V #MD:ItemPickaxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f uy.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst
# ItemAxe
public ui.<init>(ILul;)V #MD:ItemAxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f ui.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst
public un.<init>(ILuq;)V #MD:ItemAxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f un.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst
# ItemSpade
public ve.<init>(ILul;)V #MD:ItemSpade/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f ve.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst
public vj.<init>(ILuq;)V #MD:ItemSpade/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f vj.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst
# ItemTool
public tu.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial
public tu.cl #FD:ItemTool/field_77865_bY #damageVsEntity
public tw.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial
public tw.co #FD:ItemTool/field_77865_bY #damageVsEntity
# EntityEnderman
public qd.d #FD:EntityEnderman/field_70827_d #carriableBlocks
# RenderGlobal
public bak.h #FD:RenderGlobal/field_72769_h #theWorld
public bak.i #FD:RenderGlobal/field_72770_i #renderEngine
public bak.q #FD:RenderGlobal/field_72777_q #mc
public bak.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks
public bak.E #FD:RenderGlobal/field_72738_E #damagedBlocks
public bav.h #FD:RenderGlobal/field_72769_h #theWorld
public bav.i #FD:RenderGlobal/field_72770_i #renderEngine
public bav.q #FD:RenderGlobal/field_72777_q #mc
public bav.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks
public bav.E #FD:RenderGlobal/field_72738_E #damagedBlocks
# SoundManager
public bek.a #FD:SoundManager/field_77381_a #sndSystem
public bek.b #FD:SoundManager/field_77379_b #soundPoolSounds
public bek.c #FD:SoundManager/field_77380_c #soundPoolStreaming
public bek.d #FD:SoundManager/field_77377_d #soundPoolMusic
public bev.a #FD:SoundManager/field_77381_a #sndSystem
public bev.b #FD:SoundManager/field_77379_b #soundPoolSounds
public bev.c #FD:SoundManager/field_77380_c #soundPoolStreaming
public bev.d #FD:SoundManager/field_77377_d #soundPoolMusic
# EntityMinecart
protected py.* #FD:EntityMinecart/* # All private -> protected
public py.h()Z #MD:EntityMinecart/func_70490_h #isMinecartPowered
# Block
public amj.<init>(ILagb;)V #MD:Block/<init>(ILnet/minecraft/src/Material;) #Constructor
public amj.<init>(IILagb;)V #MD:Block/<init>(IILnet/minecraft/src/Material;) #Constructor
public amj.r()Lamj; #MD:Block/func_71912_p #setRequiresSelfNotify
public amj.a(Lamn;)Lamj; #MD:Block/func_71884_a #setStepSound
public amj.b(F)Lamj; #MD:Block/func_71894_b #setResistance
public amj.c(F)Lamj; #MD:Block/func_71848_c #setHardness
public amj.h(I)Lamj; #MD:Block/func_71868_h #setLightOpacity
public amj.a(F)Lamj; #MD:Block/func_71900_a #setLightValue
public amj.s()Lamj; #MD:Block/func_71875_q #setBlockUnbreakable
public amj.b(Z)Lamj; #MD:Block/func_71907_b #setTickRandomly
public amj.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds
public amq.<init>(ILagi;)V #MD:Block/<init>(ILnet/minecraft/src/Material;) #Constructor
public amq.<init>(IILagi;)V #MD:Block/<init>(IILnet/minecraft/src/Material;) #Constructor
public amq.r()Lamq; #MD:Block/func_71912_p #setRequiresSelfNotify
public amq.a(Lamu;)Lamq; #MD:Block/func_71884_a #setStepSound
public amq.b(F)Lamq; #MD:Block/func_71894_b #setResistance
public amq.c(F)Lamq; #MD:Block/func_71848_c #setHardness
public amq.h(I)Lamq; #MD:Block/func_71868_h #setLightOpacity
public amq.a(F)Lamq; #MD:Block/func_71900_a #setLightValue
public amq.s()Lamq; #MD:Block/func_71875_q #setBlockUnbreakable
public amq.b(Z)Lamq; #MD:Block/func_71907_b #setTickRandomly
public amq.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds
# NetServerHandler
public iv.g #FD:NetServerHandler/field_72572_g #playerInAirTime
# TileEntity
public anq.k #FD:TileEntity/field_70331_k #worldObj
public any.k #FD:TileEntity/field_70331_k #worldObj
# BlockLeavesBase
public amr.c #FD:BlockLeavesBase/field_72131_c #graphicsLevel
public amy.c #FD:BlockLeavesBase/field_72131_c #graphicsLevel
# Item
public uk.<init>(I)V #MD:Item/<init>(I) #Constructor
public uk.e(I)Luk; #MD:Item/func_77656_e #setMaxDamage
public-f uk.f(Lum;)I #MD:Item/func_77650_f #getIconIndex
public up.<init>(I)V #MD:Item/<init>(I) #Constructor
public up.e(I)Lup; #MD:Item/func_77656_e #setMaxDamage
public-f up.h(Lur;)I #MD:Item/func_77650_f #getIconIndex
# RailLogic
public all #CL:RailLogic
public all.a(Lall;)I #MD:RailLogic/func_73650_a #getNAdjacentTiles
public als #CL:RailLogic
public als.a(Lals;)I #MD:RailLogic/func_73650_a #getNAdjacentTiles
# EntityPlayer
public qx.a(Lpx;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld
public qx.i()V #MD:EntityPlayer/func_71053_j #closeScreen
# EntityPlayerMP
public ayk.a(Lpx;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld
public ays.a(Lpx;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld
# World Gen Chests Related
public in.T #FD:WorldServer/field_73069_S #bonusChestContent
public aci.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents
public adm.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple
public adn.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents
public adn.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents
public adx.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents
public aeb.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
public aeg.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
public afh.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
public kw.* #FD:WeightedRandomChestContent/* #all
public in.S #FD:WorldServer/field_73069_S #bonusChestContent
public acp.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents
public adt.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple
public adu.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents
public adu.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents
public aee.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents
public aei.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
public aen.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
public afo.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
# AnvilChunkLoader.chunkSaveLocation
public aaf.d #FD:AnvilChunkLoader/field_75825_d
public aam.d #FD:AnvilChunkLoader/field_75825_d
# ChunkProviderServer.currentChunkLoader
public im.e #FD:ChunkProviderServer/field_73247_e
# PlayerManager
@ -85,27 +86,29 @@ public ik.a(IIZ)Lil; #MD:PlayerManager/func_72690_a #getOrCreateChunkWatcher
# PlayerInstance
public il #CL:PlayerInstance
# World
public-f xv.C #FD:World/field_72982_D #villageCollectionObj
public xv.H #FD:World/field_72993_I #activeChunkSet
public-f yc.B #FD:World/field_72982_D #villageCollectionObj
public yc.G #FD:World/field_72993_I #activeChunkSet
# EntityLiving
public md.bc #FD:EntityLiving/field_70728_aV #experienceValue
public md.bd #FD:EntityLiving/field_70728_aV #experienceValue
# GuiFlatPresets
public atz.a(Ljava/lang/String;ILyr;Ljava/util/List;[Lace;)V #MD:GuiFlatPresets/func_82294_a
public atz.a(Ljava/lang/String;ILyr;[Lace;)V #MD:GuiFlatPresets/func_82297_a
public aug.a(Ljava/lang/String;ILyy;Ljava/util/List;[Lacl;)V #MD:GuiFlatPresets/func_82294_a
public aug.a(Ljava/lang/String;ILyy;[Lacl;)V #MD:GuiFlatPresets/func_82297_a
# BiomeGenBase
public yr.*() #MD:BiomeGenBase/* #Everything protected->public
public yy.*() #MD:BiomeGenBase/* #Everything protected->public
# MapGenVillage
public-f aev.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes
public-f afc.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes
# ShapedRecipes
public+f wk.d #FD:ShapedRecipes/field_77574_d #recipeItems
public+f wk.b #FD:ShapedRecipes/field_77576_b #recipeWidth
public+f wk.c #FD:ShapedRecipes/field_77577_c #recipeHeight
public+f wq.d #FD:ShapedRecipes/field_77574_d #recipeItems
public+f wq.b #FD:ShapedRecipes/field_77576_b #recipeWidth
public+f wq.c #FD:ShapedRecipes/field_77577_c #recipeHeight
# ShapelessRecipes
public wl.b #FD:ShapelessRecipes/field_77579_b #recipeItems
public wr.b #FD:ShapelessRecipes/field_77579_b #recipeItems
# GuiContainer
protected auy.a(Lsq;)V #MD:GuiContainer/func_74192_a #drawSlotInventory
protected avf.a(Lsr;)V #MD:GuiContainer/func_74192_a #drawSlotInventory
# BlockButton
protected aiy.o(Lxv;III)V #MD:BlockButton/func_82535_o #checkActivation
protected-f aiy.a #FD:BlockButton/field_82537_a #sensible
protected ajf.o(Lyc;III)V #MD:BlockButton/func_82535_o #checkActivation
protected-f ajf.a #FD:BlockButton/field_82537_a #sensible
# BiomeDecorator
public yv.* #FD:EntityMinecart/* # All private -> protected
public py.* #FD:EntityMinecart/* # All private -> protected
# CreativeTabs
public-f tj.a #FD:CreativeTabs/field_78032_a # creativeTabArray non-final

View file

@ -2,6 +2,7 @@ package net.minecraftforge.common;
import java.util.*;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraft.world.WorldServer;
@ -42,6 +43,15 @@ public class ChestGenHooks
addInfo(STRONGHOLD_CROSSING, ComponentStrongholdRoomCrossing.strongholdRoomCrossingChestContents, 1, 5);
addInfo(VILLAGE_BLACKSMITH, ComponentVillageHouse2.villageBlacksmithChestContents, 3, 9);
addInfo(BONUS_CHEST, WorldServer.bonusChestContent, 10, 10);
ItemStack book = new ItemStack(Item.field_92053_bW, 1, 0);
WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
getInfo(MINESHAFT_CORRIDOR ).addItem(tmp);
getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
getInfo(STRONGHOLD_LIBRARY ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
}
private static void addInfo(String category, WeightedRandomChestContent[] items, int min, int max)
@ -103,7 +113,7 @@ public class ChestGenHooks
}
//shortcut functions, See the non-static versions below
public static WeightedRandomChestContent[] getItems(String category){ return getInfo(category).getItems(); }
public static WeightedRandomChestContent[] getItems(String category, Random rnd){ return getInfo(category).getItems(rnd); }
public static int getCount(String category, Random rand){ return getInfo(category).getCount(rand); }
public static void addItem(String category, WeightedRandomChestContent item){ getInfo(category).addItem(item); }
public static void removeItem(String category, ItemStack item){ getInfo(category).removeItem(item); }
@ -151,7 +161,7 @@ public class ChestGenHooks
while(itr.hasNext())
{
WeightedRandomChestContent cont = itr.next();
if (item.isItemEqual(cont.itemStack) || (item.getItemDamage() == -1 && item.itemID == cont.itemStack.itemID))
if (item.isItemEqual(cont.theItemId) || (item.getItemDamage() == -1 && item.itemID == cont.theItemId.itemID))
{
itr.remove();
}
@ -163,9 +173,25 @@ public class ChestGenHooks
*
* @return The random objects
*/
public WeightedRandomChestContent[] getItems()
public WeightedRandomChestContent[] getItems(Random rnd)
{
return contents.toArray(new WeightedRandomChestContent[contents.size()]);
ArrayList<WeightedRandomChestContent> ret = new ArrayList<WeightedRandomChestContent>();
for (WeightedRandomChestContent orig : contents)
{
Item item = orig.theItemId.getItem();
if (item != null)
{
WeightedRandomChestContent n = item.getChestGenBase(this, rnd, orig);
if (n != null)
{
ret.add(n);
}
}
}
return ret.toArray(new WeightedRandomChestContent[ret.size()]);
}
/**

View file

@ -32,7 +32,7 @@ public class ForgeInternalHandler
Entity entity = event.entity;
if (entity.getClass().equals(EntityItem.class))
{
ItemStack stack = ((EntityItem)entity).item;
ItemStack stack = ((EntityItem)entity).getDataWatcher().getWatchableObjectItemStack(10);
if (stack == null)
{

View file

@ -10,9 +10,9 @@ public class ForgeVersion
//This number is incremented every time we remove deprecated code/major API changes, never reset
public static final int majorVersion = 6;
//This number is incremented every minecraft release, never reset
public static final int minorVersion = 4;
public static final int minorVersion = 5;
//This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version
public static final int revisionVersion = 2;
public static final int revisionVersion = 0;
//This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code.
public static final int buildVersion = 0;

View file

@ -1,8 +1,7 @@
package net.minecraftforge.event.terraingen;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.*;

View file

@ -1,9 +1,10 @@
--- ../src_base/minecraft/net/minecraft/block/Block.java
+++ ../src_work/minecraft/net/minecraft/block/Block.java
@@ -2,13 +2,16 @@
@@ -2,13 +2,17 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@ -17,7 +18,7 @@
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
@@ -24,17 +27,27 @@
@@ -24,17 +28,27 @@
import net.minecraft.item.ItemSlab;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
@ -45,7 +46,7 @@
/**
* used as foreach item, if item.tab = current tab, display it on the screen
*/
@@ -319,6 +332,7 @@
@@ -319,6 +333,7 @@
lightOpacity[par1] = this.isOpaqueCube() ? 255 : 0;
canBlockGrass[par1] = !par2Material.getCanBlockGrass();
}
@ -53,7 +54,7 @@
}
/**
@@ -457,9 +471,10 @@
@@ -457,9 +472,10 @@
return this.needsRandomTick;
}
@ -65,7 +66,7 @@
}
/**
@@ -482,7 +497,7 @@
@@ -482,7 +498,7 @@
*/
public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
@ -74,7 +75,7 @@
}
@SideOnly(Side.CLIENT)
@@ -492,7 +507,7 @@
@@ -492,7 +508,7 @@
*/
public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
@ -83,7 +84,7 @@
}
@SideOnly(Side.CLIENT)
@@ -637,7 +652,13 @@
@@ -637,7 +653,13 @@
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
*/
@ -98,7 +99,7 @@
/**
* Returns the quantity of items to drop on block destruction.
@@ -661,8 +682,7 @@
@@ -661,8 +683,7 @@
*/
public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5)
{
@ -108,7 +109,7 @@
}
/**
@@ -680,18 +700,13 @@
@@ -680,18 +701,13 @@
{
if (!par1World.isRemote)
{
@ -131,7 +132,7 @@
}
}
}
@@ -1076,7 +1091,7 @@
@@ -1076,7 +1092,7 @@
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
par2EntityPlayer.addExhaustion(0.025F);
@ -140,7 +141,7 @@
{
ItemStack var8 = this.createStackedBlock(par6);
@@ -1353,4 +1368,849 @@
@@ -1356,4 +1372,849 @@
canBlockGrass[0] = true;
StatList.initBreakableStats();
}

View file

@ -2,15 +2,15 @@
+++ ../src_work/minecraft/net/minecraft/block/BlockCrops.java
@@ -2,11 +2,14 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.Random;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+
+import net.minecraftforge.common.ForgeDirection;
public class BlockCrops extends BlockFlower

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/block/BlockFarmland.java
+++ ../src_work/minecraft/net/minecraft/block/BlockFarmland.java
@@ -7,6 +7,9 @@
import net.minecraft.entity.Entity;
@@ -8,6 +8,9 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
+
@ -10,7 +10,7 @@
public class BlockFarmland extends Block
{
@@ -101,7 +104,8 @@
@@ -107,7 +110,8 @@
{
int var8 = par1World.getBlockId(var6, par3 + 1, var7);

View file

@ -10,7 +10,7 @@
public class BlockLadder extends Block
{
@@ -101,29 +104,32 @@
@@ -104,29 +107,32 @@
*/
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{
@ -48,7 +48,7 @@
{
var10 = 5;
}
@@ -140,22 +146,22 @@
@@ -143,22 +149,22 @@
int var6 = par1World.getBlockMetadata(par2, par3, par4);
boolean var7 = false;
@ -75,7 +75,7 @@
{
var7 = true;
}
@@ -176,4 +182,10 @@
@@ -179,4 +185,10 @@
{
return 1;
}

View file

@ -1,14 +1,15 @@
--- ../src_base/minecraft/net/minecraft/block/BlockLeaves.java
+++ ../src_work/minecraft/net/minecraft/block/BlockLeaves.java
@@ -2,6 +2,7 @@
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.block.material.Material;
@@ -14,7 +15,9 @@
@@ -14,7 +16,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -19,7 +20,7 @@
{
/**
* The base index in terrain.png corresponding to the fancy version of the leaf texture. This is stored so we can
@@ -107,10 +110,9 @@
@@ -107,10 +111,9 @@
{
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
@ -32,7 +33,7 @@
}
}
}
@@ -156,11 +158,13 @@
@@ -156,11 +159,13 @@
{
var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14);
@ -48,7 +49,7 @@
{
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
}
@@ -303,15 +307,7 @@
@@ -303,15 +308,7 @@
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
@ -65,9 +66,9 @@
}
/**
@@ -362,4 +358,30 @@
par3List.add(new ItemStack(par1, 1, 2));
par3List.add(new ItemStack(par1, 1, 3));
@@ -371,4 +368,30 @@
{
return new ItemStack(this.blockID, 1, par1 & 3);
}
+
+ @Override

View file

@ -2,15 +2,15 @@
+++ ../src_work/minecraft/net/minecraft/block/BlockNetherStalk.java
@@ -2,11 +2,14 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.Random;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+
+import net.minecraftforge.common.ForgeDirection;
public class BlockNetherStalk extends BlockFlower

View file

@ -1,14 +1,15 @@
--- ../src_base/minecraft/net/minecraft/block/BlockStem.java
+++ ../src_work/minecraft/net/minecraft/block/BlockStem.java
@@ -2,6 +2,7 @@
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.Random;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
@@ -9,6 +10,8 @@
@@ -9,6 +11,8 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -17,7 +18,7 @@
public class BlockStem extends BlockFlower
{
/** Defines if it is a Melon or a Pumpkin that the stem is producing. */
@@ -101,7 +104,8 @@
@@ -101,7 +105,8 @@
int var11 = par1World.getBlockId(var9, par3 - 1, var10);
@ -27,7 +28,7 @@
{
par1World.setBlockWithNotify(var9, par3, var10, this.fruitType.blockID);
}
@@ -137,11 +141,11 @@
@@ -137,11 +142,11 @@
int var19 = par1World.getBlockId(var17, par3 - 1, var18);
float var20 = 0.0F;
@ -41,7 +42,7 @@
{
var20 = 3.0F;
}
@@ -241,29 +245,22 @@
@@ -241,29 +246,22 @@
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);

View file

@ -1,14 +1,15 @@
--- ../src_base/minecraft/net/minecraft/block/BlockTallGrass.java
+++ ../src_work/minecraft/net/minecraft/block/BlockTallGrass.java
@@ -2,6 +2,7 @@
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.block.material.Material;
@@ -15,7 +16,10 @@
@@ -15,7 +17,10 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -20,7 +21,7 @@
{
protected BlockTallGrass(int par1, int par2)
{
@@ -37,7 +41,7 @@
@@ -37,7 +42,7 @@
*/
public int idDropped(int par1, Random par2Random, int par3)
{
@ -29,7 +30,7 @@
}
/**
@@ -54,15 +58,7 @@
@@ -54,15 +59,7 @@
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
@ -46,7 +47,7 @@
}
@SideOnly(Side.CLIENT)
@@ -115,4 +111,35 @@
@@ -115,4 +112,35 @@
par3List.add(new ItemStack(par1, 1, var4));
}
}

View file

@ -1,14 +1,15 @@
--- ../src_base/minecraft/net/minecraft/block/BlockVine.java
+++ ../src_work/minecraft/net/minecraft/block/BlockVine.java
@@ -2,6 +2,7 @@
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -15,7 +16,9 @@
@@ -15,7 +17,9 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -19,7 +20,7 @@
{
public BlockVine(int par1)
{
@@ -436,14 +439,26 @@
@@ -436,14 +440,26 @@
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src_work/minecraft/net/minecraft/client/Minecraft.java
@@ -130,6 +130,10 @@
@@ -128,6 +128,10 @@
import com.google.common.collect.MapDifference;
@ -11,7 +11,7 @@
@SideOnly(Side.CLIENT)
public abstract class Minecraft implements Runnable, IPlayerUsage
{
@@ -1249,7 +1253,7 @@
@@ -1253,7 +1257,7 @@
if (this.thePlayer.canCurrentToolHarvestBlock(var3, var4, var5))
{
@ -20,7 +20,7 @@
this.thePlayer.swingItem();
}
}
@@ -1315,7 +1319,8 @@
@@ -1319,7 +1323,8 @@
{
int var8 = var3 != null ? var3.stackSize : 0;
@ -30,7 +30,7 @@
{
var2 = false;
this.thePlayer.swingItem();
@@ -1341,7 +1346,8 @@
@@ -1345,7 +1350,8 @@
{
ItemStack var9 = this.thePlayer.inventory.getCurrentItem();
@ -40,7 +40,7 @@
{
this.entityRenderer.itemRenderer.func_78445_c();
}
@@ -2037,6 +2043,18 @@
@@ -2041,6 +2047,18 @@
if (this.theIntegratedServer != null)
{
this.theIntegratedServer.initiateShutdown();
@ -59,7 +59,7 @@
}
this.theIntegratedServer = null;
@@ -2346,95 +2364,12 @@
@@ -2350,95 +2368,12 @@
if (this.objectMouseOver != null)
{
boolean var1 = this.thePlayer.capabilities.isCreativeMode;

View file

@ -7,10 +7,10 @@
+import net.minecraftforge.client.event.sound.*;
+import net.minecraftforge.common.MinecraftForge;
+import static net.minecraftforge.client.event.sound.SoundEvent.*;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.File;
@@ -50,9 +54,11 @@
@@ -53,9 +57,11 @@
private Random rand = new Random();
private int ticksBeforeMusic;
@ -23,7 +23,7 @@
}
/**
@@ -67,6 +73,8 @@
@@ -70,6 +76,8 @@
{
this.tryToSetLibraryAndCodecs();
}
@ -32,7 +32,7 @@
}
/**
@@ -86,6 +94,8 @@
@@ -89,6 +97,8 @@
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
SoundSystemConfig.setCodec("mus", CodecMus.class);
SoundSystemConfig.setCodec("wav", CodecWav.class);
@ -41,7 +41,7 @@
sndSystem = new SoundSystem();
this.options.soundVolume = var1;
this.options.musicVolume = var2;
@@ -174,10 +184,12 @@
@@ -177,10 +187,12 @@
}
SoundPoolEntry var1 = this.soundPoolMusic.getRandomSound();
@ -55,7 +55,7 @@
sndSystem.backgroundMusic("BgMusic", var1.soundUrl, var1.soundName, false);
sndSystem.setVolume("BgMusic", this.options.musicVolume);
sndSystem.play("BgMusic");
@@ -244,6 +256,7 @@
@@ -247,6 +259,7 @@
if (par1Str != null)
{
SoundPoolEntry var6 = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str);
@ -63,7 +63,7 @@
if (var6 != null)
{
@@ -255,6 +268,7 @@
@@ -258,6 +271,7 @@
float var7 = 16.0F;
sndSystem.newStreamingSource(true, var5, var6.soundUrl, var6.soundName, false, par2, par3, par4, 2, var7 * 4.0F);
sndSystem.setVolume(var5, 0.5F * this.options.soundVolume);
@ -71,7 +71,7 @@
sndSystem.play(var5);
}
}
@@ -434,6 +448,7 @@
@@ -437,6 +451,7 @@
if (loaded && this.options.soundVolume != 0.0F)
{
SoundPoolEntry var7 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
@ -79,7 +79,7 @@
if (var7 != null && par5 > 0.0F)
{
@@ -455,6 +470,7 @@
@@ -458,6 +473,7 @@
}
sndSystem.setVolume(var8, par5 * this.options.soundVolume);
@ -87,7 +87,7 @@
sndSystem.play(var8);
}
}
@@ -469,6 +485,7 @@
@@ -472,6 +488,7 @@
if (loaded && this.options.soundVolume != 0.0F)
{
SoundPoolEntry var4 = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
@ -95,7 +95,7 @@
if (var4 != null)
{
@@ -484,6 +501,7 @@
@@ -487,6 +504,7 @@
par2 *= 0.25F;
sndSystem.setPitch(var5, par3);
sndSystem.setVolume(var5, par2 * this.options.soundVolume);

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/client/audio/SoundPool.java
+++ ../src_work/minecraft/net/minecraft/client/audio/SoundPool.java
@@ -4,6 +4,7 @@
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.File;
import java.net.MalformedURLException;
+import java.net.URL;

View file

@ -9,7 +9,7 @@
@SideOnly(Side.CLIENT)
public class GuiIngame extends Gui
{
@@ -157,7 +159,7 @@
@@ -159,7 +161,7 @@
var47 = var7 - 39;
var22 = var47 - 10;

View file

@ -1,15 +1,16 @@
--- ../src_base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
+++ ../src_work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java
@@ -2,6 +2,8 @@
@@ -2,6 +2,9 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.LinkedList;
+import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
@@ -19,6 +21,8 @@
@@ -19,6 +22,8 @@
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@ -18,7 +19,7 @@
@SideOnly(Side.CLIENT)
public class GuiAchievements extends GuiScreen
{
@@ -55,6 +59,10 @@
@@ -55,6 +60,10 @@
/** Whether the Mouse Button is down or not */
private int isMouseButtonDown = 0;
private StatFileWriter statFileWriter;
@ -29,7 +30,7 @@
public GuiAchievements(StatFileWriter par1StatFileWriter)
{
@@ -63,6 +71,14 @@
@@ -63,6 +72,14 @@
short var3 = 141;
this.field_74117_m = this.guiMapX = this.field_74124_q = (double)(AchievementList.openInventory.displayColumn * 24 - var2 / 2 - 12);
this.field_74115_n = this.guiMapY = this.field_74123_r = (double)(AchievementList.openInventory.displayRow * 24 - var3 / 2);
@ -44,7 +45,7 @@
}
/**
@@ -72,6 +88,7 @@
@@ -72,6 +89,7 @@
{
this.controlList.clear();
this.controlList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, StatCollector.translateToLocal("gui.done")));
@ -52,7 +53,7 @@
}
/**
@@ -83,6 +100,16 @@
@@ -83,6 +101,16 @@
{
this.mc.displayGuiScreen((GuiScreen)null);
this.mc.setIngameFocus();
@ -69,7 +70,7 @@
}
super.actionPerformed(par1GuiButton);
@@ -307,11 +334,12 @@
@@ -307,11 +335,12 @@
int var27;
int var30;
@ -87,7 +88,7 @@
{
var24 = var33.displayColumn * 24 - var4 + 11 + var10;
var25 = var33.displayRow * 24 - var5 + 11 + var11;
@@ -345,9 +373,9 @@
@@ -345,9 +374,9 @@
int var42;
int var41;

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
@@ -318,7 +318,7 @@
@@ -331,7 +331,7 @@
if (var6 >= 0)
{
GL11.glDisable(GL11.GL_LIGHTING);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -49,6 +49,8 @@
@@ -50,6 +50,8 @@
private Slot field_74235_v = null;
private boolean field_74234_w = false;
private CreativeCrafting field_82324_x;
@ -9,7 +9,7 @@
public GuiContainerCreative(EntityPlayer par1EntityPlayer)
{
@@ -223,6 +225,13 @@
@@ -224,6 +226,13 @@
this.func_74227_b(CreativeTabs.creativeTabArray[var1]);
this.field_82324_x = new CreativeCrafting(this.mc);
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
@ -23,7 +23,7 @@
}
else
{
@@ -343,7 +352,7 @@
@@ -358,7 +367,7 @@
{
CreativeTabs var3 = CreativeTabs.creativeTabArray[selectedTabIndex];
@ -32,7 +32,7 @@
{
this.fontRenderer.drawString(var3.getTranslatedTabLabel(), 8, 6, 4210752);
}
@@ -365,7 +374,7 @@
@@ -380,7 +389,7 @@
{
CreativeTabs var9 = var6[var8];
@ -41,7 +41,7 @@
{
this.func_74227_b(var9);
return;
@@ -381,11 +390,17 @@
@@ -396,11 +405,17 @@
*/
private boolean needsScrollBars()
{
@ -59,7 +59,7 @@
int var2 = selectedTabIndex;
selectedTabIndex = par1CreativeTabs.getTabIndex();
ContainerCreative var3 = (ContainerCreative)this.inventorySlots;
@@ -555,21 +570,42 @@
@@ -570,21 +585,42 @@
super.drawScreen(par1, par2, par3);
CreativeTabs[] var11 = CreativeTabs.creativeTabArray;
@ -107,7 +107,7 @@
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -590,14 +626,32 @@
@@ -605,14 +641,32 @@
int var8 = var7.length;
int var9;
@ -142,7 +142,7 @@
}
}
@@ -615,6 +669,14 @@
@@ -630,6 +684,14 @@
this.drawTexturedModalRect(var11, var8 + (int)((float)(var9 - var8 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
}
@ -157,7 +157,7 @@
this.renderCreativeTab(var5);
if (var5 == CreativeTabs.tabInventory)
@@ -625,6 +687,15 @@
@@ -640,6 +702,15 @@
protected boolean func_74232_a(CreativeTabs par1CreativeTabs, int par2, int par3)
{
@ -173,7 +173,7 @@
int var4 = par1CreativeTabs.getTabColumn();
int var5 = 28 * var4;
byte var6 = 0;
@@ -739,7 +810,7 @@
@@ -754,7 +825,7 @@
var8 += 8 + (var3 ? 1 : -1);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
@ -182,7 +182,7 @@
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8);
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8);
GL11.glDisable(GL11.GL_LIGHTING);
@@ -761,6 +832,15 @@
@@ -776,6 +847,15 @@
{
this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
}

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/client/model/ModelBox.java
+++ ../src_work/minecraft/net/minecraft/client/model/ModelBox.java
@@ -4,7 +4,6 @@
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.Tessellator;
-@SideOnly(Side.CLIENT)

View file

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/client/model/PositionTextureVertex.java
+++ ../src_work/minecraft/net/minecraft/client/model/PositionTextureVertex.java
@@ -4,7 +4,6 @@
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.Vec3;
-@SideOnly(Side.CLIENT)

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
@@ -159,6 +159,11 @@
@@ -160,6 +160,11 @@
import net.minecraft.world.storage.MapStorage;
import org.lwjgl.input.Keyboard;
@ -12,7 +12,7 @@
@SideOnly(Side.CLIENT)
public class NetClientHandler extends NetHandler
{
@@ -746,7 +751,7 @@
@@ -741,7 +746,7 @@
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)
{
@ -21,7 +21,7 @@
this.disconnected = true;
this.mc.loadWorld((WorldClient)null);
this.mc.displayGuiScreen(new GuiDisconnected("disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason}));
@@ -811,7 +816,11 @@
@@ -806,7 +811,11 @@
public void handleChat(Packet3Chat par1Packet3Chat)
{
FMLNetworkHandler.onConnectionClosed(this.netManager, this.getPlayer());
@ -34,7 +34,7 @@
}
public void handleAnimation(Packet18Animation par1Packet18Animation)
@@ -1193,6 +1202,10 @@
@@ -1188,6 +1197,10 @@
{
var2.readFromNBT(par1Packet132TileEntityData.customParam1);
}

View file

@ -33,20 +33,21 @@
if (var8)
{
@@ -334,6 +344,12 @@
float var11 = (float)par8Vec3.zCoord - (float)par6;
boolean var12 = false;
int var13 = par2World.getBlockId(par4, par5, par6);
@@ -345,6 +355,13 @@
}
}
+ if (par3ItemStack != null &&
+ par3ItemStack.getItem() != null &&
+ par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, var9, var10, var11))
+ {
+ return true;
+ }
if (var13 > 0 && Block.blocksList[var13].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, var9, var10, var11))
+
if (!var12 && par3ItemStack != null && par3ItemStack.getItem() instanceof ItemBlock)
{
@@ -371,7 +387,15 @@
ItemBlock var16 = (ItemBlock)par3ItemStack.getItem();
@@ -376,7 +393,15 @@
}
else
{
@ -63,7 +64,7 @@
}
}
@@ -393,9 +417,10 @@
@@ -398,9 +423,10 @@
{
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5;

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
@@ -25,6 +25,9 @@
@@ -27,6 +27,9 @@
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.storage.SaveHandlerMP;
@ -10,7 +10,7 @@
@SideOnly(Side.CLIENT)
public class WorldClient extends World
{
@@ -55,8 +58,11 @@
@@ -57,8 +60,11 @@
super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler);
this.sendQueue = par1NetClientHandler;
this.difficultySetting = par4;
@ -23,7 +23,7 @@
}
/**
@@ -288,6 +294,12 @@
@@ -290,6 +296,12 @@
*/
protected void updateWeather()
{
@ -35,4 +35,4 @@
+ {
if (!this.provider.hasNoSky)
{
if (this.lastLightningBolt > 0)
this.prevRainingStrength = this.rainingStrength;

View file

@ -1,8 +1,8 @@
--- ../src_base/minecraft/net/minecraft/client/particle/EffectRenderer.java
+++ ../src_work/minecraft/net/minecraft/client/particle/EffectRenderer.java
@@ -3,7 +3,9 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
@@ -3,16 +3,25 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
@ -10,14 +10,12 @@
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.ActiveRenderInfo;
@@ -12,10 +14,17 @@
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
+import net.minecraft.item.Item;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ReportedException;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
+
@ -28,7 +26,7 @@
@SideOnly(Side.CLIENT)
public class EffectRenderer
@@ -28,6 +37,8 @@
@@ -25,6 +34,8 @@
/** RNG. */
private Random rand = new Random();
@ -37,27 +35,23 @@
public EffectRenderer(World par1World, RenderEngine par2RenderEngine)
{
if (par1World != null)
@@ -66,9 +77,13 @@
for (int var3 = 0; var3 < this.fxLayers[var1].size(); ++var3)
@@ -59,12 +70,27 @@
for (int var2 = 0; var2 < this.fxLayers[var1].size(); ++var2)
{
var2 = (EntityFX)this.fxLayers[var1].get(var3);
- var2.onUpdate();
EntityFX var3 = (EntityFX)this.fxLayers[var1].get(var2);
- var3.onUpdate();
-
- if (var2.isDead)
- if (var3.isDead)
+
+ if (var2 != null)
+ if (var3 != null)
+ {
+ var2.onUpdate();
+ var3.onUpdate();
+ }
+
+ if (var2 == null || var2.isDead)
+ if (var3 == null || var3.isDead)
{
this.fxLayers[var1].remove(var3--);
this.fxLayers[var1].remove(var2--);
}
@@ -81,6 +96,17 @@
var5.addCrashSectionCallable("Last ticked particle", new CallableLastTickedParticle(this, var2));
var5.addCrashSection("Texture index", Integer.valueOf(var1));
throw new ReportedException(var4);
+ }
+ }
+
@ -72,7 +66,7 @@
}
}
}
@@ -130,6 +156,7 @@
@@ -115,6 +141,7 @@
for (int var11 = 0; var11 < this.fxLayers[var8].size(); ++var11)
{
EntityFX var12 = (EntityFX)this.fxLayers[var8].get(var11);
@ -80,9 +74,9 @@
var10.setBrightness(var12.getBrightnessForRender(par2));
var12.renderParticle(var10, par2, var3, var7, var4, var5, var6);
}
@@ -137,6 +164,27 @@
var10.draw();
@@ -123,6 +150,27 @@
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
}
+ }
+
@ -108,7 +102,7 @@
}
}
@@ -156,6 +204,7 @@
@@ -142,6 +190,7 @@
for (int var11 = 0; var11 < this.fxLayers[var9].size(); ++var11)
{
EntityFX var12 = (EntityFX)this.fxLayers[var9].get(var11);
@ -116,7 +110,7 @@
var10.setBrightness(var12.getBrightnessForRender(par2));
var12.renderParticle(var10, par2, var4, var8, var5, var6, var7);
}
@@ -170,13 +219,15 @@
@@ -156,13 +205,15 @@
{
this.fxLayers[var2].clear();
}
@ -135,7 +129,7 @@
byte var7 = 4;
for (int var8 = 0; var8 < var7; ++var8)
@@ -189,7 +240,7 @@
@@ -175,7 +226,7 @@
double var13 = (double)par2 + ((double)var9 + 0.5D) / (double)var7;
double var15 = (double)par3 + ((double)var10 + 0.5D) / (double)var7;
int var17 = this.rand.nextInt(6);
@ -144,7 +138,7 @@
}
}
}
@@ -241,12 +292,60 @@
@@ -227,12 +278,60 @@
var8 = (double)par1 + var6.getBlockBoundsMaxX() + (double)var7;
}

View file

@ -56,7 +56,7 @@
GL11.glRotatef(var2.prevRotationYaw + (var2.rotationYaw - var2.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
GL11.glRotatef(var2.prevRotationPitch + (var2.rotationPitch - var2.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
}
@@ -1136,8 +1140,11 @@
@@ -1139,8 +1143,11 @@
var17 = (EntityPlayer)var4;
GL11.glDisable(GL11.GL_ALPHA_TEST);
this.mc.mcProfiler.endStartSection("outline");
@ -70,7 +70,7 @@
GL11.glEnable(GL11.GL_ALPHA_TEST);
}
}
@@ -1201,15 +1208,18 @@
@@ -1204,15 +1211,18 @@
var17 = (EntityPlayer)var4;
GL11.glDisable(GL11.GL_ALPHA_TEST);
this.mc.mcProfiler.endStartSection("outline");
@ -92,7 +92,7 @@
GL11.glDisable(GL11.GL_BLEND);
this.mc.mcProfiler.endStartSection("weather");
this.renderRainSnow(par1);
@@ -1219,6 +1229,9 @@
@@ -1222,6 +1232,9 @@
{
this.func_82829_a(var5, par1);
}

View file

@ -60,7 +60,7 @@
Tessellator var5 = Tessellator.instance;
int var6 = par1EntityLiving.getItemIcon(par2ItemStack, par3);
@@ -280,8 +282,9 @@
@@ -279,8 +281,9 @@
Render var24;
RenderPlayer var26;
@ -72,7 +72,7 @@
GL11.glPushMatrix();
var7 = 0.8F;
var20 = var3.getSwingProgress(par1);
@@ -347,11 +350,17 @@
@@ -346,11 +349,17 @@
var28.addVertexWithUV((double)(128 + var27), (double)(0 - var27), 0.0D, 1.0D, 0.0D);
var28.addVertexWithUV((double)(0 - var27), (double)(0 - var27), 0.0D, 0.0D, 0.0D);
var28.draw();
@ -95,7 +95,7 @@
}
GL11.glPopMatrix();
@@ -454,12 +463,15 @@
@@ -453,12 +462,15 @@
if (var17.getItem().requiresMultipleRenderPasses())
{
this.renderItem(var3, var17, 0);

View file

@ -9,7 +9,7 @@
@SideOnly(Side.CLIENT)
public class RenderBlocks
@@ -591,9 +593,8 @@
@@ -617,9 +619,8 @@
public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4)
{
Tessellator var5 = Tessellator.instance;
@ -21,7 +21,7 @@
float var9 = 0.5F;
float var10 = 1.0F;
float var11 = 0.8F;
@@ -602,6 +603,7 @@
@@ -628,6 +629,7 @@
var5.setBrightness(var25);
var5.setColorOpaque_F(var9, var9, var9);
int var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 0);
@ -29,7 +29,7 @@
int var28 = (var27 & 15) << 4;
int var29 = var27 & 240;
double var30 = (double)((float)var28 / 256.0F);
@@ -620,6 +622,7 @@
@@ -646,6 +648,7 @@
var5.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4));
var5.setColorOpaque_F(var10, var10, var10);
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 1);
@ -37,7 +37,7 @@
var28 = (var27 & 15) << 4;
var29 = var27 & 240;
var30 = (double)((float)var28 / 256.0F);
@@ -2349,7 +2352,7 @@
@@ -2384,7 +2387,7 @@
double var28;
double var30;
@ -46,7 +46,7 @@
{
float var36 = 0.2F;
float var19 = 0.0625F;
@@ -2369,7 +2372,7 @@
@@ -2404,7 +2407,7 @@
var9 = var20;
}
@ -55,7 +55,7 @@
{
var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13);
var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 1), var11, var15);
@@ -2381,7 +2384,7 @@
@@ -2416,7 +2419,7 @@
var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13);
}
@ -64,7 +64,7 @@
{
var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13);
var5.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var9, var15);
@@ -2393,7 +2396,7 @@
@@ -2428,7 +2431,7 @@
var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13);
}
@ -73,7 +73,7 @@
{
var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13);
var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var11, var15);
@@ -2405,7 +2408,7 @@
@@ -2440,7 +2443,7 @@
var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13);
}
@ -82,7 +82,7 @@
{
var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13);
var5.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + var19), (double)(par4 + 1 - 0), var9, var15);
@@ -2417,7 +2420,7 @@
@@ -2452,7 +2455,7 @@
var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13);
}
@ -91,7 +91,7 @@
{
var20 = (double)par2 + 0.5D + 0.5D;
var22 = (double)par2 + 0.5D - 0.5D;
@@ -4613,7 +4616,7 @@
@@ -4651,7 +4654,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2);
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
@ -100,7 +100,7 @@
{
this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5;
@@ -4736,7 +4739,7 @@
@@ -4774,7 +4777,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3);
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3));
@ -109,7 +109,7 @@
{
this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5;
@@ -4859,7 +4862,7 @@
@@ -4897,7 +4900,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4);
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
@ -118,7 +118,7 @@
{
this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5;
@@ -4982,7 +4985,7 @@
@@ -5020,7 +5023,7 @@
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5);
this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
@ -127,7 +127,7 @@
{
this.colorRedTopLeft *= par5;
this.colorRedBottomLeft *= par5;
@@ -5094,7 +5097,7 @@
@@ -5132,7 +5135,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2);
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
@ -136,7 +136,7 @@
{
var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7);
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
@@ -5110,7 +5113,7 @@
@@ -5148,7 +5151,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3);
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
@ -145,7 +145,7 @@
{
var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7);
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
@@ -5126,7 +5129,7 @@
@@ -5164,7 +5167,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4);
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
@ -154,7 +154,7 @@
{
var8.setColorOpaque_F(var19 * par5, var22 * par6, var25 * par7);
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
@@ -5142,7 +5145,7 @@
@@ -5180,7 +5183,7 @@
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5);
this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var28);

View file

@ -1,20 +1,20 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
@@ -61,6 +61,8 @@
@@ -62,6 +62,8 @@
import org.lwjgl.opengl.ARBOcclusionQuery;
import org.lwjgl.opengl.GL11;
+import net.minecraftforge.client.SkyProvider;
+import net.minecraftforge.client.IRenderHandler;
+
@SideOnly(Side.CLIENT)
public class RenderGlobal implements IWorldAccess
{
@@ -928,6 +930,12 @@
@@ -929,6 +931,12 @@
*/
public void renderSky(float par1)
{
+ SkyProvider skyProvider = null;
+ if ((skyProvider = this.mc.theWorld.provider.getSkyProvider()) != null)
+ IRenderHandler skyProvider = null;
+ if ((skyProvider = this.mc.theWorld.provider.getSkyRenderer()) != null)
+ {
+ skyProvider.render(par1, this.theWorld, mc);
+ return;
@ -22,11 +22,11 @@
if (this.mc.theWorld.provider.dimensionId == 1)
{
GL11.glDisable(GL11.GL_FOG);
@@ -1166,6 +1174,13 @@
@@ -1167,6 +1175,13 @@
public void renderClouds(float par1)
{
+ SkyProvider renderer = null;
+ IRenderHandler renderer = null;
+ if ((renderer = theWorld.provider.getCloudRenderer()) != null)
+ {
+ renderer.render(par1, theWorld, mc);
@ -36,7 +36,7 @@
if (this.mc.theWorld.provider.isSurfaceWorld())
{
if (this.mc.gameSettings.fancyGraphics)
@@ -1592,6 +1607,11 @@
@@ -1596,6 +1611,11 @@
}
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
@ -48,7 +48,7 @@
{
double var4 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3;
double var6 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3;
@@ -1863,6 +1883,7 @@
@@ -1870,6 +1890,7 @@
double var17 = this.mc.renderViewEntity.posY - par4;
double var19 = this.mc.renderViewEntity.posZ - par6;
EntityFX var21 = null;
@ -56,7 +56,7 @@
if (par1Str.equals("hugeexplosion"))
{
@@ -1995,6 +2016,7 @@
@@ -2006,6 +2027,7 @@
else if (par1Str.equals("snowballpoof"))
{
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.snowball);
@ -64,7 +64,7 @@
}
else if (par1Str.equals("dripWater"))
{
@@ -2011,6 +2033,7 @@
@@ -2022,6 +2044,7 @@
else if (par1Str.equals("slime"))
{
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, Item.slimeBall);
@ -72,7 +72,7 @@
}
else if (par1Str.equals("heart"))
{
@@ -2032,6 +2055,7 @@
@@ -2043,6 +2066,7 @@
{
int var27 = Integer.parseInt(par1Str.substring(par1Str.indexOf("_") + 1));
var21 = new EntityBreakingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Item.itemsList[var27]);
@ -80,7 +80,7 @@
}
else if (par1Str.startsWith("tilecrack_"))
{
@@ -2039,11 +2063,12 @@
@@ -2050,11 +2074,12 @@
int var25 = Integer.parseInt(var28[1]);
int var26 = Integer.parseInt(var28[2]);
var21 = (new EntityDiggingFX(this.theWorld, par2, par4, par6, par8, par10, par12, Block.blocksList[var25], 0, var26)).func_90019_g(var26);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
@@ -12,11 +12,14 @@
@@ -13,11 +13,14 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
@ -15,7 +15,7 @@
@SideOnly(Side.CLIENT)
public class RenderItem extends Render
{
@@ -68,13 +71,16 @@
@@ -74,13 +77,16 @@
GL11.glTranslatef((float)par2, (float)par4 + var11, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
@ -34,7 +34,7 @@
{
GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F);
@@ -85,9 +91,9 @@
@@ -91,9 +97,9 @@
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
}
@ -46,7 +46,7 @@
if (var16 == 1 || var16 == 19 || var16 == 12 || var16 == 2)
{
@@ -109,7 +115,7 @@
@@ -115,7 +121,7 @@
}
var24 = 1.0F;
@ -55,25 +55,24 @@
GL11.glPopMatrix();
}
}
@@ -131,11 +137,12 @@
@@ -136,12 +142,12 @@
GL11.glScalef(0.5F, 0.5F, 0.5F);
}
- this.loadTexture("/gui/items.png");
-
- for (var15 = 0; var15 <= 1; ++var15)
- {
- var16 = var10.getItem().getIconFromDamageForRenderPass(var10.getItemDamage(), var15);
+ this.loadTexture(Item.itemsList[var10.itemID].getTextureFile());
+
+ for (var15 = 0; var15 < var10.getItem().getRenderPasses(var10.getItemDamage()); ++var15)
+ {
+ this.random.setSeed(187L); //Fixes Vanilla bug where layers would not render aligns properly.
+ var16 = var10.getItem().getIconFromItemStackForMultiplePasses(var10, var15);
+ for (var15 = 0; var15 <= var10.getItem().getRenderPasses(var10.getItemDamage()); ++var15)
{
this.random.setSeed(187L);
- var16 = var10.getItem().getIconFromDamageForRenderPass(var10.getItemDamage(), var15);
+ var16 = var10.getItem().getIconIndex(var10, var15);
var17 = 1.0F;
if (this.field_77024_a)
@@ -165,14 +172,7 @@
@@ -173,14 +179,7 @@
var15 = var10.getIconIndex();
@ -89,7 +88,7 @@
if (this.field_77024_a)
{
@@ -241,10 +241,10 @@
@@ -348,10 +347,10 @@
float var13;
float var16;
@ -103,7 +102,7 @@
GL11.glPushMatrix();
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
GL11.glScalef(10.0F, 10.0F, 10.0F);
@@ -275,11 +275,11 @@
@@ -382,11 +381,11 @@
if (Item.itemsList[var6].requiresMultipleRenderPasses())
{
GL11.glDisable(GL11.GL_LIGHTING);
@ -116,11 +115,11 @@
+
+ for (var9 = 0; var9 < Item.itemsList[var6].getRenderPasses(var7); ++var9)
+ {
+ var10 = Item.itemsList[var6].getIconFromItemStackForMultiplePasses(par3ItemStack, var9);
+ var10 = Item.itemsList[var6].getIconIndex(par3ItemStack, var9);
int var11 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, var9);
var12 = (float)(var11 >> 16 & 255) / 255.0F;
var13 = (float)(var11 >> 8 & 255) / 255.0F;
@@ -299,14 +299,7 @@
@@ -406,14 +405,7 @@
{
GL11.glDisable(GL11.GL_LIGHTING);
@ -136,7 +135,7 @@
var9 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, 0);
float var17 = (float)(var9 >> 16 & 255) / 255.0F;
@@ -333,7 +326,10 @@
@@ -440,7 +432,10 @@
{
if (par3ItemStack != null)
{

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -211,12 +211,14 @@
@@ -213,12 +213,14 @@
if (par4EntityLiving.isPlayerSleeping())
{

View file

@ -1,23 +1,14 @@
--- ../src_base/minecraft/net/minecraft/creativetab/CreativeTabs.java
+++ ../src_work/minecraft/net/minecraft/creativetab/CreativeTabs.java
@@ -2,13 +2,15 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import java.util.Arrays;
import java.util.List;
@@ -7,6 +7,7 @@
import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.enchantment.EnumEnchantmentType;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.StringTranslate;
public class CreativeTabs
{
- public static final CreativeTabs[] creativeTabArray = new CreativeTabs[12];
+ public static CreativeTabs[] creativeTabArray = new CreativeTabs[12];
public static final CreativeTabs tabBlock = new CreativeTabBlock(0, "buildingBlocks");
public static final CreativeTabs tabDecorations = new CreativeTabDeco(1, "decorations");
public static final CreativeTabs tabRedstone = new CreativeTabRedstone(2, "redstone");
@@ -31,8 +33,22 @@
@@ -34,8 +35,22 @@
/** Whether to draw the title in the foreground of the creative GUI */
private boolean drawTitle = true;
@ -40,7 +31,7 @@
this.tabIndex = par1;
this.tabLabel = par2Str;
creativeTabArray[par1] = this;
@@ -119,6 +135,10 @@
@@ -122,6 +137,10 @@
*/
public int getTabColumn()
{
@ -51,7 +42,7 @@
return this.tabIndex % 6;
}
@@ -129,6 +149,10 @@
@@ -132,6 +151,10 @@
*/
public boolean isTabInFirstRow()
{
@ -62,17 +53,19 @@
return this.tabIndex < 6;
}
@@ -146,10 +170,40 @@
@@ -149,11 +172,41 @@
{
Item var5 = var2[var4];
- if (var5 != null && var5.getCreativeTab() == this)
+ if (var5 == null)
{
- {
- var5.getSubItems(var5.shiftedIndex, this, par1List);
+ continue;
}
- }
- }
+ if (var5 == null)
+ {
+ continue;
+ }
+
+ for(CreativeTabs tab : var5.getCreativeTabs())
+ {
@ -105,4 +98,5 @@
+ {
+ return new ItemStack(getTabIconItem());
}
}
@SideOnly(Side.CLIENT)

View file

@ -1,25 +0,0 @@
--- ../src_base/minecraft/net/minecraft/enchantment/Enchantment.java
+++ ../src_work/minecraft/net/minecraft/enchantment/Enchantment.java
@@ -1,6 +1,7 @@
package net.minecraft.enchantment;
import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.StatCollector;
@@ -195,4 +196,14 @@
String var2 = StatCollector.translateToLocal(this.getName());
return var2 + " " + StatCollector.translateToLocal("enchantment.level." + par1);
}
+
+ /**
+ * Called to determine if this enchantment can be applied to a ItemStack
+ * @param item The ItemStack that the enchantment might be put on
+ * @return True if the item is valid, false otherwise
+ */
+ public boolean canEnchantItem(ItemStack item)
+ {
+ return type.canEnchantItem(item.getItem());
+ }
}

View file

@ -1,11 +1,11 @@
--- ../src_base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src_work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -418,7 +418,7 @@
@@ -463,7 +463,7 @@
{
Enchantment var7 = var4[var6];
Enchantment var8 = var5[var7];
- if (var7 != null && var7.type.canEnchantItem(var2))
+ if (var7 != null && var7.canEnchantItem(par1ItemStack))
- if (var8 != null && (var8.type.canEnchantItem(var2) || var4))
+ if (var8 != null && (var8.func_92037_a(par1ItemStack) || var4))
{
for (int var8 = var7.getMinLevel(); var8 <= var7.getMaxLevel(); ++var8)
for (int var9 = var8.getMinLevel(); var9 <= var8.getMaxLevel(); ++var9)
{

View file

@ -1,19 +1,21 @@
--- ../src_base/minecraft/net/minecraft/entity/Entity.java
+++ ../src_work/minecraft/net/minecraft/entity/Entity.java
@@ -2,8 +2,10 @@
@@ -2,8 +2,12 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+import java.util.UUID;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockFluid;
import net.minecraft.block.StepSound;
@@ -11,8 +13,13 @@
import net.minecraft.crash.CrashReport;
@@ -12,8 +16,13 @@
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.enchantment.EnchantmentProtection;
import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.item.EntityBoat;
import net.minecraft.entity.item.EntityItem;
@ -25,7 +27,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagDouble;
@@ -23,6 +30,7 @@
@@ -24,6 +33,7 @@
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction;
import net.minecraft.util.MathHelper;
@ -33,7 +35,7 @@
import net.minecraft.util.ReportedException;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
@@ -221,6 +229,11 @@
@@ -222,6 +232,11 @@
protected int field_82152_aq;
private boolean field_83001_bt;
public EnumEntitySize myEntitySize;
@ -45,7 +47,7 @@
public Entity(World par1World)
{
@@ -543,7 +556,7 @@
@@ -543,7 +558,7 @@
if (!this.worldObj.isRemote)
{
this.setFlag(0, this.fire > 0);
@ -54,7 +56,7 @@
}
this.firstUpdate = false;
@@ -1513,6 +1526,15 @@
@@ -1514,6 +1529,15 @@
par1NBTTagCompound.setInteger("Dimension", this.dimension);
par1NBTTagCompound.setBoolean("Invulnerable", this.field_83001_bt);
par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal);
@ -70,7 +72,7 @@
this.writeEntityToNBT(par1NBTTagCompound);
}
catch (Throwable var5)
@@ -1567,6 +1589,14 @@
@@ -1568,6 +1592,14 @@
this.timeUntilPortal = par1NBTTagCompound.getInteger("PortalCooldown");
this.setPosition(this.posX, this.posY, this.posZ);
this.setRotation(this.rotationYaw, this.rotationPitch);
@ -85,7 +87,7 @@
this.readEntityFromNBT(par1NBTTagCompound);
}
catch (Throwable var5)
@@ -1661,7 +1691,14 @@
@@ -1662,7 +1694,14 @@
{
EntityItem var3 = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
var3.delayBeforeCanPickup = 10;
@ -101,7 +103,7 @@
return var3;
}
@@ -2020,7 +2057,7 @@
@@ -2021,7 +2060,7 @@
*/
public boolean isRiding()
{
@ -110,7 +112,7 @@
}
/**
@@ -2355,7 +2392,7 @@
@@ -2356,7 +2395,7 @@
public float func_82146_a(Explosion par1Explosion, Block par2Block, int par3, int par4, int par5)
{
@ -119,7 +121,7 @@
}
public int func_82143_as()
@@ -2391,4 +2428,84 @@
@@ -2396,4 +2435,84 @@
{
return this.isBurning();
}

View file

@ -20,7 +20,7 @@
public abstract class EntityLiving extends Entity
{
/**
@@ -381,6 +387,7 @@
@@ -387,6 +393,7 @@
public void setAttackTarget(EntityLiving par1EntityLiving)
{
this.attackTarget = par1EntityLiving;
@ -28,7 +28,7 @@
}
/**
@@ -477,6 +484,7 @@
@@ -483,6 +490,7 @@
{
this.entityLivingToAttack = par1EntityLiving;
this.revengeTimer = this.entityLivingToAttack != null ? 60 : 0;
@ -36,7 +36,7 @@
}
protected void entityInit()
@@ -766,6 +774,11 @@
@@ -792,6 +800,11 @@
*/
public void onUpdate()
{
@ -48,7 +48,7 @@
super.onUpdate();
if (!this.worldObj.isRemote)
@@ -951,6 +964,11 @@
@@ -977,6 +990,11 @@
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
@ -60,7 +60,7 @@
if (this.func_85032_ar())
{
return false;
@@ -1161,6 +1179,11 @@
@@ -1188,6 +1206,11 @@
{
if (!this.func_85032_ar())
{
@ -72,7 +72,7 @@
par2 = this.applyArmorCalculations(par1DamageSource, par2);
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
this.health -= par2;
@@ -1225,6 +1248,11 @@
@@ -1252,6 +1275,11 @@
*/
public void onDeath(DamageSource par1DamageSource)
{
@ -84,7 +84,7 @@
Entity var2 = par1DamageSource.getEntity();
if (this.scoreValue >= 0 && var2 != null)
@@ -1247,6 +1275,10 @@
@@ -1274,6 +1302,10 @@
{
var3 = EnchantmentHelper.getLootingModifier((EntityLiving)var2);
}
@ -95,7 +95,7 @@
if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
{
@@ -1255,7 +1287,7 @@
@@ -1282,7 +1314,7 @@
if (this.recentlyHit > 0)
{
@ -104,7 +104,7 @@
if (var4 < 5)
{
@@ -1263,6 +1295,16 @@
@@ -1290,6 +1322,16 @@
}
}
}
@ -121,7 +121,7 @@
}
this.worldObj.setEntityState(this, (byte)3);
@@ -1306,6 +1348,12 @@
@@ -1333,6 +1375,12 @@
*/
protected void fall(float par1)
{
@ -134,7 +134,7 @@
super.fall(par1);
int var2 = MathHelper.ceiling_float_int(par1 - 3.0F);
@@ -1508,7 +1556,7 @@
@@ -1535,7 +1583,7 @@
int var2 = MathHelper.floor_double(this.boundingBox.minY);
int var3 = MathHelper.floor_double(this.posZ);
int var4 = this.worldObj.getBlockId(var1, var2, var3);
@ -143,7 +143,7 @@
}
/**
@@ -1915,6 +1963,7 @@
@@ -1948,6 +1996,7 @@
}
this.isAirBorne = true;
@ -151,7 +151,7 @@
}
/**
@@ -2452,8 +2501,6 @@
@@ -2485,8 +2534,6 @@
return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD;
}
@ -160,7 +160,7 @@
/**
* Remove the speified potion effect from this entity.
*/
@@ -2904,4 +2951,42 @@
@@ -2943,4 +2990,42 @@
{
this.dataWatcher.updateObject(10, Byte.valueOf((byte)par1));
}

View file

@ -12,31 +12,33 @@
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
@@ -33,6 +38,11 @@
/** The EntityItem's random initial float height. */
public float hoverStart = (float)(Math.random() * Math.PI * 2.0D);
@@ -29,6 +34,11 @@
/** The EntityItem's random initial float height. */
public float hoverStart;
+
+ /**
+ * The maximum age of this EntityItem. The item is expired once this is reached.
+ */
+ public int lifespan = 6000;
+
public EntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
public EntityItem(World par1World, double par2, double par4, double par6)
{
super(par1World);
@@ -44,6 +54,7 @@
this.motionX = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D));
this.motionY = 0.20000000298023224D;
this.motionZ = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D));
@@ -49,6 +59,7 @@
{
this(par1World, par2, par4, par6);
this.func_92013_a(par8ItemStack);
+ this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World));
}
/**
@@ -124,7 +135,20 @@
@@ -135,7 +146,22 @@
++this.age;
- if (!this.worldObj.isRemote && this.age >= 6000)
+ ItemStack item = getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (!this.worldObj.isRemote && this.age >= lifespan)
+ {
+ ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj)));
@ -50,24 +52,26 @@
+ }
+ }
+
+ if (this.item == null || this.item.stackSize <= 0)
+ if (item == null || item.stackSize <= 0)
{
this.setDead();
}
@@ -240,6 +264,7 @@
@@ -263,6 +289,7 @@
{
par1NBTTagCompound.setShort("Health", (short)((byte)this.health));
par1NBTTagCompound.setShort("Age", (short)this.age);
+ par1NBTTagCompound.setInteger("Lifespan", lifespan);
if (this.item != null)
if (this.func_92014_d() != null)
{
@@ -257,10 +282,15 @@
@@ -280,10 +307,17 @@
NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item");
this.item = ItemStack.loadItemStackFromNBT(var2);
this.func_92013_a(ItemStack.loadItemStackFromNBT(var2));
- if (this.item == null)
+ if (this.item == null || this.item.stackSize <= 0)
- if (this.func_92014_d() == null)
+ ItemStack item = getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (item == null || item.stackSize <= 0)
{
this.setDead();
}
@ -79,7 +83,7 @@
}
/**
@@ -270,9 +300,21 @@
@@ -293,10 +327,22 @@
{
if (!this.worldObj.isRemote)
{
@ -95,10 +99,11 @@
+ return;
+ }
+
int var2 = this.item.stackSize;
ItemStack var2 = this.func_92014_d();
int var3 = var2.stackSize;
- if (this.delayBeforeCanPickup == 0 && par1EntityPlayer.inventory.addItemStackToInventory(this.item))
+ if (this.delayBeforeCanPickup <= 0 && (event.getResult() == Result.ALLOW || var2 <= 0 || par1EntityPlayer.inventory.addItemStackToInventory(this.item)))
- if (this.delayBeforeCanPickup == 0 && par1EntityPlayer.inventory.addItemStackToInventory(var2))
+ if (this.delayBeforeCanPickup <= 0 && (event.getResult() == Result.ALLOW || var3 <= 0 || par1EntityPlayer.inventory.addItemStackToInventory(var2)))
{
if (this.item.itemID == Block.wood.blockID)
if (var2.itemID == Block.wood.blockID)
{

View file

@ -2,16 +2,16 @@
+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecart.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRail;
@@ -21,6 +23,11 @@
import net.minecraft.util.Vec3;
@@ -23,6 +25,11 @@
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
+import net.minecraftforge.common.IMinecartCollisionHandler;
+import net.minecraftforge.common.MinecartRegistry;
@ -21,9 +21,9 @@
public class EntityMinecart extends Entity implements IInventory
{
/** Array of item stacks stored in minecart (for storage minecarts). */
@@ -50,6 +57,25 @@
@@ -52,6 +59,25 @@
@SideOnly(Side.CLIENT)
protected double velocityZ;
public double velocityZ;
+ /* Forge: Minecart Compatibility Layer Integration. */
+ public static float defaultMaxSpeedRail = 0.4f;
@ -47,7 +47,7 @@
public EntityMinecart(World par1World)
{
super(par1World);
@@ -61,6 +87,18 @@
@@ -63,6 +89,18 @@
this.setSize(0.98F, 0.7F);
this.yOffset = this.height / 2.0F;
this.field_82344_g = par1World != null ? par1World.func_82735_a(this) : null;
@ -66,7 +66,7 @@
}
/**
@@ -86,6 +124,10 @@
@@ -88,6 +126,10 @@
*/
public AxisAlignedBB getCollisionBox(Entity par1Entity)
{
@ -77,7 +77,7 @@
return par1Entity.canBePushed() ? par1Entity.boundingBox : null;
}
@@ -94,6 +136,10 @@
@@ -96,6 +138,10 @@
*/
public AxisAlignedBB getBoundingBox()
{
@ -88,7 +88,7 @@
return null;
}
@@ -102,7 +148,7 @@
@@ -104,7 +150,7 @@
*/
public boolean canBePushed()
{
@ -97,7 +97,7 @@
}
public EntityMinecart(World par1World, double par2, double par4, double par6, int par8)
@@ -157,48 +203,7 @@
@@ -159,48 +205,7 @@
}
this.setDead();
@ -147,7 +147,7 @@
}
return true;
@@ -316,7 +321,7 @@
@@ -318,7 +323,7 @@
this.kill();
}
@ -156,29 +156,7 @@
{
this.worldObj.spawnParticle("largesmoke", this.posX, this.posY + 0.8D, this.posZ, 0.0D, 0.0D, 0.0D);
}
@@ -360,18 +365,18 @@
double var6 = 0.0078125D;
int var8 = this.worldObj.getBlockId(var1, var2, var3);
- if (BlockRail.isRailBlock(var8))
+ if (canUseRail() && BlockRail.isRailBlock(var8))
{
this.fallDistance = 0.0F;
Vec3 var9 = this.func_70489_a(this.posX, this.posY, this.posZ);
- int var10 = this.worldObj.getBlockMetadata(var1, var2, var3);
+ int var10 = ((BlockRail)Block.blocksList[var8]).getBasicRailMetadata(worldObj, this, var1, var2, var3);
this.posY = (double)var2;
boolean var11 = false;
boolean var12 = false;
if (var8 == Block.railPowered.blockID)
{
- var11 = (var10 & 8) != 0;
+ var11 = (worldObj.getBlockMetadata(var1, var2, var3) & 8) != 0;
var12 = !var11;
}
@@ -385,25 +390,7 @@
@@ -441,25 +446,7 @@
this.posY = (double)(var2 + 1);
}
@ -205,7 +183,7 @@
int[][] var13 = field_70500_g[var10];
double var14 = (double)(var13[1][0] - var13[0][0]);
@@ -436,7 +423,7 @@
@@ -492,7 +479,7 @@
}
}
@ -214,7 +192,7 @@
{
var24 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
@@ -484,36 +471,8 @@
@@ -540,36 +527,8 @@
this.posX = var26 + var14 * var24;
this.posZ = var28 + var16 * var24;
this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ);
@ -249,11 +227,11 @@
-
- this.moveEntity(var34, 0.0D, var36);
+
+ moveMinecartOnRail(var1, var2, var3);
+ moveMinecartOnRail(var45, var2, var47);
if (var13[0][1] != 0 && MathHelper.floor_double(this.posX) - var1 == var13[0][0] && MathHelper.floor_double(this.posZ) - var3 == var13[0][2])
if (var13[0][1] != 0 && MathHelper.floor_double(this.posX) - var45 == var13[0][0] && MathHelper.floor_double(this.posZ) - var47 == var13[0][2])
{
@@ -524,42 +483,7 @@
@@ -580,42 +539,7 @@
this.setPosition(this.posX, this.posY + (double)var13[1][1], this.posZ);
}
@ -295,9 +273,9 @@
- }
+ applyDragAndPushForces();
Vec3 var52 = this.func_70489_a(this.posX, this.posY, this.posZ);
Vec3 var54 = this.func_70489_a(this.posX, this.posY, this.posZ);
@@ -589,30 +513,14 @@
@@ -645,30 +569,14 @@
double var41;
@ -329,14 +307,14 @@
+
+ if(shouldDoRailFunctions())
+ {
+ ((BlockRail)Block.blocksList[var8]).onMinecartPass(worldObj, this, var1, var2, var3);
+ ((BlockRail)Block.blocksList[var8]).onMinecartPass(worldObj, this, var45, var2, var47);
+ }
+
+ if (var11 && shouldDoRailFunctions())
{
var41 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
@@ -648,41 +556,7 @@
@@ -704,41 +612,7 @@
}
else
{
@ -375,11 +353,11 @@
- this.motionY *= 0.949999988079071D;
- this.motionZ *= 0.949999988079071D;
- }
+ moveMinecartOffRail(var1, var2, var3);
+ moveMinecartOffRail(var45, var2, var47);
}
this.doBlockCollisions();
@@ -709,7 +583,18 @@
@@ -765,7 +639,18 @@
}
this.setRotation(this.rotationYaw, this.rotationPitch);
@ -399,7 +377,7 @@
if (var15 != null && !var15.isEmpty())
{
@@ -734,17 +619,8 @@
@@ -790,17 +675,8 @@
this.riddenByEntity = null;
}
@ -415,11 +393,11 @@
-
- this.setMinecartPowered(this.fuel > 0);
+ updateFuel();
+ MinecraftForge.EVENT_BUS.post(new MinecartUpdateEvent(this, var1, var2, var3));
+ MinecraftForge.EVENT_BUS.post(new MinecartUpdateEvent(this, var45, var2, var47));
}
}
@@ -768,12 +644,7 @@
@@ -824,12 +700,7 @@
}
else
{
@ -433,7 +411,7 @@
par3 = (double)var10;
@@ -819,13 +690,8 @@
@@ -875,13 +746,8 @@
if (BlockRail.isRailBlock(var10))
{
@ -448,7 +426,7 @@
if (var11 >= 2 && var11 <= 5)
{
@@ -890,13 +756,14 @@
@@ -946,13 +812,14 @@
{
par1NBTTagCompound.setInteger("Type", this.minecartType);
@ -467,7 +445,7 @@
{
NBTTagList var2 = new NBTTagList();
@@ -922,13 +789,21 @@
@@ -978,13 +845,21 @@
{
this.minecartType = par1NBTTagCompound.getInteger("Type");
@ -493,7 +471,7 @@
{
NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
this.cargoItems = new ItemStack[this.getSizeInventory()];
@@ -957,11 +832,17 @@
@@ -1013,11 +888,17 @@
*/
public void applyEntityCollision(Entity par1Entity)
{
@ -512,7 +490,7 @@
{
par1Entity.mountEntity(this);
}
@@ -1007,7 +888,7 @@
@@ -1063,7 +944,7 @@
double var18 = par1Entity.motionX + this.motionX;
double var20 = par1Entity.motionZ + this.motionZ;
@ -521,7 +499,7 @@
{
this.motionX *= 0.20000000298023224D;
this.motionZ *= 0.20000000298023224D;
@@ -1015,7 +896,7 @@
@@ -1071,7 +952,7 @@
par1Entity.motionX *= 0.949999988079071D;
par1Entity.motionZ *= 0.949999988079071D;
}
@ -530,7 +508,7 @@
{
par1Entity.motionX *= 0.20000000298023224D;
par1Entity.motionZ *= 0.20000000298023224D;
@@ -1050,7 +931,7 @@
@@ -1106,7 +987,7 @@
*/
public int getSizeInventory()
{
@ -539,7 +517,7 @@
}
/**
@@ -1153,7 +1034,12 @@
@@ -1209,7 +1090,12 @@
*/
public boolean interact(EntityPlayer par1EntityPlayer)
{
@ -553,7 +531,7 @@
{
if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != par1EntityPlayer)
{
@@ -1165,14 +1051,14 @@
@@ -1221,14 +1107,14 @@
par1EntityPlayer.mountEntity(this);
}
}
@ -570,7 +548,7 @@
{
ItemStack var2 = par1EntityPlayer.inventory.getCurrentItem();
@@ -1296,4 +1182,375 @@
@@ -1352,4 +1238,375 @@
{
return this.dataWatcher.getWatchableObjectInt(18);
}

View file

@ -2,8 +2,8 @@
+++ ../src_work/minecraft/net/minecraft/entity/passive/EntitySheep.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
import java.util.Random;

View file

@ -75,25 +75,29 @@
}
if (par1DamageSource != null)
@@ -671,7 +702,16 @@
@@ -671,7 +702,20 @@
*/
public EntityItem dropOneItem()
public EntityItem dropOneItem(boolean par1)
{
- return this.dropPlayerItemWithRandomChoice(this.inventory.decrStackSize(this.inventory.currentItem, 1), false);
- return this.dropPlayerItemWithRandomChoice(this.inventory.decrStackSize(this.inventory.currentItem, par1 && this.inventory.getCurrentItem() != null ? this.inventory.getCurrentItem().stackSize : 1), false);
+ ItemStack stack = inventory.getCurrentItem();
+
+ if (stack == null)
+ {
+ return null;
+ }
+
+ if (stack.getItem().onDroppedByPlayer(stack, this))
+ {
+ return ForgeHooks.onPlayerTossEvent(this, inventory.decrStackSize(inventory.currentItem, 1));
+ int count = par1 && this.inventory.getCurrentItem() != null ? this.inventory.getCurrentItem().stackSize : 1;
+ return ForgeHooks.onPlayerTossEvent(this, inventory.decrStackSize(inventory.currentItem, count));
+ }
+
+ return null;
}
/**
@@ -680,7 +720,7 @@
@@ -680,7 +724,7 @@
*/
public EntityItem dropPlayerItem(ItemStack par1ItemStack)
{
@ -102,7 +106,7 @@
}
/**
@@ -732,18 +772,33 @@
@@ -732,23 +776,39 @@
*/
public void joinEntityItemWithWorld(EntityItem par1EntityItem)
{
@ -134,13 +138,20 @@
+ ItemStack stack = inventory.getCurrentItem();
+ float var2 = (stack == null ? 1.0F : stack.getItem().getStrVsBlock(stack, par1Block, meta));
int var3 = EnchantmentHelper.getEfficiencyModifier(this);
ItemStack var4 = this.inventory.getCurrentItem();
- if (var3 > 0 && this.inventory.canHarvestBlock(par1Block))
+ if (var3 > 0 && ForgeHooks.canHarvestBlock(par1Block, this, meta))
if (var3 > 0 && var4 != null)
{
var2 += (float)(var3 * var3 + 1);
float var5 = (float)(var3 * var3 + 1);
-
- if (!var4.canHarvestBlock(par1Block) && var2 <= 1.0F)
+ boolean canHarvest = ForgeHooks.canHarvestBlock(par1Block, this, meta);
+
+ if (!canHarvest && var2 <= 1.0F)
{
var2 += var5 * 0.08F;
}
@@ -768,7 +823,8 @@
@@ -778,7 +838,8 @@
var2 /= 5.0F;
}
@ -150,7 +161,7 @@
}
/**
@@ -776,7 +832,7 @@
@@ -786,7 +847,7 @@
*/
public boolean canHarvestBlock(Block par1Block)
{
@ -159,7 +170,7 @@
}
/**
@@ -1061,12 +1117,22 @@
@@ -1073,12 +1134,22 @@
{
if (!this.func_85032_ar())
{
@ -183,7 +194,7 @@
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
this.addExhaustion(par1DamageSource.getHungerDamage());
this.health -= par2;
@@ -1107,6 +1173,10 @@
@@ -1119,6 +1190,10 @@
public boolean interactWith(Entity par1Entity)
{
@ -194,7 +205,7 @@
if (par1Entity.interact(this))
{
return true;
@@ -1150,7 +1220,9 @@
@@ -1162,7 +1237,9 @@
*/
public void destroyCurrentEquippedItem()
{
@ -204,7 +215,7 @@
}
/**
@@ -1167,6 +1239,15 @@
@@ -1179,6 +1256,15 @@
*/
public void attackTargetEntityWithCurrentItem(Entity par1Entity)
{
@ -220,7 +231,7 @@
if (par1Entity.canAttackWithItem())
{
if (!par1Entity.func_85031_j(this))
@@ -1325,6 +1406,12 @@
@@ -1342,6 +1428,12 @@
*/
public EnumStatus sleepInBedAt(int par1, int par2, int par3)
{
@ -233,7 +244,7 @@
if (!this.worldObj.isRemote)
{
if (this.isPlayerSleeping() || !this.isEntityAlive())
@@ -1364,6 +1451,11 @@
@@ -1381,6 +1473,11 @@
{
int var9 = this.worldObj.getBlockMetadata(par1, par2, par3);
int var5 = BlockBed.getDirection(var9);
@ -245,7 +256,7 @@
float var10 = 0.5F;
float var7 = 0.5F;
@@ -1434,10 +1526,12 @@
@@ -1451,10 +1548,12 @@
ChunkCoordinates var4 = this.playerLocation;
ChunkCoordinates var5 = this.playerLocation;
@ -262,7 +273,7 @@
if (var5 == null)
{
@@ -1474,7 +1568,9 @@
@@ -1491,7 +1590,9 @@
*/
private boolean isInBed()
{
@ -273,7 +284,7 @@
}
/**
@@ -1489,9 +1585,12 @@
@@ -1506,9 +1607,12 @@
var3.loadChunk(par1ChunkCoordinates.posX - 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4);
var3.loadChunk(par1ChunkCoordinates.posX + 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4);
@ -289,7 +300,7 @@
return var8;
}
else
@@ -1513,8 +1612,11 @@
@@ -1530,8 +1634,11 @@
{
if (this.playerLocation != null)
{
@ -303,16 +314,16 @@
switch (var2)
{
@@ -1823,7 +1925,7 @@
@@ -1840,7 +1947,7 @@
{
if (par1ItemStack.getItem().requiresMultipleRenderPasses())
{
- return par1ItemStack.getItem().getIconFromDamageForRenderPass(par1ItemStack.getItemDamage(), par2);
+ return par1ItemStack.getItem().getIconFromItemStackForMultiplePasses(par1ItemStack, par2);
+ return par1ItemStack.getItem().getIconIndex(par1ItemStack, par2);
}
if (this.itemInUse != null && par1ItemStack.itemID == Item.bow.shiftedIndex)
@@ -1845,6 +1947,7 @@
@@ -1862,6 +1969,7 @@
return 101;
}
}
@ -320,7 +331,7 @@
}
return var3;
@@ -2063,6 +2166,14 @@
@@ -2082,6 +2190,14 @@
}
this.theInventoryEnderChest = par1EntityPlayer.theInventoryEnderChest;

View file

@ -69,7 +69,7 @@
+ return;
+ }
+
this.mcServer.getConfigurationManager().sendPacketToAllPlayers(new Packet3Chat(par1DamageSource.getDeathMessage(this)));
this.mcServer.getConfigurationManager().func_92027_k(par1DamageSource.getDeathMessage(this));
if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/item/Item.java
+++ ../src_work/minecraft/net/minecraft/item/Item.java
@@ -14,6 +14,7 @@
@@ -13,6 +13,7 @@
import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.entity.item.EntityPainting;
import net.minecraft.entity.player.EntityPlayer;
@ -8,7 +8,17 @@
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionHelper;
import net.minecraft.stats.StatList;
@@ -227,6 +228,9 @@
@@ -21,7 +22,9 @@
import net.minecraft.util.StatCollector;
import net.minecraft.util.StringTranslate;
import net.minecraft.util.Vec3;
+import net.minecraft.util.WeightedRandomChestContent;
import net.minecraft.world.World;
+import net.minecraftforge.common.ChestGenHooks;
public class Item
{
@@ -229,6 +232,9 @@
/** full name of item from language file */
private String itemName;
@ -18,7 +28,7 @@
public Item(int par1)
{
@@ -234,12 +238,17 @@
@@ -236,12 +242,17 @@
if (itemsList[256 + par1] != null)
{
@ -37,7 +47,7 @@
}
/**
@@ -625,6 +634,10 @@
@@ -627,6 +638,10 @@
float var18 = var15 * var16;
float var20 = var14 * var16;
double var21 = 5.0D;
@ -48,7 +58,7 @@
Vec3 var23 = var13.addVector((double)var18 * var21, (double)var17 * var21, (double)var20 * var21);
return par1World.rayTraceBlocks_do_do(var13, var23, par3, !par3);
}
@@ -699,4 +712,279 @@
@@ -701,4 +716,299 @@
{
StatList.initStats();
}
@ -323,8 +333,28 @@
+ * @param pass the multi-render pass
+ * @return the icon index
+ */
+ public int getIconFromItemStackForMultiplePasses(ItemStack stack, int pass)
+ public int getIconIndex(ItemStack stack, int pass)
+ {
+ return getIconFromDamageForRenderPass(stack.getItemDamage(), pass);
+ }
+
+ /**
+ * Generates the base Random item for a specific instance of the chest gen,
+ * Enchanted books use this to pick a random enchantment.
+ *
+ * @param chest The chest category to generate for
+ * @param rnd World RNG
+ * @param original Original result registered with the chest gen hooks.
+ * @return New values to use as the random item, typically this will be original
+ */
+ public WeightedRandomChestContent getChestGenBase(ChestGenHooks chest, Random rnd, WeightedRandomChestContent original)
+ {
+ if (this instanceof ItemEnchantedBook)
+ {
+ return ((ItemEnchantedBook)this).func_92058_a(rnd,
+ original.theMinimumChanceToGenerateItem,
+ original.theMaximumChanceToGenerateItem, original.itemWeight);
+ }
+ return original;
+ }
}

View file

@ -1,14 +1,15 @@
--- ../src_base/minecraft/net/minecraft/item/ItemHoe.java
+++ ../src_work/minecraft/net/minecraft/item/ItemHoe.java
@@ -1,5 +1,8 @@
package net.minecraft.item;
@@ -6,6 +6,9 @@
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event.Result;
+import net.minecraftforge.event.entity.player.UseHoeEvent;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.block.Block;
public class ItemHoe extends Item
{
@@ -32,6 +35,18 @@
}
else

View file

@ -20,7 +20,7 @@
/** The world object that this object is connected to. */
public World theWorld;
@@ -142,6 +153,13 @@
@@ -145,6 +156,13 @@
{
if (!this.gameType.isAdventure() || this.thisPlayerMP.canCurrentToolHarvestBlock(par1, par2, par3))
{
@ -34,7 +34,7 @@
if (this.isCreative())
{
if (!this.theWorld.extinguishFire((EntityPlayer)null, par1, par2, par3, par4))
@@ -151,15 +169,32 @@
@@ -154,15 +172,32 @@
}
else
{
@ -73,7 +73,7 @@
}
if (var6 > 0 && var5 >= 1.0F)
@@ -233,7 +268,7 @@
@@ -236,7 +271,7 @@
var4.onBlockHarvested(this.theWorld, par1, par2, par3, var5, this.thisPlayerMP);
}
@ -82,7 +82,7 @@
if (var4 != null && var6)
{
@@ -254,19 +289,30 @@
@@ -257,19 +292,30 @@
}
else
{
@ -115,7 +115,7 @@
if (var7 != null)
{
@@ -278,6 +324,7 @@
@@ -281,6 +327,7 @@
}
}
@ -123,7 +123,7 @@
if (var6 && var8)
{
Block.blocksList[var4].harvestBlock(this.theWorld, this.thisPlayerMP, par1, par2, par3, var5);
@@ -318,6 +365,7 @@
@@ -321,6 +368,7 @@
if (var6.stackSize == 0)
{
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = null;
@ -131,10 +131,11 @@
}
if (!par1EntityPlayer.isUsingItem())
@@ -335,29 +383,56 @@
@@ -338,35 +386,65 @@
*/
public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
- int var11;
+ PlayerInteractEvent event = ForgeEventFactory.onPlayerInteract(par1EntityPlayer, Action.RIGHT_CLICK_BLOCK, par4, par5, par6, par7);
+ if (event.isCanceled())
+ {
@ -142,6 +143,35 @@
+ return false;
+ }
+
+ int var11 = par2World.getBlockId(par4, par5, par6);
if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null)
{
- var11 = par2World.getBlockId(par4, par5, par6);
-
if (var11 > 0 && Block.blocksList[var11].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10))
{
return true;
}
}
- if (par3ItemStack == null)
- {
- return false;
- }
- else if (this.isCreative())
- {
- var11 = par3ItemStack.getItemDamage();
- int var12 = par3ItemStack.stackSize;
- boolean var13 = par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10);
- par3ItemStack.setItemDamage(var11);
- par3ItemStack.stackSize = var12;
- return var13;
- }
- else
- {
- return par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10);
- }
+ Item item = (par3ItemStack != null ? par3ItemStack.getItem() : null);
+ if (item != null && item.onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10))
+ {
@ -149,29 +179,6 @@
+ return true;
+ }
+
int var11 = par2World.getBlockId(par4, par5, par6);
-
- if (var11 > 0 && Block.blocksList[var11].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10))
- {
- return true;
- }
- else if (par3ItemStack == null)
- {
- return false;
- }
- else if (this.isCreative())
- {
- int var12 = par3ItemStack.getItemDamage();
- int var13 = par3ItemStack.stackSize;
- boolean var14 = par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10);
- par3ItemStack.setItemDamage(var12);
- par3ItemStack.stackSize = var13;
- return var14;
- }
- else
- {
- return par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10);
- }
+ Block block = Block.blocksList[var11];
+ boolean result = false;
+
@ -210,7 +217,7 @@
}
/**
@@ -367,4 +442,13 @@
@@ -376,4 +454,13 @@
{
this.theWorld = par1WorldServer;
}

View file

@ -1,12 +1,13 @@
--- ../src_base/minecraft/net/minecraft/item/ItemTool.java
+++ ../src_work/minecraft/net/minecraft/item/ItemTool.java
@@ -1,5 +1,6 @@
package net.minecraft.item;
@@ -7,6 +7,7 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeHooks;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.block.Block;
public class ItemTool extends Item
{
@@ -110,4 +111,15 @@
{
return this.toolMaterial.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/item/crafting/CraftingManager.java
+++ ../src_work/minecraft/net/minecraft/item/crafting/CraftingManager.java
@@ -268,7 +268,7 @@
@@ -269,7 +269,7 @@
}
}

View file

@ -76,27 +76,27 @@
this.playerEntity.onGround = par1Packet10Flying.onGround;
this.mcServer.getConfigurationManager().serverUpdateMountedMovingPlayer(this.playerEntity);
this.playerEntity.updateFlyingState(this.playerEntity.posY - var3, par1Packet10Flying.onGround);
@@ -437,7 +464,10 @@
double var12 = this.playerEntity.posZ - ((double)var7 + 0.5D);
double var14 = var8 * var8 + var10 * var10 + var12 * var12;
@@ -447,7 +474,10 @@
double var13 = this.playerEntity.posZ - ((double)var8 + 0.5D);
double var15 = var9 * var9 + var11 * var11 + var13 * var13;
- if (var14 > 36.0D)
- if (var15 > 36.0D)
+ double dist = playerEntity.theItemInWorldManager.getBlockReachDistance() + 1;
+ dist *= dist;
+
+ if (var14 > dist)
+ if (var15 > dist)
{
return;
}
@@ -461,6 +491,7 @@
@@ -471,6 +501,7 @@
{
if (var20 <= this.mcServer.getSpawnProtectionSize() && !var3)
if (var18 <= var3 && !var4)
{
+ ForgeEventFactory.onPlayerInteract(playerEntity, Action.LEFT_CLICK_BLOCK, var5, var6, var7, 0);
this.playerEntity.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(var5, var6, var7, var2));
+ ForgeEventFactory.onPlayerInteract(playerEntity, Action.LEFT_CLICK_BLOCK, var6, var7, var8, 0);
this.playerEntity.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(var6, var7, var8, var2));
}
else
@@ -519,7 +550,11 @@
@@ -518,7 +549,11 @@
return;
}
@ -109,18 +109,18 @@
}
else if (par1Packet15Place.getYPosition() >= this.mcServer.getBuildLimit() - 1 && (par1Packet15Place.getDirection() == 1 || par1Packet15Place.getYPosition() >= this.mcServer.getBuildLimit()))
{
@@ -537,7 +572,9 @@
var12 = var11;
@@ -536,7 +571,9 @@
var13 = var12;
}
- if (this.hasMoved && this.playerEntity.getDistanceSq((double)var5 + 0.5D, (double)var6 + 0.5D, (double)var7 + 0.5D) < 64.0D && (var12 > this.mcServer.getSpawnProtectionSize() || var9))
- if (this.hasMoved && this.playerEntity.getDistanceSq((double)var5 + 0.5D, (double)var6 + 0.5D, (double)var7 + 0.5D) < 64.0D && (var13 > var9 || var10))
+ double dist = playerEntity.theItemInWorldManager.getBlockReachDistance() + 1;
+ dist *= dist;
+ if (this.hasMoved && this.playerEntity.getDistanceSq((double)var5 + 0.5D, (double)var6 + 0.5D, (double)var7 + 0.5D) < dist && (var12 > this.mcServer.getSpawnProtectionSize() || var9))
+ if (this.hasMoved && this.playerEntity.getDistanceSq((double)var5 + 0.5D, (double)var6 + 0.5D, (double)var7 + 0.5D) < dist && (var13 > var9 || var10))
{
this.playerEntity.theItemInWorldManager.activateBlockOrUseItem(this.playerEntity, var2, var3, var5, var6, var7, var8, par1Packet15Place.getXOffset(), par1Packet15Place.getYOffset(), par1Packet15Place.getZOffset());
}
@@ -704,8 +741,12 @@
@@ -703,8 +740,12 @@
this.sendPacketToPlayer(new Packet3Chat("Cannot send chat message."));
return;
}
@ -135,7 +135,7 @@
logger.info(var2);
this.mcServer.getConfigurationManager().sendPacketToAllPlayers(new Packet3Chat(var2, false));
}
@@ -836,7 +877,7 @@
@@ -835,7 +876,7 @@
return;
}

View file

@ -1,17 +1,16 @@
--- ../src_base/minecraft/net/minecraft/network/packet/Packet56MapChunks.java
+++ ../src_work/minecraft/net/minecraft/network/packet/Packet56MapChunks.java
@@ -122,7 +122,13 @@
var7 += this.field_73590_a[var6] >> var8 & 1;
@@ -135,6 +135,13 @@
var9 += 2048 * var7;
}
- var8 = 2048 * 5 * var7 + 256;
+ int msb = 0; //BugFix: MC does not read the MSB array from the packet properly, causing issues for servers that use blocks > 256
+ for (int x = 0; x < 16; x++)
+ {
+ msb += (field_73588_b[var6] >> x) & 1;
+ }
+ var9 += (2048 * msb);
+
+ var8 = 2048 * 5 * var7 + (2048 * msb) + 256;
this.field_73584_f[var6] = new byte[var8];
System.arraycopy(var3, var5, this.field_73584_f[var6], 0, var8);
var5 += var8;
this.field_73584_f[var6] = new byte[var9];
System.arraycopy(var3, var5, this.field_73584_f[var6], 0, var9);
var5 += var9;

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/server/MinecraftServer.java
+++ ../src_work/minecraft/net/minecraft/server/MinecraftServer.java
@@ -13,6 +13,7 @@
@@ -12,6 +12,7 @@
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@ -29,7 +29,7 @@
private KeyPair serverKeyPair;
/** Username of the server owner (for integrated servers) */
@@ -237,8 +243,6 @@
@@ -238,8 +244,6 @@
{
this.convertMapIfNeeded(par1Str);
this.setUserMessage("menu.loadingLevel");
@ -38,7 +38,7 @@
ISaveHandler var7 = this.anvilConverterForAnvilFile.getSaveLoader(par1Str, true);
WorldInfo var9 = var7.loadWorldInfo();
WorldSettings var8;
@@ -258,46 +262,23 @@
@@ -259,46 +263,23 @@
var8.enableBonusChest();
}
@ -96,7 +96,7 @@
this.setDifficultyForAllWorlds(this.getDifficulty());
this.initialWorldChunkLoad();
}
@@ -426,7 +407,14 @@
@@ -427,7 +408,14 @@
for (int var1 = 0; var1 < this.worldServers.length; ++var1)
{
WorldServer var2 = this.worldServers[var1];
@ -111,7 +111,7 @@
}
if (this.usageSnooper != null && this.usageSnooper.isSnooperRunning())
@@ -649,13 +637,15 @@
@@ -650,13 +638,15 @@
this.theProfiler.startSection("levels");
int var1;
@ -132,7 +132,7 @@
this.theProfiler.startSection(var4.getWorldInfo().getWorldName());
this.theProfiler.startSection("pools");
var4.getWorldVec3Pool().clear();
@@ -702,9 +692,11 @@
@@ -703,9 +693,11 @@
this.theProfiler.endSection();
}
@ -147,7 +147,7 @@
this.theProfiler.endStartSection("connection");
this.getNetworkThread().networkTick();
this.theProfiler.endStartSection("players");
@@ -758,7 +750,13 @@
@@ -759,7 +751,13 @@
*/
public WorldServer worldServerForDimension(int par1)
{
@ -162,7 +162,7 @@
}
@SideOnly(Side.SERVER)
@@ -1129,6 +1127,7 @@
@@ -1130,6 +1128,7 @@
if (var2 != null)
{

View file

@ -15,7 +15,7 @@
public abstract class ServerConfigurationManager
{
@@ -322,6 +326,16 @@
@@ -323,6 +327,16 @@
*/
public EntityPlayerMP respawnPlayer(EntityPlayerMP par1EntityPlayerMP, int par2, boolean par3)
{
@ -32,7 +32,7 @@
par1EntityPlayerMP.getServerForPlayer().getEntityTracker().removeAllTrackingPlayers(par1EntityPlayerMP);
par1EntityPlayerMP.getServerForPlayer().getEntityTracker().removeEntityFromAllTrackingPlayers(par1EntityPlayerMP);
par1EntityPlayerMP.getServerForPlayer().getPlayerManager().removePlayer(par1EntityPlayerMP);
@@ -344,6 +358,7 @@
@@ -345,6 +359,7 @@
EntityPlayerMP var7 = new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension), par1EntityPlayerMP.username, (ItemInWorldManager)var6);
var7.playerNetServerHandler = par1EntityPlayerMP.playerNetServerHandler;
var7.clonePlayer(par1EntityPlayerMP, par3);
@ -40,7 +40,7 @@
var7.entityId = par1EntityPlayerMP.entityId;
WorldServer var8 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension);
this.func_72381_a(var7, par1EntityPlayerMP, var8);
@@ -387,14 +402,20 @@
@@ -388,14 +403,20 @@
public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2)
{
@ -62,7 +62,7 @@
this.func_72375_a(par1EntityPlayerMP, var4);
par1EntityPlayerMP.playerNetServerHandler.setPlayerLocation(par1EntityPlayerMP.posX, par1EntityPlayerMP.posY, par1EntityPlayerMP.posZ, par1EntityPlayerMP.rotationYaw, par1EntityPlayerMP.rotationPitch);
par1EntityPlayerMP.theItemInWorldManager.setWorld(var5);
@@ -416,38 +437,23 @@
@@ -417,38 +438,23 @@
*/
public void transferEntityToWorld(Entity par1Entity, int par2, WorldServer par3WorldServer, WorldServer par4WorldServer)
{
@ -112,7 +112,7 @@
{
ChunkCoordinates var18;
@@ -484,7 +490,7 @@
@@ -485,7 +491,7 @@
par4WorldServer.spawnEntityInWorld(par1Entity);
par1Entity.setLocationAndAngles(var5, par1Entity.posY, var7, par1Entity.rotationYaw, par1Entity.rotationPitch);
par4WorldServer.updateEntityWithOptionalForce(par1Entity, false);

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/util/WeightedRandomChestContent.java
+++ ../src_work/minecraft/net/minecraft/util/WeightedRandomChestContent.java
@@ -5,6 +5,7 @@
@@ -4,6 +4,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.tileentity.TileEntityDispenser;
@ -8,72 +8,53 @@
public class WeightedRandomChestContent extends WeightedRandomItem
{
@@ -19,6 +20,8 @@
/** The maximum chance of item generating. */
private int theMaximumChanceToGenerateItem;
+
+ public final ItemStack itemStack;
public WeightedRandomChestContent(int par1, int par2, int par3, int par4, int par5)
{
@@ -27,8 +30,16 @@
this.theItemDamage = par2;
this.theMinimumChanceToGenerateItem = par3;
this.theMaximumChanceToGenerateItem = par4;
+ itemStack = new ItemStack(par1, 1, par2);
}
-
+
+ public WeightedRandomChestContent(ItemStack stack, int min, int max, int weight)
+ {
+ super(weight);
+ itemStack = stack;
+ theMinimumChanceToGenerateItem = min;
+ theMaximumChanceToGenerateItem = max;
+ }
/**
* Generates the Chest contents.
*/
@@ -37,18 +48,11 @@
@@ -40,22 +41,11 @@
for (int var4 = 0; var4 < par3; ++var4)
{
WeightedRandomChestContent var5 = (WeightedRandomChestContent)WeightedRandom.getRandomItem(par0Random, par1ArrayOfWeightedRandomChestContent);
- int var6 = var5.theMinimumChanceToGenerateItem + par0Random.nextInt(var5.theMaximumChanceToGenerateItem - var5.theMinimumChanceToGenerateItem + 1);
+ ItemStack[] stacks = ChestGenHooks.generateStacks(par0Random, var5.itemStack, var5.theMinimumChanceToGenerateItem, var5.theMaximumChanceToGenerateItem);
+ ItemStack[] stacks = ChestGenHooks.generateStacks(par0Random, var5.theItemId, var5.theMinimumChanceToGenerateItem, var5.theMaximumChanceToGenerateItem);
- if (Item.itemsList[var5.theItemId].getItemStackLimit() >= var6)
- if (var5.theItemId.getMaxStackSize() >= var6)
+ for (ItemStack item : stacks)
{
- par2TileEntityChest.setInventorySlotContents(par0Random.nextInt(par2TileEntityChest.getSizeInventory()), new ItemStack(var5.theItemId, var6, var5.theItemDamage));
- ItemStack var7 = var5.theItemId.copy();
- var7.stackSize = var6;
- par2TileEntityChest.setInventorySlotContents(par0Random.nextInt(par2TileEntityChest.getSizeInventory()), var7);
- }
- else
- {
- for (int var7 = 0; var7 < var6; ++var7)
- for (int var9 = 0; var9 < var6; ++var9)
- {
- par2TileEntityChest.setInventorySlotContents(par0Random.nextInt(par2TileEntityChest.getSizeInventory()), new ItemStack(var5.theItemId, 1, var5.theItemDamage));
- ItemStack var8 = var5.theItemId.copy();
- var8.stackSize = 1;
- par2TileEntityChest.setInventorySlotContents(par0Random.nextInt(par2TileEntityChest.getSizeInventory()), var8);
- }
+ par2TileEntityChest.setInventorySlotContents(par0Random.nextInt(par2TileEntityChest.getSizeInventory()), item);
}
}
}
@@ -61,18 +65,11 @@
@@ -68,22 +58,11 @@
for (int var4 = 0; var4 < par3; ++var4)
{
WeightedRandomChestContent var5 = (WeightedRandomChestContent)WeightedRandom.getRandomItem(par0Random, par1ArrayOfWeightedRandomChestContent);
- int var6 = var5.theMinimumChanceToGenerateItem + par0Random.nextInt(var5.theMaximumChanceToGenerateItem - var5.theMinimumChanceToGenerateItem + 1);
+ ItemStack[] stacks = ChestGenHooks.generateStacks(par0Random, var5.itemStack, var5.theMinimumChanceToGenerateItem, var5.theMaximumChanceToGenerateItem);
+ ItemStack[] stacks = ChestGenHooks.generateStacks(par0Random, var5.theItemId, var5.theMinimumChanceToGenerateItem, var5.theMaximumChanceToGenerateItem);
- if (Item.itemsList[var5.theItemId].getItemStackLimit() >= var6)
- if (var5.theItemId.getMaxStackSize() >= var6)
+ for (ItemStack item : stacks)
{
- par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), new ItemStack(var5.theItemId, var6, var5.theItemDamage));
- ItemStack var7 = var5.theItemId.copy();
- var7.stackSize = var6;
- par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), var7);
- }
- else
- {
- for (int var7 = 0; var7 < var6; ++var7)
- for (int var9 = 0; var9 < var6; ++var9)
- {
- par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), new ItemStack(var5.theItemId, 1, var5.theItemDamage));
- ItemStack var8 = var5.theItemId.copy();
- var8.stackSize = 1;
- par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), var8);
- }
+ par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), item);
}

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/world/Explosion.java
+++ ../src_work/minecraft/net/minecraft/world/Explosion.java
@@ -89,7 +89,7 @@
@@ -90,7 +90,7 @@
if (var25 > 0)
{
Block var26 = Block.blocksList[var25];

View file

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/world/World.java
+++ ../src_work/minecraft/net/minecraft/world/World.java
@@ -43,8 +43,30 @@
@@ -44,8 +44,30 @@
import net.minecraft.world.storage.MapStorage;
import net.minecraft.world.storage.WorldInfo;
@ -31,7 +31,7 @@
/**
* boolean; if true updates scheduled by scheduleBlockUpdate happen immediately
*/
@@ -169,6 +191,11 @@
@@ -165,6 +187,11 @@
* Gets the biome for a given set of x/z coordinates
*/
public BiomeGenBase getBiomeGenForCoords(int par1, int par2)
@ -43,7 +43,7 @@
{
if (this.blockExists(par1, 0, par2))
{
@@ -199,7 +226,13 @@
@@ -195,7 +222,13 @@
this.theProfiler = par5Profiler;
this.worldInfo = new WorldInfo(par4WorldSettings, par2Str);
this.provider = par3WorldProvider;
@ -58,7 +58,7 @@
VillageCollection var6 = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages");
if (var6 == null)
@@ -213,7 +246,7 @@
@@ -209,7 +242,7 @@
this.villageCollectionObj.func_82566_a(this);
}
@ -67,7 +67,7 @@
this.chunkProvider = this.createChunkProvider();
this.calculateInitialSkylight();
this.calculateInitialWeather();
@@ -227,7 +260,7 @@
@@ -223,7 +256,7 @@
this.isRemote = false;
this.saveHandler = par1ISaveHandler;
this.theProfiler = par5Profiler;
@ -76,7 +76,7 @@
this.worldInfo = par1ISaveHandler.loadWorldInfo();
if (par4WorldProvider != null)
@@ -280,12 +313,20 @@
@@ -276,12 +309,20 @@
this.worldInfo.setServerInitialized(true);
}
@ -99,7 +99,7 @@
}
else
{
@@ -295,6 +336,19 @@
@@ -291,6 +332,19 @@
this.calculateInitialSkylight();
this.calculateInitialWeather();
@ -119,7 +119,7 @@
}
/**
@@ -383,7 +437,8 @@
@@ -379,7 +433,8 @@
*/
public boolean isAirBlock(int par1, int par2, int par3)
{
@ -129,7 +129,7 @@
}
/**
@@ -392,7 +447,8 @@
@@ -388,7 +443,8 @@
public boolean blockHasTileEntity(int par1, int par2, int par3)
{
int var4 = this.getBlockId(par1, par2, par3);
@ -139,7 +139,7 @@
}
public int func_85175_e(int par1, int par2, int par3)
@@ -1134,7 +1190,7 @@
@@ -1130,7 +1186,7 @@
*/
public boolean isDaytime()
{
@ -148,7 +148,7 @@
}
/**
@@ -1166,7 +1222,7 @@
@@ -1162,7 +1218,7 @@
int var12 = this.getBlockMetadata(var8, var9, var10);
Block var13 = Block.blocksList[var11];
@ -157,7 +157,7 @@
{
MovingObjectPosition var14 = var13.collisionRayTrace(this, var8, var9, var10, par1Vec3, par2Vec3);
@@ -1366,6 +1422,12 @@
@@ -1362,6 +1418,12 @@
*/
public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4)
{
@ -170,7 +170,7 @@
if (par1Entity != null && par2Str != null)
{
for (int var5 = 0; var5 < this.worldAccesses.size(); ++var5)
@@ -1377,6 +1439,12 @@
@@ -1373,6 +1435,12 @@
public void func_85173_a(EntityPlayer par1EntityPlayer, String par2Str, float par3, float par4)
{
@ -183,7 +183,7 @@
if (par1EntityPlayer != null && par2Str != null)
{
for (int var5 = 0; var5 < this.worldAccesses.size(); ++var5)
@@ -1463,6 +1531,11 @@
@@ -1459,6 +1527,11 @@
EntityPlayer var5 = (EntityPlayer)par1Entity;
this.playerEntities.add(var5);
this.updateAllPlayersSleepingFlag();
@ -195,7 +195,7 @@
}
this.getChunkFromChunkCoords(var2, var3).addEntity(par1Entity);
@@ -1706,6 +1779,12 @@
@@ -1702,6 +1775,12 @@
* Calculates the color for the skybox
*/
public Vec3 getSkyColor(Entity par1Entity, float par2)
@ -208,7 +208,7 @@
{
float var3 = this.getCelestialAngle(par2);
float var4 = MathHelper.cos(var3 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
@@ -1801,6 +1880,12 @@
@@ -1797,6 +1876,12 @@
@SideOnly(Side.CLIENT)
public Vec3 drawClouds(float par1)
{
@ -221,7 +221,7 @@
float var2 = this.getCelestialAngle(par1);
float var3 = MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
@@ -1879,7 +1964,7 @@
@@ -1875,7 +1960,7 @@
{
int var5 = var3.getBlockID(par1, var4, par2);
@ -230,7 +230,7 @@
{
return var4 + 1;
}
@@ -1894,6 +1979,12 @@
@@ -1890,6 +1975,12 @@
* How bright are stars in the sky
*/
public float getStarBrightness(float par1)
@ -243,7 +243,7 @@
{
float var2 = this.getCelestialAngle(par1);
float var3 = 1.0F - (MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.25F);
@@ -2094,7 +2185,7 @@
@@ -2091,7 +2182,7 @@
if (var11 != null)
{
@ -252,7 +252,7 @@
}
}
}
@@ -2103,6 +2194,10 @@
@@ -2100,6 +2191,10 @@
if (!this.entityRemoval.isEmpty())
{
@ -263,7 +263,7 @@
this.loadedTileEntityList.removeAll(this.entityRemoval);
this.entityRemoval.clear();
}
@@ -2123,18 +2218,18 @@
@@ -2120,18 +2215,18 @@
{
this.loadedTileEntityList.add(var12);
}
@ -286,7 +286,7 @@
}
}
@@ -2147,13 +2242,13 @@
@@ -2144,13 +2239,13 @@
public void addTileEntity(Collection par1Collection)
{
@ -307,7 +307,7 @@
}
}
@@ -2173,9 +2268,17 @@
@@ -2170,9 +2265,17 @@
{
int var3 = MathHelper.floor_double(par1Entity.posX);
int var4 = MathHelper.floor_double(par1Entity.posZ);
@ -328,7 +328,7 @@
{
par1Entity.lastTickPosX = par1Entity.posX;
par1Entity.lastTickPosY = par1Entity.posY;
@@ -2407,6 +2510,14 @@
@@ -2405,6 +2508,14 @@
{
return true;
}
@ -343,7 +343,7 @@
}
}
}
@@ -2712,25 +2823,21 @@
@@ -2710,25 +2821,21 @@
*/
public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
{
@ -384,7 +384,7 @@
}
}
@@ -2739,27 +2846,10 @@
@@ -2737,27 +2844,10 @@
*/
public void removeBlockTileEntity(int par1, int par2, int par3)
{
@ -416,7 +416,7 @@
}
}
@@ -2785,7 +2875,8 @@
@@ -2783,7 +2873,8 @@
*/
public boolean isBlockNormalCube(int par1, int par2, int par3)
{
@ -426,7 +426,7 @@
}
public boolean func_85174_u(int par1, int par2, int par3)
@@ -2808,8 +2899,7 @@
@@ -2806,8 +2897,7 @@
*/
public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3)
{
@ -436,7 +436,7 @@
}
/**
@@ -2825,7 +2915,7 @@
@@ -2823,7 +2913,7 @@
if (var5 != null && !var5.isEmpty())
{
Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)];
@ -445,7 +445,7 @@
}
else
{
@@ -2856,8 +2946,7 @@
@@ -2854,8 +2944,7 @@
*/
public void setAllowedSpawnTypes(boolean par1, boolean par2)
{
@ -455,7 +455,7 @@
}
/**
@@ -2873,6 +2962,11 @@
@@ -2871,6 +2960,11 @@
*/
private void calculateInitialWeather()
{
@ -467,7 +467,7 @@
if (this.worldInfo.isRaining())
{
this.rainingStrength = 1.0F;
@@ -2888,6 +2982,11 @@
@@ -2886,6 +2980,11 @@
* Updates all weather states.
*/
protected void updateWeather()
@ -479,7 +479,7 @@
{
if (!this.provider.hasNoSky)
{
@@ -2990,12 +3089,14 @@
@@ -2983,12 +3082,14 @@
public void toggleRain()
{
@ -495,7 +495,7 @@
this.theProfiler.startSection("buildList");
int var1;
EntityPlayer var2;
@@ -3102,6 +3203,11 @@
@@ -3095,6 +3196,11 @@
*/
public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4)
{
@ -507,7 +507,7 @@
BiomeGenBase var5 = this.getBiomeGenForCoords(par1, par3);
float var6 = var5.getFloatTemperature();
@@ -3159,6 +3265,11 @@
@@ -3152,6 +3258,11 @@
* Tests whether or not snow can be placed at a given location
*/
public boolean canSnowAt(int par1, int par2, int par3)
@ -519,7 +519,7 @@
{
BiomeGenBase var4 = this.getBiomeGenForCoords(par1, par3);
float var5 = var4.getFloatTemperature();
@@ -3252,7 +3363,7 @@
@@ -3245,7 +3356,7 @@
private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6)
{
@ -528,7 +528,7 @@
int var8 = this.getSavedLightValue(EnumSkyBlock.Block, par2 - 1, par3, par4) - par6;
int var9 = this.getSavedLightValue(EnumSkyBlock.Block, par2 + 1, par3, par4) - par6;
int var10 = this.getSavedLightValue(EnumSkyBlock.Block, par2, par3 - 1, par4) - par6;
@@ -3387,7 +3498,7 @@
@@ -3380,7 +3491,7 @@
int var21 = var24 + (var18 / 2 + 1) % 3 / 2 * var19;
int var22 = var12 + (var18 / 2 + 2) % 3 / 2 * var19;
var14 = this.getSavedLightValue(par1EnumSkyBlock, var20, var21, var22);
@ -537,7 +537,7 @@
if (var23 == 0)
{
@@ -3418,7 +3529,7 @@
@@ -3411,7 +3522,7 @@
var12 = (var9 >> 12 & 63) - 32 + par4;
var13 = this.getSavedLightValue(par1EnumSkyBlock, var10, var24, var12);
var14 = this.getBlockId(var10, var24, var12);
@ -546,7 +546,7 @@
if (var15 == 0)
{
@@ -3520,10 +3631,10 @@
@@ -3513,10 +3624,10 @@
public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
{
this.entitiesWithinAABBExcludingEntity.clear();
@ -561,7 +561,7 @@
for (int var7 = var3; var7 <= var4; ++var7)
{
@@ -3549,10 +3660,10 @@
@@ -3542,10 +3653,10 @@
public List selectEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
{
@ -576,7 +576,7 @@
ArrayList var8 = new ArrayList();
for (int var9 = var4; var9 <= var5; ++var9)
@@ -3645,11 +3756,14 @@
@@ -3638,11 +3749,14 @@
*/
public void addLoadedEntities(List par1List)
{
@ -594,7 +594,7 @@
}
}
@@ -3683,6 +3797,11 @@
@@ -3676,6 +3790,11 @@
else
{
if (var9 != null && (var9 == Block.waterMoving || var9 == Block.waterStill || var9 == Block.lavaMoving || var9 == Block.lavaStill || var9 == Block.fire || var9.blockMaterial.isReplaceable()))
@ -606,7 +606,7 @@
{
var9 = null;
}
@@ -3900,7 +4019,7 @@
@@ -3893,7 +4012,7 @@
*/
public long getSeed()
{
@ -615,7 +615,7 @@
}
public long getTotalWorldTime()
@@ -3910,7 +4029,7 @@
@@ -3903,7 +4022,7 @@
public long getWorldTime()
{
@ -624,7 +624,7 @@
}
/**
@@ -3918,7 +4037,7 @@
@@ -3911,7 +4030,7 @@
*/
public void setWorldTime(long par1)
{
@ -633,7 +633,7 @@
}
/**
@@ -3926,13 +4045,13 @@
@@ -3919,13 +4038,13 @@
*/
public ChunkCoordinates getSpawnPoint()
{
@ -649,7 +649,7 @@
}
@SideOnly(Side.CLIENT)
@@ -3956,7 +4075,10 @@
@@ -3949,7 +4068,10 @@
if (!this.loadedEntityList.contains(par1Entity))
{
@ -661,7 +661,7 @@
}
}
@@ -3964,6 +4086,11 @@
@@ -3957,6 +4079,11 @@
* Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here.
*/
public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
@ -673,7 +673,7 @@
{
return true;
}
@@ -4084,8 +4211,7 @@
@@ -4077,8 +4204,7 @@
*/
public boolean isBlockHighHumidity(int par1, int par2, int par3)
{
@ -683,7 +683,7 @@
}
/**
@@ -4147,7 +4273,7 @@
@@ -4153,7 +4279,7 @@
*/
public int getHeight()
{
@ -692,7 +692,7 @@
}
/**
@@ -4155,7 +4281,7 @@
@@ -4161,7 +4287,7 @@
*/
public int getActualHeight()
{
@ -701,7 +701,7 @@
}
public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart)
@@ -4198,7 +4324,7 @@
@@ -4204,7 +4330,7 @@
*/
public double getHorizon()
{
@ -710,10 +710,10 @@
}
/**
@@ -4256,4 +4382,75 @@
@@ -4265,4 +4391,75 @@
return this.theCalendar;
}
@SideOnly(Side.CLIENT)
public void func_92088_a(double par1, double par3, double par5, double par7, double par9, double par11, NBTTagCompound par13NBTTagCompound) {}
+
+ /**
+ * Adds a single TileEntity to the world.
@ -732,48 +732,48 @@
+ * Determine if the given block is considered solid on the
+ * specified side. Used by placement logic.
+ *
+ * @param X Block X Position
+ * @param Y Block Y Position
+ * @param Z Block Z Position
+ * @param x Block X Position
+ * @param y Block Y Position
+ * @param z Block Z Position
+ * @param side The Side in question
+ * @return True if the side is solid
+ */
+ public boolean isBlockSolidOnSide(int X, int Y, int Z, ForgeDirection side)
+ public boolean isBlockSolidOnSide(int x, int y, int z, ForgeDirection side)
+ {
+ return isBlockSolidOnSide(X, Y, Z, side, false);
+ return isBlockSolidOnSide(x, y, z, side, false);
+ }
+
+ /**
+ * Determine if the given block is considered solid on the
+ * specified side. Used by placement logic.
+ *
+ * @param X Block X Position
+ * @param Y Block Y Position
+ * @param Z Block Z Position
+ * @param x Block X Position
+ * @param y Block Y Position
+ * @param z Block Z Position
+ * @param side The Side in question
+ * @param _default The defult to return if the block doesn't exist.
+ * @return True if the side is solid
+ */
+ public boolean isBlockSolidOnSide(int X, int Y, int Z, ForgeDirection side, boolean _default)
+ public boolean isBlockSolidOnSide(int x, int y, int z, ForgeDirection side, boolean _default)
+ {
+ if (X < -30000000 || Z < -30000000 || X >= 30000000 || Z >= 30000000)
+ if (x < -30000000 || z < -30000000 || x >= 30000000 || z >= 30000000)
+ {
+ return _default;
+ }
+
+ Chunk var5 = this.chunkProvider.provideChunk(X >> 4, Z >> 4);
+ Chunk var5 = this.chunkProvider.provideChunk(x >> 4, z >> 4);
+ if (var5 == null || var5.isEmpty())
+ {
+ return _default;
+ }
+
+ Block block = Block.blocksList[getBlockId(X, Y, Z)];
+ Block block = Block.blocksList[getBlockId(x, y, z)];
+ if(block == null)
+ {
+ return false;
+ }
+
+ return block.isBlockSolidOnSide(this, X, Y, Z, side);
+ return block.isBlockSolidOnSide(this, x, y, z, side);
+ }
+
+ /**

View file

@ -1,12 +1,8 @@
--- ../src_base/minecraft/net/minecraft/world/WorldProvider.java
+++ ../src_work/minecraft/net/minecraft/world/WorldProvider.java
@@ -1,18 +1,25 @@
package net.minecraft.world;
+import net.minecraftforge.client.SkyProvider;
+import net.minecraftforge.common.DimensionManager;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
@@ -3,16 +3,23 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
@ -23,6 +19,8 @@
import net.minecraft.world.gen.ChunkProviderGenerate;
import net.minecraft.world.gen.FlatGeneratorInfo;
+import net.minecraft.world.storage.WorldInfo;
+import net.minecraftforge.client.IRenderHandler;
+import net.minecraftforge.common.DimensionManager;
public abstract class WorldProvider
{
@ -41,8 +39,8 @@
public abstract String getDimensionName();
+
+ /*======================================= Forge Start =========================================*/
+ private SkyProvider skyProvider = null;
+ private SkyProvider cloudRenderer = null;
+ private IRenderHandler skyRenderer = null;
+ private IRenderHandler cloudRenderer = null;
+
+ /**
+ * Sets the providers current dimension ID, used in default getSaveFolder()
@ -117,25 +115,25 @@
+ }
+
+ @SideOnly(Side.CLIENT)
+ public SkyProvider getSkyProvider()
+ public IRenderHandler getSkyRenderer()
+ {
+ return this.skyProvider;
+ return this.skyRenderer;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void setSkyProvider(SkyProvider skyProvider)
+ public void setSkyRenderer(IRenderHandler skyRenderer)
+ {
+ this.skyProvider = skyProvider;
+ this.skyRenderer = skyRenderer;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public SkyProvider getCloudRenderer()
+ public IRenderHandler getCloudRenderer()
+ {
+ return cloudRenderer;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void setCloudRenderer(SkyProvider renderer)
+ public void setCloudRenderer(IRenderHandler renderer)
+ {
+ cloudRenderer = renderer;
+ }

View file

@ -2,8 +2,8 @@
+++ ../src_work/minecraft/net/minecraft/world/WorldServer.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
+import java.io.File;
import java.util.ArrayList;
@ -104,7 +104,7 @@
{
this.updateLCG = this.updateLCG * 3 + 1013904223;
var8 = this.updateLCG >> 2;
@@ -333,7 +358,7 @@
@@ -332,7 +357,7 @@
this.theProfiler.endStartSection("iceandsnow");
int var13;
@ -113,7 +113,7 @@
{
this.updateLCG = this.updateLCG * 3 + 1013904223;
var8 = this.updateLCG >> 2;
@@ -412,7 +437,8 @@
@@ -411,7 +436,8 @@
public void func_82740_a(int par1, int par2, int par3, int par4, int par5, int par6)
{
NextTickListEntry var7 = new NextTickListEntry(par1, par2, par3, par4);
@ -123,7 +123,7 @@
if (this.scheduledUpdatesAreImmediate && par4 > 0)
{
@@ -474,7 +500,7 @@
@@ -473,7 +499,7 @@
*/
public void updateEntities()
{
@ -132,7 +132,7 @@
{
if (this.updateEntityTick++ >= 1200)
{
@@ -526,7 +552,8 @@
@@ -525,7 +551,8 @@
this.pendingTickListEntries.remove(var4);
this.field_73064_N.remove(var4);
@ -142,7 +142,7 @@
if (this.checkChunksExist(var4.xCoord - var5, var4.yCoord - var5, var4.zCoord - var5, var4.xCoord + var5, var4.yCoord + var5, var4.zCoord + var5))
{
@@ -645,16 +672,28 @@
@@ -644,16 +671,28 @@
{
ArrayList var7 = new ArrayList();
@ -181,7 +181,7 @@
return var7;
}
@@ -662,6 +701,11 @@
@@ -661,6 +700,11 @@
* Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here.
*/
public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
@ -193,7 +193,7 @@
{
int var5 = MathHelper.abs_int(par2 - this.worldInfo.getSpawnX());
int var6 = MathHelper.abs_int(par4 - this.worldInfo.getSpawnZ());
@@ -671,7 +715,7 @@
@@ -670,7 +714,7 @@
var6 = var5;
}
@ -202,16 +202,16 @@
}
protected void initialize(WorldSettings par1WorldSettings)
@@ -754,7 +798,7 @@
@@ -753,7 +797,7 @@
*/
protected void createBonusChest()
{
- WorldGeneratorBonusChest var1 = new WorldGeneratorBonusChest(bonusChestContent, 10);
+ WorldGeneratorBonusChest var1 = new WorldGeneratorBonusChest(ChestGenHooks.getItems(BONUS_CHEST), ChestGenHooks.getCount(BONUS_CHEST, rand));
+ WorldGeneratorBonusChest var1 = new WorldGeneratorBonusChest(ChestGenHooks.getItems(BONUS_CHEST, rand), ChestGenHooks.getCount(BONUS_CHEST, rand));
for (int var2 = 0; var2 < 10; ++var2)
{
@@ -797,6 +841,7 @@
@@ -796,6 +840,7 @@
}
this.chunkProvider.saveChunks(par1, par2IProgressUpdate);
@ -219,7 +219,7 @@
}
}
@@ -808,6 +853,7 @@
@@ -807,6 +852,7 @@
this.checkSessionLock();
this.saveHandler.saveWorldInfoWithPlayer(this.worldInfo, this.mcServer.getConfigurationManager().getTagsFromLastWrite());
this.mapStorage.saveAllData();
@ -227,7 +227,7 @@
}
/**
@@ -1030,4 +1076,9 @@
@@ -1029,4 +1075,9 @@
{
return this.field_85177_Q;
}

View file

@ -1,8 +1,8 @@
--- ../src_base/minecraft/net/minecraft/world/biome/WorldChunkManager.java
+++ ../src_work/minecraft/net/minecraft/world/biome/WorldChunkManager.java
@@ -3,6 +3,7 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;

View file

@ -56,7 +56,7 @@
+
+ if (this.storageArrays[var10] == null)
+ {
+ this.storageArrays[var10] = new ExtendedBlockStorage(var10 << 4);
+ this.storageArrays[var10] = new ExtendedBlockStorage(var10 << 4, !world.provider.hasNoSky);
+ }
+
+ this.storageArrays[var10].setExtBlockID(x, y & 15, z, id);
@ -98,7 +98,7 @@
+ int storageBlock = y >> 4;
+
+ if (this.storageArrays[storageBlock] == null) {
+ this.storageArrays[storageBlock] = new ExtendedBlockStorage(storageBlock << 4);
+ this.storageArrays[storageBlock] = new ExtendedBlockStorage(storageBlock << 4, !world.provider.hasNoSky);
+ }
+
+ this.storageArrays[storageBlock].setExtBlockID(x, y & 15, z, id);
@ -247,7 +247,7 @@
{
- ExtendedBlockStorage var5 = this.storageArrays[par3 >> 4];
+ ExtendedBlockStorage var5 = (par3 >> 4 >= storageArrays.length || par3 >> 4 < 0 ? null : storageArrays[par3 >> 4]);
return var5 == null ? (this.canBlockSeeTheSky(par2, par3, par4) ? par1EnumSkyBlock.defaultLightValue : 0) : (par1EnumSkyBlock == EnumSkyBlock.Sky ? var5.getExtSkylightValue(par2, par3 & 15, par4) : (par1EnumSkyBlock == EnumSkyBlock.Block ? var5.getExtBlocklightValue(par2, par3 & 15, par4) : par1EnumSkyBlock.defaultLightValue));
return var5 == null ? (this.canBlockSeeTheSky(par2, par3, par4) ? par1EnumSkyBlock.defaultLightValue : 0) : (par1EnumSkyBlock == EnumSkyBlock.Sky ? (this.worldObj.provider.hasNoSky ? 0 : var5.getExtSkylightValue(par2, par3 & 15, par4)) : (par1EnumSkyBlock == EnumSkyBlock.Block ? var5.getExtBlocklightValue(par2, par3 & 15, par4) : par1EnumSkyBlock.defaultLightValue));
}
@@ -754,6 +848,11 @@
@ -403,9 +403,9 @@
+ }
+
int var5 = 0;
int var6;
@@ -1342,12 +1458,26 @@
boolean var6 = !this.worldObj.provider.hasNoSky;
int var7;
@@ -1346,12 +1462,26 @@
}
this.generateHeightMap();
@ -413,8 +413,8 @@
-
- while (var10.hasNext())
- {
- TileEntity var9 = (TileEntity)var10.next();
- var9.updateContainingBlockInfo();
- TileEntity var11 = (TileEntity)var10.next();
- var11.updateContainingBlockInfo();
+
+ List<TileEntity> invalidList = new ArrayList<TileEntity>();
+ iterator = chunkTileEntityMap.values().iterator();
@ -438,7 +438,7 @@
}
}
@@ -1456,4 +1586,18 @@
@@ -1460,4 +1590,18 @@
}
}
}

View file

@ -1,16 +1,15 @@
--- ../src_base/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
+++ ../src_work/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
@@ -28,6 +28,9 @@
@@ -27,6 +27,8 @@
import net.minecraft.world.chunk.NibbleArray;
import net.minecraft.world.storage.IThreadedFileIO;
import net.minecraft.world.storage.ThreadedFileIOBase;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.world.ChunkDataEvent;
+
public class AnvilChunkLoader implements IThreadedFileIO, IChunkLoader
public class AnvilChunkLoader implements IChunkLoader, IThreadedFileIO
{
private List chunksToRemove = new ArrayList();
@@ -108,6 +111,7 @@
@@ -108,6 +110,7 @@
var5 = this.readChunkFromNBT(par1World, par4NBTTagCompound.getCompoundTag("Level"));
}
@ -18,7 +17,7 @@
return var5;
}
}
@@ -123,6 +127,7 @@
@@ -123,6 +126,7 @@
var3.setTag("Level", var4);
this.writeChunkToNBT(par2Chunk, par1World, var4);
this.func_75824_a(par2Chunk.getChunkCoordIntPair(), var3);

View file

@ -1,8 +1,8 @@
--- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java
+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java
@@ -5,6 +5,9 @@
import net.minecraft.block.Block;
@@ -7,6 +7,9 @@
import net.minecraft.tileentity.TileEntityMobSpawner;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraft.world.World;
+
+import net.minecraftforge.common.ChestGenHooks;
@ -10,7 +10,7 @@
public class ComponentMineshaftCorridor extends StructureComponent
{
@@ -234,14 +237,16 @@
@@ -236,14 +239,16 @@
this.randomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.05F, 1, 2, var10 - 1, Block.torchWood.blockID, 0);
this.randomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.05F, 1, 2, var10 + 1, Block.torchWood.blockID, 0);
@ -18,14 +18,14 @@
+
if (par2Random.nextInt(100) == 0)
{
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, StructureMineshaftPieces.func_78816_a(), 3 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, info.getItems(), info.getCount(par2Random));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, WeightedRandomChestContent.func_92029_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 3 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, info.getItems(par2Random), info.getCount(par2Random));
}
if (par2Random.nextInt(100) == 0)
{
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, StructureMineshaftPieces.func_78816_a(), 3 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, info.getItems(), info.getCount(par2Random));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, WeightedRandomChestContent.func_92029_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 3 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, info.getItems(par2Random), info.getCount(par2Random));
}
if (this.hasSpiders && !this.spawnerPlaced)

View file

@ -10,12 +10,19 @@
public class ComponentScatteredFeatureDesertPyramid extends ComponentScatteredFeature
{
@@ -221,7 +224,7 @@
@@ -215,13 +218,14 @@
this.placeBlockAtCurrentPosition(par1World, Block.sandStone.blockID, 1, 10, -10, 13, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, Block.sandStone.blockID, 2, 10, -11, 13, par3StructureBoundingBox);
+ ChestGenHooks info = ChestGenHooks.getInfo(PYRAMID_DESERT_CHEST);
for (var10 = 0; var10 < 4; ++var10)
{
if (!this.field_74940_h[var10])
{
int var11 = Direction.offsetX[var10] * 2;
int var12 = Direction.offsetZ[var10] * 2;
- this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, itemsToGenerateInTemple, 2 + par2Random.nextInt(5));
+ this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, ChestGenHooks.getItems(PYRAMID_DESERT_CHEST), ChestGenHooks.getCount(PYRAMID_DESERT_CHEST, par2Random));
- this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, WeightedRandomChestContent.func_92029_a(itemsToGenerateInTemple, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5));
+ this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, info.getItems(par2Random), info.getCount(par2Random));
}
}

View file

@ -20,7 +20,7 @@
if (!this.field_74945_j)
{
- this.field_74945_j = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 3, -2, 1, 2, junglePyramidsDispenserContents, 2);
+ this.field_74945_j = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 3, -2, 1, 2, dispenser.getItems(), dispenser.getCount(par2Random));
+ this.field_74945_j = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 3, -2, 1, 2, dispenser.getItems(par2Random), dispenser.getCount(par2Random));
}
this.placeBlockAtCurrentPosition(par1World, Block.vine.blockID, 15, 3, -2, 2, par3StructureBoundingBox);
@ -29,7 +29,7 @@
if (!this.field_74946_k)
{
- this.field_74946_k = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 9, -2, 3, 4, junglePyramidsDispenserContents, 2);
+ this.field_74946_k = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 9, -2, 3, 4, dispenser.getItems(), dispenser.getCount(par2Random));
+ this.field_74946_k = this.generateStructureDispenserContents(par1World, par3StructureBoundingBox, par2Random, 9, -2, 3, 4, dispenser.getItems(par2Random), dispenser.getCount(par2Random));
}
this.placeBlockAtCurrentPosition(par1World, Block.vine.blockID, 15, 8, -1, 3, par3StructureBoundingBox);
@ -37,8 +37,8 @@
if (!this.field_74947_h)
{
- this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, junglePyramidsChestContents, 2 + par2Random.nextInt(5));
+ this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, chest.getItems(), chest.getCount(par2Random));
- this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, WeightedRandomChestContent.func_92029_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5));
+ this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, chest.getItems(par2Random), chest.getCount(par2Random));
}
this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 9, -3, 2, par3StructureBoundingBox);
@ -46,8 +46,8 @@
if (!this.field_74948_i)
{
- this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, junglePyramidsChestContents, 2 + par2Random.nextInt(5));
+ this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, chest.getItems(), chest.getCount(par2Random));
- this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, WeightedRandomChestContent.func_92029_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5));
+ this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, chest.getItems(par2Random), chest.getCount(par2Random));
}
return true;

View file

@ -14,8 +14,8 @@
if (par3StructureBoundingBox.isVecInside(var5, var4, var6))
{
this.hasMadeChest = true;
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, strongholdChestContents, 2 + par2Random.nextInt(2));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, ChestGenHooks.getItems(STRONGHOLD_CORRIDOR), ChestGenHooks.getCount(STRONGHOLD_CORRIDOR, par2Random));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, WeightedRandomChestContent.func_92029_a(strongholdChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(2));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, ChestGenHooks.getItems(STRONGHOLD_CORRIDOR, par2Random), ChestGenHooks.getCount(STRONGHOLD_CORRIDOR, par2Random));
}
}

View file

@ -10,19 +10,20 @@
public class ComponentStrongholdLibrary extends ComponentStronghold
{
@@ -145,12 +148,13 @@
@@ -145,12 +148,14 @@
this.placeBlockAtCurrentPosition(par1World, Block.torchWood.blockID, 0, var8, 8, var9 + 1, par3StructureBoundingBox);
}
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, strongholdLibraryChestContents, 1 + par2Random.nextInt(4));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, WeightedRandomChestContent.func_92029_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92058_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4));
+ ChestGenHooks info = ChestGenHooks.getInfo(STRONGHOLD_LIBRARY);
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, info.getItems(), info.getCount(par2Random));
+
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, info.getItems(par2Random), info.getCount(par2Random));
if (this.isLargeRoom)
{
this.placeBlockAtCurrentPosition(par1World, 0, 0, 12, 9, 1, par3StructureBoundingBox);
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, strongholdLibraryChestContents, 1 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, info.getItems(), info.getCount(par2Random));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, WeightedRandomChestContent.func_92029_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92058_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, info.getItems(par2Random), info.getCount(par2Random));
}
return true;

View file

@ -14,8 +14,8 @@
this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 1, 3, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 2, 3, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 3, 3, par3StructureBoundingBox);
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, strongholdRoomCrossingChestContents, 1 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, ChestGenHooks.getItems(STRONGHOLD_CROSSING), ChestGenHooks.getCount(STRONGHOLD_CROSSING, par2Random));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, WeightedRandomChestContent.func_92029_a(strongholdRoomCrossingChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 1 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, ChestGenHooks.getItems(STRONGHOLD_CROSSING, par2Random), ChestGenHooks.getCount(STRONGHOLD_CROSSING, par2Random));
}
return true;

View file

@ -15,7 +15,7 @@
{
this.hasMadeChest = true;
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 5, 1, 5, villageBlacksmithChestContents, 3 + par2Random.nextInt(6));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 5, 1, 5, ChestGenHooks.getItems(VILLAGE_BLACKSMITH), ChestGenHooks.getCount(VILLAGE_BLACKSMITH, par2Random));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 5, 1, 5, ChestGenHooks.getItems(VILLAGE_BLACKSMITH, par2Random), ChestGenHooks.getCount(VILLAGE_BLACKSMITH, par2Random));
}
}