mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
use pattern variables
This commit is contained in:
+1
-2
@@ -62,8 +62,7 @@ public class ChunkCoordinate implements Serializable {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof ChunkCoordinate)) return false;
|
||||
ChunkCoordinate other = (ChunkCoordinate) obj;
|
||||
if(!(obj instanceof ChunkCoordinate other)) return false;
|
||||
return other.getX() == x && other.getZ() == z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,8 +127,7 @@ public class BukkitWorld implements World {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof BukkitWorld)) return false;
|
||||
BukkitWorld other = (BukkitWorld) obj;
|
||||
if(!(obj instanceof BukkitWorld other)) return false;
|
||||
return other.getHandle().equals(delegate);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -54,7 +54,8 @@ public abstract class BlockEntityMixin {
|
||||
}
|
||||
|
||||
public boolean terra$update(boolean applyPhysics) {
|
||||
if(hasWorld()) world.getChunk(pos).setBlockEntity((net.minecraft.block.entity.BlockEntity) (Object) this);
|
||||
if(hasWorld()) //noinspection ConstantConditions
|
||||
world.getChunk(pos).setBlockEntity((net.minecraft.block.entity.BlockEntity) (Object) this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user