mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Refactored a bit of the TileEntity code so that ANY block may now have a tile entity.
This is to allow modders the ability to extend blocks other then BlockContainer, and still be able to have a TileEntity. Also added a NBTTagCompound to the base EntityClass, this allows any entity to be given arbitrary data that will persist across world saves. This data is NOT sent over the wire in a MP situation, to have data sent over the wire automatically use the built in data watcher.
This commit is contained in:
1 parent
fe1fbfda61
commit
0da57286ef
9 files changed
+354
-35
No files matched your search
@@ -0,0 +1,11 @@
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockPistonBase.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockPistonBase.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -356,7 +356,7 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
- return !(Block.blocksList[i] instanceof BlockContainer);
|
||||
+ return !(Block.blocksList[i] != null && Block.blocksList[i].hasTileEntity(world.getBlockMetadata(j, l, l)));
|
||||
}
|
||||
|
||||
private static boolean canExtend(World world, int i, int j, int k, int l)
|
||||
Reference in new issue
Block a user