mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-28 03:19:15 +00:00
3.6.22
This commit is contained in:
@@ -20,6 +20,7 @@ package net.momirealms.customcrops.api.core.world;
|
||||
import com.flowpowered.nbt.CompoundMap;
|
||||
import com.flowpowered.nbt.CompoundTag;
|
||||
import com.flowpowered.nbt.Tag;
|
||||
import com.flowpowered.nbt.stream.NBTInputStream;
|
||||
import net.momirealms.customcrops.api.core.SynchronizedCompoundMap;
|
||||
import net.momirealms.customcrops.api.core.block.CustomCropsBlock;
|
||||
import net.momirealms.customcrops.api.util.TagUtils;
|
||||
@@ -85,6 +86,7 @@ public class CustomCropsBlockStateImpl implements CustomCropsBlockState {
|
||||
return compoundMap.equals(that.compoundMap);
|
||||
}
|
||||
|
||||
// Due to the defects of flownbt itself, hash efficiency is very low
|
||||
@Override
|
||||
public int hashCode() {
|
||||
Tag<?> id = compoundMap.get("id");
|
||||
|
||||
@@ -59,6 +59,8 @@ public class TagUtils {
|
||||
}
|
||||
}
|
||||
|
||||
// There is a problem with this method, which comes from flownbt itself
|
||||
// This method cannot perform a deep copy of a compound nested in a list.
|
||||
public static CompoundMap deepClone(CompoundMap initial) {
|
||||
CompoundMap clone = new CompoundMap();
|
||||
for (Tag<?> tag : initial) {
|
||||
|
||||
Reference in New Issue
Block a user