mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
chore: minor changes
- null check get tile in ThreadUnsafeCharBlocks - 0 to reserved ID
This commit is contained in:
parent
78fb74665f
commit
135c77cfb5
@ -415,7 +415,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
}
|
||||
|
||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||
if (ordinal != 0) {
|
||||
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockEntity tile = entry.getValue();
|
||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||
if (beacons == null) {
|
||||
|
@ -408,7 +408,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
}
|
||||
|
||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||
if (ordinal != 0) {
|
||||
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockEntity tile = entry.getValue();
|
||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||
if (beacons == null) {
|
||||
|
@ -406,7 +406,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
}
|
||||
|
||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||
if (ordinal != 0) {
|
||||
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockEntity tile = entry.getValue();
|
||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||
if (beacons == null) {
|
||||
|
@ -408,7 +408,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
}
|
||||
|
||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||
if (ordinal != 0) {
|
||||
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockEntity tile = entry.getValue();
|
||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||
if (beacons == null) {
|
||||
|
@ -408,7 +408,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
}
|
||||
|
||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||
if (ordinal != 0) {
|
||||
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockEntity tile = entry.getValue();
|
||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||
if (beacons == null) {
|
||||
|
@ -386,7 +386,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
}
|
||||
|
||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||
if (ordinal != 0) {
|
||||
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockEntity tile = entry.getValue();
|
||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||
if (beacons == null) {
|
||||
|
@ -50,7 +50,7 @@ public class SimpleChangeSetSummary implements ChangeSetSummary {
|
||||
public Map<BlockState, Integer> getBlocks() {
|
||||
HashMap<BlockState, Integer> map = new HashMap<>();
|
||||
for (int i = 0; i < blocks.length; i++) {
|
||||
if (blocks[i] != 0) {
|
||||
if (blocks[i] != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||
BlockState state = BlockTypesCache.states[i];
|
||||
map.put(state, blocks[i]);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public class ThreadUnsafeCharBlocks implements IChunkSet, IBlocks {
|
||||
|
||||
@Override
|
||||
public CompoundTag getTile(int x, int y, int z) {
|
||||
return tiles.get(x, y, z);
|
||||
return tiles == null ? null : tiles.get(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user