mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-08 19:28:10 +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() {
|
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();
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user