Fix error with blocks disguises

This commit is contained in:
libraryaddict 2025-01-06 17:33:56 +13:00
parent d0948b76f5
commit dab376d298
2 changed files with 2 additions and 6 deletions

View File

@ -147,7 +147,7 @@ public class MiscDisguise extends TargetedDisguise {
public int getData() { public int getData() {
switch (getType()) { switch (getType()) {
case FALLING_BLOCK: case FALLING_BLOCK:
return ((FallingBlockWatcher) getWatcher()).getBlock().getDurability(); return ((FallingBlockWatcher) getWatcher()).getBlockCombinedId();
case PAINTING: case PAINTING:
if (!NmsVersion.v1_19_R1.isSupported()) { if (!NmsVersion.v1_19_R1.isSupported()) {
return ((PaintingWatcher) getWatcher()).getArt().getId(); return ((PaintingWatcher) getWatcher()).getArt().getId();

View File

@ -32,11 +32,7 @@ public class FallingBlockWatcher extends FlagWatcher {
public FallingBlockWatcher clone(Disguise disguise) { public FallingBlockWatcher clone(Disguise disguise) {
FallingBlockWatcher watcher = (FallingBlockWatcher) super.clone(disguise); FallingBlockWatcher watcher = (FallingBlockWatcher) super.clone(disguise);
if (NmsVersion.v1_13.isSupported()) { watcher.setBlockState(getBlockState().clone());
watcher.setBlockData(getBlockData().clone());
} else {
watcher.setBlock(getBlock().clone());
}
return watcher; return watcher;
} }