@@ -8,6 +8,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.nbt.DynamicOpsNBT;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
@@ -312,6 +313,7 @@ public final class CraftLegacy {
|
||||
SPAWN_EGGS.put((byte) EntityType.ZOMBIFIED_PIGLIN.getTypeId(), Material.ZOMBIFIED_PIGLIN_SPAWN_EGG);
|
||||
SPAWN_EGGS.put((byte) EntityType.ZOMBIE_VILLAGER.getTypeId(), Material.ZOMBIE_VILLAGER_SPAWN_EGG);
|
||||
|
||||
SharedConstants.a();
|
||||
DispenserRegistry.init();
|
||||
|
||||
for (Material material : Material.values()) {
|
||||
@@ -400,7 +402,7 @@ public final class CraftLegacy {
|
||||
stack.setInt("id", material.getId());
|
||||
stack.setShort("Damage", data);
|
||||
|
||||
Dynamic<NBTBase> converted = DataConverterRegistry.a().update(DataConverterTypes.ITEM_STACK, new Dynamic<NBTBase>(DynamicOpsNBT.a, stack), -1, CraftMagicNumbers.INSTANCE.getDataVersion());
|
||||
Dynamic<NBTBase> converted = DataConverterRegistry.a().update(DataConverterTypes.ITEM_STACK, new Dynamic<NBTBase>(DynamicOpsNBT.INSTANCE, stack), -1, CraftMagicNumbers.INSTANCE.getDataVersion());
|
||||
|
||||
String newId = converted.get("id").asString("");
|
||||
// Recover spawn eggs with invalid data
|
||||
|
||||
Reference in New Issue
Block a user