mirror of
https://github.com/LegacyModdingMC/ChunkAPI.git
synced 2026-11-16 18:44:52 +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 lombok.val;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -103,4 +104,10 @@ public class BlockIDManager extends VanillaManager
|
||||
ebs.setBlockMSBArray(new NibbleArray(section.getByteArray("Add"), 4));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneSection(Chunk fromChunk, ExtendedBlockStorage from, ExtendedBlockStorage to) {
|
||||
to.setBlockLSBArray(ArrayUtil.copyArray(from.getBlockLSBArray(), to.getBlockLSBArray()));
|
||||
to.setBlockMSBArray(ArrayUtil.copyArray(from.getBlockMSBArray(), to.getBlockMSBArray()));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user