Couple of warnings
This commit is contained in:
parent
fae818db1c
commit
f5107cacd0
1 changed files with 5 additions and 10 deletions
|
@ -50,9 +50,7 @@ public class AlarmBlockEntity extends BlockEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rightClick() {
|
public void rightClick() {
|
||||||
if (world.isClient) {
|
if (world == null || world.isClient) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedSound < 3) {
|
if (selectedSound < 3) {
|
||||||
selectedSound++;
|
selectedSound++;
|
||||||
|
@ -84,15 +82,12 @@ public class AlarmBlockEntity extends BlockEntity
|
||||||
super.fromTag(blockState, compound);
|
super.fromTag(blockState, compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ITickable
|
// Tickable
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (world.isClient()) {
|
if (world == null || world.isClient()) return;
|
||||||
return;
|
if (world.getTime() % 25 != 0) return;
|
||||||
}
|
|
||||||
if (world.getTime() % 25 != 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (world.isReceivingRedstonePower(getPos())) {
|
if (world.isReceivingRedstonePower(getPos())) {
|
||||||
BlockAlarm.setActive(true, world, pos);
|
BlockAlarm.setActive(true, world, pos);
|
||||||
switch (selectedSound) {
|
switch (selectedSound) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue