Skip to content

Commit

Permalink
Don't forward registration calls in entity registry
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 18, 2022
1 parent 249074c commit 33b6e6e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ public boolean containsKey(ResourceLocation var0) {
return this.wrapped.containsKey(var0);
}

@Override
public Reference<EntityType<?>> createIntrusiveHolder(EntityType var0) {
return wrapped.createIntrusiveHolder(var0);
}

@Override
public HolderGetter<EntityType<?>> createRegistrationLookup() {
return wrapped.createRegistrationLookup();
Expand All @@ -212,19 +207,6 @@ public Set<Entry<ResourceKey<EntityType<?>>, EntityType<?>>> entrySet() {

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
Expand Down Expand Up @@ -347,17 +329,6 @@ public void put(int entityId, ResourceLocation key, EntityType entityClass) {
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,6 @@ public static void updateMinecraftAIState(NPC npc, Mob entity) {
}

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,
Expand Down

0 comments on commit 33b6e6e

Please sign in to comment.