ForgePatch/forge/patches/minecraft_server/net/minecraft/src/BlockContainer.java.patch
2012-05-02 11:12:45 -07:00

26 lines
999 B
Diff

--- ../src_base/minecraft_server/net/minecraft/src/BlockContainer.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft_server/net/minecraft/src/BlockContainer.java 0000-00-00 00:00:00.000000000 -0000
@@ -20,7 +20,7 @@
public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
super.onBlockAdded(par1World, par2, par3, par4);
- par1World.setBlockTileEntity(par2, par3, par4, this.getBlockEntity());
+ par1World.setBlockTileEntity(par2, par3, par4, this.getBlockEntity(par1World.getBlockMetadata(par2, par3, par4)));
}
/**
@@ -51,4 +51,14 @@
var7.receiveClientEvent(par5, par6);
}
}
+
+ /**
+ * Metatdata sensitive version of getBlockEntity
+ * @param metadata The Metatdata for the current block
+ * @return A instance of the TileEntity class associated with this block
+ */
+ public TileEntity getBlockEntity(int metadata)
+ {
+ return getBlockEntity();
+ }
}