Skip to content

Commit

Permalink
make displayVariants functional again
Browse files Browse the repository at this point in the history
  • Loading branch information
ToCraft committed Mar 2, 2024
1 parent d521d6b commit 0129df9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions common/src/main/java/tocraft/remorphed/RemorphedClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,5 @@ public void initialize() {
// Register event handlers
ClientTickEvent.CLIENT_PRE.register(new KeyPressHandler());
ClientNetworking.registerPacketHandlers();

ClientPlayerEvent.CLIENT_PLAYER_JOIN.register(player -> new Thread(RemorphedScreen::populateRenderEntities).start());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@Environment(EnvType.CLIENT)
public class RemorphedScreen extends Screen {
private final List<ShapeType<?>> unlocked = new ArrayList<>();
private static final Map<ShapeType<?>, Mob> renderEntities = new LinkedHashMap<>();
private final Map<ShapeType<?>, Mob> renderEntities = new LinkedHashMap<>();
private final List<EntityWidget<?>> entityWidgets = new ArrayList<>();
private final SearchWidget searchBar = createSearchBar();
private final Button helpButton = createHelpButton();
Expand Down Expand Up @@ -192,7 +192,7 @@ private void populateEntityWidgets(List<ShapeType<?>> rendered) {
}
}

public static void populateRenderEntities() {
private void populateRenderEntities() {
if (renderEntities.isEmpty()) {
List<ShapeType<?>> types = ShapeType.getAllTypes(Minecraft.getInstance().level, Remorphed.displayVariantsInMenu);
for (ShapeType<?> type : types) {
Expand Down

0 comments on commit 0129df9

Please sign in to comment.