Hello I tried to registry my custom trunk placer but when I try to register it I can't because TrunkPlacerType(Codec<P>) has private access. Anyone knows how I can use reflection on it? Or any other method :((
// I can't use super because the private access
public class KratTrunkPlacerType <P extends TrunkPlacer> extends TrunkPlacerType<P> {
public static KratTrunkPlacerType<LargeTrunkPlacer> LARGE_TRUNK = register("large_trunk",LargeTrunkPlacer.CODEC);
private final Codec<P> codec;
private static <P extends TrunkPlacer> KratTrunkPlacerType<P> register(String pKey, Codec<P> pCodec){
return Registry.register(Registry.TRUNK_PLACER_TYPES, pKey, new KratTrunkPlacerType<>(pCodec));
}
private KratTrunkPlacerType(Codec<P> pCodec) {
super(pCodec);
this.codec = pCodec;
}
public Codec<P> codec() {
return this.codec;
}
}