Don't forward registration calls in entity registry

This commit is contained in:
fullwall 2022-12-18 11:53:26 +08:00
parent 249074c7bc
commit 33b6e6eb37
2 changed files with 0 additions and 30 deletions

View File

@ -195,11 +195,6 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
return this.wrapped.containsKey(var0);
}
@Override
public Reference<EntityType<?>> createIntrusiveHolder(EntityType var0) {
return wrapped.createIntrusiveHolder(var0);
}
@Override
public HolderGetter<EntityType<?>> createRegistrationLookup() {
return wrapped.createRegistrationLookup();
@ -212,19 +207,6 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
public EntityType findType(Class<?> search) {
return minecraftClassMap.inverse().get(search);
/*
for (Object type : wrapped) {
if (minecraftClassMap.get(type) == search) {
return (EntityTypes) type;
}
}
return null;
*/
}
@Override
public Registry<EntityType<?>> freeze() {
return wrapped.freeze();
}
@Override
@ -347,17 +329,6 @@ public class CustomEntityRegistry extends DefaultedMappedRegistry<EntityType<?>>
entityIds.put(entityClass, entityId);
}
@Override
public Reference<EntityType<?>> register(ResourceKey<EntityType<?>> key, EntityType<?> type, Lifecycle lifecycle) {
return wrapped.register(key, type, lifecycle);
}
@Override
public Reference<EntityType<?>> registerMapping(int var0, ResourceKey<EntityType<?>> key, EntityType<?> type,
Lifecycle lifecycle) {
return wrapped.registerMapping(var0, key, type, lifecycle);
}
@Override
public Set<ResourceKey<EntityType<?>>> registryKeySet() {
return wrapped.registryKeySet();

View File

@ -2310,7 +2310,6 @@ public class NMSImpl implements NMSBridge {
}
private static final MethodHandle ADVANCEMENTS_PLAYER_FIELD = NMS.getFinalSetter(ServerPlayer.class, "cq");
private static final Set<EntityType> BAD_CONTROLLER_LOOK = EnumSet.of(EntityType.POLAR_BEAR, EntityType.BEE,
EntityType.SILVERFISH, EntityType.SHULKER, EntityType.ENDERMITE, EntityType.ENDER_DRAGON, EntityType.BAT,
EntityType.SLIME, EntityType.DOLPHIN, EntityType.MAGMA_CUBE, EntityType.HORSE, EntityType.GHAST,