I copied the TreeDecoratorType now it just crashes when I try to create a world with the message
"Can not register to a locked registry. Modder should use Forge Register methods."
here's my tree decorator type code
public class ModTreeDecoratorType<P extends TreeDecorator> extends ForgeRegistryEntry<ModTreeDecoratorType<?>> {
public static final TreeDecoratorType<MushroomTrunkDecorator> TRUNK_MUSHROOM = register("trunk_mushroom", MushroomTrunkDecorator.CODEC);
private final Codec<P> codec;
@SuppressWarnings("deprecation")
private static <P extends TreeDecorator> TreeDecoratorType<P> register(String p_70053_, Codec<P> p_70054_) {
return Registry.register(Registry.TREE_DECORATOR_TYPES, p_70053_, new TreeDecoratorType<>(p_70054_));
}
public ModTreeDecoratorType(Codec<P> p_70050_) {
this.codec = p_70050_;
}
public Codec<P> codec() {
return this.codec;
}
}