1
0
mirror of https://github.com/plexusorg/Plex-FAWE.git synced 2025-04-17 04:43:03 +00:00

chore: minor changes

- null check get tile in ThreadUnsafeCharBlocks
 - 0 to reserved ID
This commit is contained in:
dordsor21 2023-06-18 15:03:51 +01:00
parent 78fb74665f
commit 135c77cfb5
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
8 changed files with 8 additions and 8 deletions
worldedit-bukkit/adapters
adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2
adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2
adapter-1_19/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R1
adapter-1_19_3/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R2
adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3
adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1
worldedit-core/src/main/java/com/fastasyncworldedit/core
history/changeset
queue/implementation/blocks

@ -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