13
0
geforkt von Mirrors/Paper

#872: SculkSensor accesses underlying TileEntity instead of snapshot for vibration frequency.

By: blablubbabc <lukas@wirsindwir.de>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2021-06-23 09:02:10 +10:00
Ursprung 26fd70263e
Commit a91dc63398

Datei anzeigen

@ -18,12 +18,12 @@ public class CraftSculkSensor extends CraftBlockEntityState<SculkSensorBlockEnti
@Override @Override
public int getLastVibrationFrequency() { public int getLastVibrationFrequency() {
return getTileEntity().getLastVibrationFrequency(); return getSnapshot().getLastVibrationFrequency();
} }
@Override @Override
public void setLastVibrationFrequency(int lastVibrationFrequency) { public void setLastVibrationFrequency(int lastVibrationFrequency) {
Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15"); Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15");
getTileEntity().lastVibrationFrequency = lastVibrationFrequency; getSnapshot().lastVibrationFrequency = lastVibrationFrequency;
} }
} }