Fix block state not saving on restore (Untested) (PC-610)
This commit is contained in:
parent
32c91e2e0c
commit
9898b3d95d
@ -6,6 +6,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.BlockState;
|
||||
|
||||
public class BlockRestoreData
|
||||
{
|
||||
@ -23,6 +24,8 @@ public class BlockRestoreData
|
||||
protected long _meltDelay = 0;
|
||||
protected long _meltLast = 0;
|
||||
|
||||
protected BlockState _fromState;
|
||||
|
||||
protected HashMap<Location, Byte> _pad = new HashMap<Location, Byte>();
|
||||
|
||||
protected boolean _restoreOnBreak;
|
||||
@ -30,6 +33,7 @@ public class BlockRestoreData
|
||||
public BlockRestoreData(Block block, int toID, byte toData, int fromID, byte fromData, long expireDelay, long meltDelay, boolean restoreOnBreak)
|
||||
{
|
||||
_block = block;
|
||||
_fromState = block.getState();
|
||||
|
||||
_fromID = fromID;
|
||||
_fromData = fromData;
|
||||
@ -163,6 +167,8 @@ public class BlockRestoreData
|
||||
public void restore()
|
||||
{
|
||||
_block.setTypeIdAndData(_fromID, _fromData, true);
|
||||
_fromState.update();
|
||||
|
||||
handleLilypad(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user