Skip to content

Commit

Permalink
Fixed Shell Screen not rendering Vortex
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 committed Dec 3, 2024
1 parent 79351b3 commit 12a5681
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceKey;
Expand All @@ -37,8 +38,9 @@
import whocraft.tardis_refined.patterns.ShellPatterns;
import whocraft.tardis_refined.registry.TRBlockRegistry;

import java.util.*;
import java.util.stream.Stream;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public class ShellSelectionScreen extends SelectionScreen {

Expand Down Expand Up @@ -114,7 +116,6 @@ public void selectShell(ResourceLocation themeId) {

@Override
public void render(GuiGraphics guiGraphics, int i, int j, float f) {
renderBackground(guiGraphics);
PoseStack poseStack = guiGraphics.pose();
Minecraft mc = Minecraft.getInstance();
ClientLevel lvl = mc.level;
Expand Down Expand Up @@ -194,6 +195,7 @@ public void render(GuiGraphics guiGraphics, int i, int j, float f) {
super.render(guiGraphics, i, j, f);
}


private void renderShell(GuiGraphics guiGraphics, int x, int y, float scale) {
ShellModel model = ShellModelCollection.getInstance().getShellEntry(this.currentShellTheme).getShellModel(pattern);
model.setDoorPosition(false);
Expand Down Expand Up @@ -226,12 +228,7 @@ public GenericMonitorSelectionList createSelectionList() {

selectionList.setRenderBackground(false);


Set<Map.Entry<ResourceKey<ShellTheme>, ShellTheme>> allShells = ShellTheme.SHELL_THEME_DEFERRED_REGISTRY.entrySet();

Stream<Map.Entry<ResourceKey<ShellTheme>, ShellTheme>> sortedShells = allShells.stream().sorted(Comparator.comparing(o -> o.getValue().getDisplayName().toString()));

for (Map.Entry<ResourceKey<ShellTheme>, ShellTheme> shellTheme : sortedShells.toList()) {
for (Map.Entry<ResourceKey<ShellTheme>, ShellTheme> shellTheme : ShellTheme.SHELL_THEME_DEFERRED_REGISTRY.entrySet()) {
ShellTheme theme = shellTheme.getValue();
ResourceLocation shellThemeId = shellTheme.getKey().location();

Expand Down

0 comments on commit 12a5681

Please sign in to comment.