mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-07 19:18:01 +01:00
Fix error with blocks disguises
This commit is contained in:
parent
d0948b76f5
commit
dab376d298
@ -147,7 +147,7 @@ public class MiscDisguise extends TargetedDisguise {
|
||||
public int getData() {
|
||||
switch (getType()) {
|
||||
case FALLING_BLOCK:
|
||||
return ((FallingBlockWatcher) getWatcher()).getBlock().getDurability();
|
||||
return ((FallingBlockWatcher) getWatcher()).getBlockCombinedId();
|
||||
case PAINTING:
|
||||
if (!NmsVersion.v1_19_R1.isSupported()) {
|
||||
return ((PaintingWatcher) getWatcher()).getArt().getId();
|
||||
|
@ -32,11 +32,7 @@ public class FallingBlockWatcher extends FlagWatcher {
|
||||
public FallingBlockWatcher clone(Disguise disguise) {
|
||||
FallingBlockWatcher watcher = (FallingBlockWatcher) super.clone(disguise);
|
||||
|
||||
if (NmsVersion.v1_13.isSupported()) {
|
||||
watcher.setBlockData(getBlockData().clone());
|
||||
} else {
|
||||
watcher.setBlock(getBlock().clone());
|
||||
}
|
||||
watcher.setBlockState(getBlockState().clone());
|
||||
|
||||
return watcher;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user