mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 18:45:09 +00:00
Protect BlockSnapshot and Chunk.getTileEntity from mutible BlockPos instances. Closes #2438
This commit is contained in:
1 parent
70fe18c163
commit
06130912c5
3 files changed
+40
-4
No files matched your search
@@ -58,7 +58,7 @@ public class BlockSnapshot implements Serializable
|
||||
{
|
||||
this.world = world;
|
||||
this.dimId = world.provider.getDimensionId();
|
||||
this.pos = pos;
|
||||
this.pos = pos.getImmutable();
|
||||
this.replacedBlock = state;
|
||||
this.blockIdentifier = GameRegistry.findUniqueIdentifierFor(state.getBlock());
|
||||
this.meta = state.getBlock().getMetaFromState(state);
|
||||
@@ -82,7 +82,7 @@ public class BlockSnapshot implements Serializable
|
||||
public BlockSnapshot(int dimension, BlockPos pos, String modid, String blockName, int meta, int flag, NBTTagCompound nbt)
|
||||
{
|
||||
this.dimId = dimension;
|
||||
this.pos = pos;
|
||||
this.pos = pos.getImmutable();
|
||||
this.flag = flag;
|
||||
this.blockIdentifier = new UniqueIdentifier(modid + ":" + blockName);
|
||||
this.meta = meta;
|
||||
|
||||
Reference in new issue
Block a user