Fix POI types not being registered properly

This commit is contained in:
apple502j 2022-07-30 05:56:51 +09:00 committed by modmuss50
parent 7cd20a142b
commit 7675279697
2 changed files with 2 additions and 0 deletions
fabric-object-builder-api-v1/src/main
java/net/fabricmc/fabric/api/object/builder/v1/world/poi
resources

View file

@ -76,6 +76,7 @@ public final class PointOfInterestHelper {
// INTERNAL METHODS
private static PointOfInterestType register(Identifier id, int ticketCount, int searchDistance, Set<BlockState> states) {
PointOfInterestTypes.POI_STATES.addAll(states);
return PointOfInterestTypes.register(Registry.POINT_OF_INTEREST_TYPE, RegistryKey.of(Registry.POINT_OF_INTEREST_TYPE_KEY, id), states, ticketCount, searchDistance);
}
}

View file

@ -2,6 +2,7 @@ accessWidener v1 named
extendable method net/minecraft/block/AbstractBlock$Settings <init> (Lnet/minecraft/block/Material;Ljava/util/function/Function;)V
extendable method net/minecraft/block/AbstractBlock$Settings <init> (Lnet/minecraft/block/Material;Lnet/minecraft/block/MapColor;)V
accessible field net/minecraft/world/poi/PointOfInterestTypes POI_STATES Ljava/util/Set;
accessible method net/minecraft/world/poi/PointOfInterestTypes register (Lnet/minecraft/util/registry/Registry;Lnet/minecraft/util/registry/RegistryKey;Ljava/util/Set;II)Lnet/minecraft/world/poi/PointOfInterestType;
extendable class net/minecraft/block/entity/BlockEntityType$BlockEntityFactory