mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +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();
|
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||||
if (ordinal != 0) {
|
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockEntity tile = entry.getValue();
|
BlockEntity tile = entry.getValue();
|
||||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||||
if (beacons == null) {
|
if (beacons == null) {
|
||||||
|
@ -408,7 +408,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||||
if (ordinal != 0) {
|
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockEntity tile = entry.getValue();
|
BlockEntity tile = entry.getValue();
|
||||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||||
if (beacons == null) {
|
if (beacons == null) {
|
||||||
|
@ -406,7 +406,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||||
if (ordinal != 0) {
|
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockEntity tile = entry.getValue();
|
BlockEntity tile = entry.getValue();
|
||||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||||
if (beacons == null) {
|
if (beacons == null) {
|
||||||
|
@ -408,7 +408,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||||
if (ordinal != 0) {
|
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockEntity tile = entry.getValue();
|
BlockEntity tile = entry.getValue();
|
||||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||||
if (beacons == null) {
|
if (beacons == null) {
|
||||||
|
@ -408,7 +408,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||||
if (ordinal != 0) {
|
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockEntity tile = entry.getValue();
|
BlockEntity tile = entry.getValue();
|
||||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||||
if (beacons == null) {
|
if (beacons == null) {
|
||||||
|
@ -386,7 +386,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
|
||||||
if (ordinal != 0) {
|
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockEntity tile = entry.getValue();
|
BlockEntity tile = entry.getValue();
|
||||||
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
|
||||||
if (beacons == null) {
|
if (beacons == null) {
|
||||||
|
@ -50,7 +50,7 @@ public class SimpleChangeSetSummary implements ChangeSetSummary {
|
|||||||
public Map<BlockState, Integer> getBlocks() {
|
public Map<BlockState, Integer> getBlocks() {
|
||||||
HashMap<BlockState, Integer> map = new HashMap<>();
|
HashMap<BlockState, Integer> map = new HashMap<>();
|
||||||
for (int i = 0; i < blocks.length; i++) {
|
for (int i = 0; i < blocks.length; i++) {
|
||||||
if (blocks[i] != 0) {
|
if (blocks[i] != BlockTypesCache.ReservedIDs.__RESERVED__) {
|
||||||
BlockState state = BlockTypesCache.states[i];
|
BlockState state = BlockTypesCache.states[i];
|
||||||
map.put(state, blocks[i]);
|
map.put(state, blocks[i]);
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ public class ThreadUnsafeCharBlocks implements IChunkSet, IBlocks {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundTag getTile(int x, int y, int z) {
|
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
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user