9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2026-01-04 15:41:46 +00:00

deep clone a compound

This commit is contained in:
XiaoMoMi
2024-09-08 16:17:11 +08:00
parent 90b1ce1994
commit e04f787587
10 changed files with 162 additions and 111 deletions

View File

@@ -25,6 +25,7 @@ import net.momirealms.customcrops.api.core.block.CustomCropsBlock;
import net.momirealms.customcrops.api.core.world.*;
import net.momirealms.customcrops.api.core.world.adaptor.AbstractWorldAdaptor;
import net.momirealms.customcrops.api.util.StringUtils;
import net.momirealms.customcrops.api.util.TagUtils;
import net.momirealms.customcrops.common.helper.GsonHelper;
import net.momirealms.customcrops.common.util.Key;
import org.bukkit.Bukkit;
@@ -231,7 +232,7 @@ public class SlimeWorldAdaptorR1 extends AbstractWorldAdaptor<SlimeWorld> {
}
for (int pos : (int[]) block.get("pos").getValue()) {
BlockPos blockPos = new BlockPos(pos);
blockMap.put(blockPos, CustomCropsBlockState.create(customBlock, data));
blockMap.put(blockPos, CustomCropsBlockState.create(customBlock, TagUtils.deepClone(data)));
}
}
sectionMap.put(id, CustomCropsSection.restore(id, blockMap));