set vanishes block data on unsuccessful replace. Fixes #629
This commit is contained in:
1 parent
f859eb87b5
commit
4466f9e8bb
1 file changed
+2
-1
@@ -812,7 +812,7 @@ public class WorldAccess {
|
|||||||
{
|
{
|
||||||
Clearable.clear(world.getBlockEntity(targetPos));
|
Clearable.clear(world.getBlockEntity(targetPos));
|
||||||
boolean success = world.setBlockState(targetPos, finalSourceBlockState, 2);
|
boolean success = world.setBlockState(targetPos, finalSourceBlockState, 2);
|
||||||
if (success && finalData != null)
|
if (finalData != null)
|
||||||
{
|
{
|
||||||
BlockEntity be = world.getBlockEntity(targetPos);
|
BlockEntity be = world.getBlockEntity(targetPos);
|
||||||
if (be != null)
|
if (be != null)
|
||||||
@@ -823,6 +823,7 @@ public class WorldAccess {
|
|||||||
destTag.putInt("z", targetPos.getZ());
|
destTag.putInt("z", targetPos.getZ());
|
||||||
be.fromTag(finalSourceBlockState, destTag);
|
be.fromTag(finalSourceBlockState, destTag);
|
||||||
be.markDirty();
|
be.markDirty();
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result[0] = success;
|
result[0] = success;
|
||||||
|
|||||||
Reference in new issue
Block a user