geforkt von Mirrors/FastAsyncWorldEdit
Fix removing section lighting
- Paper and spigot differ in methods - Also don't clone it as we're trying to fill the actual data...
Dieser Commit ist enthalten in:
Ursprung
b18c646bce
Commit
bad3d31d90
@ -27,6 +27,7 @@ import com.sk89q.worldedit.internal.Constants;
|
|||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
|
import io.papermc.lib.PaperLib;
|
||||||
import net.minecraft.server.v1_15_R1.BiomeBase;
|
import net.minecraft.server.v1_15_R1.BiomeBase;
|
||||||
import net.minecraft.server.v1_15_R1.BiomeStorage;
|
import net.minecraft.server.v1_15_R1.BiomeStorage;
|
||||||
import net.minecraft.server.v1_15_R1.BlockPosition;
|
import net.minecraft.server.v1_15_R1.BlockPosition;
|
||||||
@ -181,8 +182,8 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibble) {
|
synchronized (nibble) {
|
||||||
byte[] bytes = nibble.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibble.getIfSet() : nibble.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,8 +194,8 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = nibbleSky.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import com.sk89q.worldedit.internal.Constants;
|
|||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
|
import io.papermc.lib.PaperLib;
|
||||||
import net.minecraft.server.v1_16_R1.BiomeBase;
|
import net.minecraft.server.v1_16_R1.BiomeBase;
|
||||||
import net.minecraft.server.v1_16_R1.BiomeStorage;
|
import net.minecraft.server.v1_16_R1.BiomeStorage;
|
||||||
import net.minecraft.server.v1_16_R1.BlockPosition;
|
import net.minecraft.server.v1_16_R1.BlockPosition;
|
||||||
@ -182,8 +183,8 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibble) {
|
synchronized (nibble) {
|
||||||
byte[] bytes = nibble.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibble.getIfSet() : nibble.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,8 +195,8 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = nibbleSky.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import com.sk89q.worldedit.internal.Constants;
|
|||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
|
import io.papermc.lib.PaperLib;
|
||||||
import net.minecraft.server.v1_16_R2.BiomeBase;
|
import net.minecraft.server.v1_16_R2.BiomeBase;
|
||||||
import net.minecraft.server.v1_16_R2.BiomeStorage;
|
import net.minecraft.server.v1_16_R2.BiomeStorage;
|
||||||
import net.minecraft.server.v1_16_R2.BlockPosition;
|
import net.minecraft.server.v1_16_R2.BlockPosition;
|
||||||
@ -182,8 +183,8 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibble) {
|
synchronized (nibble) {
|
||||||
byte[] bytes = nibble.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibble.getIfSet() : nibble.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,8 +195,8 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = nibbleSky.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import com.sk89q.worldedit.internal.Constants;
|
|||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
|
import io.papermc.lib.PaperLib;
|
||||||
import net.minecraft.server.v1_16_R3.BiomeBase;
|
import net.minecraft.server.v1_16_R3.BiomeBase;
|
||||||
import net.minecraft.server.v1_16_R3.BiomeStorage;
|
import net.minecraft.server.v1_16_R3.BiomeStorage;
|
||||||
import net.minecraft.server.v1_16_R3.BlockPosition;
|
import net.minecraft.server.v1_16_R3.BlockPosition;
|
||||||
@ -182,8 +183,8 @@ public class BukkitGetBlocks_1_16_4 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibble) {
|
synchronized (nibble) {
|
||||||
byte[] bytes = nibble.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibble.getIfSet() : nibble.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,8 +195,8 @@ public class BukkitGetBlocks_1_16_4 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (nibble != null) {
|
if (nibble != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = nibbleSky.getCloneIfSet();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
if (bytes != NibbleArray.EMPTY_NIBBLE) {
|
if (!PaperLib.isPaper() || bytes != NibbleArray.EMPTY_NIBBLE) {
|
||||||
Arrays.fill(bytes, (byte) 0);
|
Arrays.fill(bytes, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren