Missing structure ID fix

This commit is contained in:
paulevsGitch 2021-05-10 08:43:54 +03:00
parent 38eaf8be67
commit 41172e52c1
2 changed files with 5 additions and 5 deletions

View file

@ -40,11 +40,11 @@ public class EternalPortalStructure extends FeatureBaseStructure {
@Override @Override
public StructureFeature.StructureStartFactory<NoneFeatureConfiguration> getStartFactory() { public StructureFeature.StructureStartFactory<NoneFeatureConfiguration> getStartFactory() {
return SDFStructureStart::new; return PortalStructureStart::new;
} }
public static class SDFStructureStart extends StructureStart<NoneFeatureConfiguration> { public static class PortalStructureStart extends StructureStart<NoneFeatureConfiguration> {
public SDFStructureStart(StructureFeature<NoneFeatureConfiguration> feature, int chunkX, int chunkZ, BoundingBox box, int references, long seed) { public PortalStructureStart(StructureFeature<NoneFeatureConfiguration> feature, int chunkX, int chunkZ, BoundingBox box, int references, long seed) {
super(feature, chunkX, chunkZ, box, references, seed); super(feature, chunkX, chunkZ, box, references, seed);
} }

View file

@ -48,7 +48,7 @@ public class NBTPiece extends BasePiece {
@Override @Override
protected void addAdditionalSaveData(CompoundTag tag) { protected void addAdditionalSaveData(CompoundTag tag) {
tag.putString("id", structureID.toString()); tag.putString("structureID", structureID.toString());
tag.putInt("rotation", rotation.ordinal()); tag.putInt("rotation", rotation.ordinal());
tag.putInt("mirror", mirror.ordinal()); tag.putInt("mirror", mirror.ordinal());
tag.putInt("erosion", erosion); tag.putInt("erosion", erosion);
@ -58,7 +58,7 @@ public class NBTPiece extends BasePiece {
@Override @Override
protected void fromNbt(CompoundTag tag) { protected void fromNbt(CompoundTag tag) {
structureID = new ResourceLocation(tag.getString("id")); structureID = new ResourceLocation(tag.getString("structureID"));
rotation = Rotation.values()[tag.getInt("rotation")]; rotation = Rotation.values()[tag.getInt("rotation")];
mirror = Mirror.values()[tag.getInt("mirror")]; mirror = Mirror.values()[tag.getInt("mirror")];
erosion = tag.getInt("erosion"); erosion = tag.getInt("erosion");