mirror of
https://github.com/LegacyModdingMC/ChunkAPI.git
synced 2026-11-16 02:04:54 +00:00
add data cloning API
This commit is contained in:
13 files changed
+241
-4
No files matched your search
@@ -8,6 +8,7 @@
|
||||
package com.falsepattern.chunk.internal.vanilla;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
@@ -39,4 +40,9 @@ public class BlocklightManager extends NibbleManager implements ChunkDataManager
|
||||
public void readSectionFromNBT(Chunk chunk, ExtendedBlockStorage ebs, NBTTagCompound section) {
|
||||
ebs.setBlocklightArray(new NibbleArray(section.getByteArray("BlockLight"), 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneSection(Chunk fromChunk, ExtendedBlockStorage from, ExtendedBlockStorage to) {
|
||||
from.setBlocklightArray(ArrayUtil.copyArray(from.getBlocklightArray(), to.getBlocklightArray()));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user