mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-02-17 21:11:26 +01:00
Init empty section with skylight array
This commit is contained in:
parent
dc3ab46803
commit
ede846f894
@ -85,7 +85,7 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<Chunk, ChunkSection[], Chunk
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ChunkSection(0, false);
|
emptySection = new ChunkSection(0, true);
|
||||||
fieldSection = ChunkSection.class.getDeclaredField("blockIds");
|
fieldSection = ChunkSection.class.getDeclaredField("blockIds");
|
||||||
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
||||||
fieldNonEmptyBlockCount = ChunkSection.class.getDeclaredField("nonEmptyBlockCount");
|
fieldNonEmptyBlockCount = ChunkSection.class.getDeclaredField("nonEmptyBlockCount");
|
||||||
@ -370,7 +370,7 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<Chunk, ChunkSection[], Chunk
|
|||||||
if (!chunk.isLoaded()) {
|
if (!chunk.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
net.minecraft.server.v1_10_R1.Chunk nmsChunk = ((CraftChunk) chunk).getHandle();
|
net.minecraft.server.v1_10_R1.Chunk nmsChunk = ((CraftChunk) chunk).getHandle();
|
||||||
WorldServer w = (WorldServer) nmsChunk.getWorld();
|
WorldServer w = (WorldServer) nmsChunk.getWorld();
|
||||||
PlayerChunkMap chunkMap = w.getPlayerChunkMap();
|
PlayerChunkMap chunkMap = w.getPlayerChunkMap();
|
||||||
PlayerChunk playerChunk = chunkMap.getChunk(nmsChunk.locX, nmsChunk.locZ);
|
PlayerChunk playerChunk = chunkMap.getChunk(nmsChunk.locX, nmsChunk.locZ);
|
||||||
|
@ -77,7 +77,7 @@ public class BukkitQueue17 extends BukkitQueue_0<Chunk, ChunkSection[], ChunkSec
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ChunkSection(0, false);
|
emptySection = new ChunkSection(0, true);
|
||||||
fieldData = ChunkSection.class.getDeclaredField("blockData");
|
fieldData = ChunkSection.class.getDeclaredField("blockData");
|
||||||
fieldData.setAccessible(true);
|
fieldData.setAccessible(true);
|
||||||
fieldIds = ChunkSection.class.getDeclaredField("blockIds");
|
fieldIds = ChunkSection.class.getDeclaredField("blockIds");
|
||||||
|
@ -77,7 +77,7 @@ public class BukkitQueue18R3 extends BukkitQueue_0<Chunk, ChunkSection[], ChunkS
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ChunkSection(0, false);
|
emptySection = new ChunkSection(0, true);
|
||||||
fieldSection = ChunkSection.class.getDeclaredField("blockIds");
|
fieldSection = ChunkSection.class.getDeclaredField("blockIds");
|
||||||
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
||||||
fieldNonEmptyBlockCount = ChunkSection.class.getDeclaredField("nonEmptyBlockCount");
|
fieldNonEmptyBlockCount = ChunkSection.class.getDeclaredField("nonEmptyBlockCount");
|
||||||
|
@ -81,7 +81,7 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<Chunk, ChunkSection[], Chu
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ChunkSection(0, false);
|
emptySection = new ChunkSection(0, true);
|
||||||
fieldSection = ChunkSection.class.getDeclaredField("blockIds");
|
fieldSection = ChunkSection.class.getDeclaredField("blockIds");
|
||||||
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
||||||
fieldNonEmptyBlockCount = ChunkSection.class.getDeclaredField("nonEmptyBlockCount");
|
fieldNonEmptyBlockCount = ChunkSection.class.getDeclaredField("nonEmptyBlockCount");
|
||||||
|
@ -65,7 +65,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ExtendedBlockStorage(0, false);
|
emptySection = new ExtendedBlockStorage(0, true);
|
||||||
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
||||||
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
||||||
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
||||||
|
@ -80,7 +80,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ExtendedBlockStorage(0, false);
|
emptySection = new ExtendedBlockStorage(0, true);
|
||||||
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
||||||
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
||||||
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
||||||
|
@ -70,7 +70,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ExtendedBlockStorage(0, false);
|
emptySection = new ExtendedBlockStorage(0, true);
|
||||||
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
||||||
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
||||||
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
||||||
|
@ -59,7 +59,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ExtendedBlockStorage(0, false);
|
emptySection = new ExtendedBlockStorage(0, true);
|
||||||
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
||||||
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
||||||
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
||||||
|
@ -65,7 +65,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ExtendedBlockStorage(0, false);
|
emptySection = new ExtendedBlockStorage(0, true);
|
||||||
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
Class<?> converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter");
|
||||||
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
||||||
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
||||||
|
@ -83,7 +83,7 @@ public class SpongeQueue_1_11 extends NMSMappedFaweQueue<World, net.minecraft.wo
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
emptySection = new ExtendedBlockStorage(0, false);
|
emptySection = new ExtendedBlockStorage(0, true);
|
||||||
Class<?> converter = Class.forName("com.sk89q.worldedit.sponge.nms.NBTConverter");
|
Class<?> converter = Class.forName("com.sk89q.worldedit.sponge.nms.NBTConverter");
|
||||||
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
methodFromNative = converter.getDeclaredMethod("toNative", Tag.class);
|
||||||
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
methodToNative = converter.getDeclaredMethod("fromNative", NBTBase.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user