Skip to content

Commit a6cf9f0

Browse files
committed
cleanup progress
1 parent a1edfef commit a6cf9f0

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/main/java/harmonised/pmmo/client/gui/glossary/Glossary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private void buildContent(List<Positioner<?>> cache, int width, ResponsiveLayout
224224

225225
CompletableFuture<List<Positioner.Layout>> entities = CompletableFuture.supplyAsync(() ->
226226
access.lookupOrThrow(Registries.ENTITY_TYPE).listElements()
227-
.map(ref -> ref.value().create(Minecraft.getInstance().level))
227+
.map(ref -> ref.value().create(Minecraft.getInstance().level, EntitySpawnReason.COMMAND))
228228
.filter(Objects::nonNull)
229229
.map(entity -> new Positioner.Layout(
230230
new EntityObjectPanelWidget(0x88394045, width, entity),

src/main/java/harmonised/pmmo/client/gui/glossary/GlossaryLoadingScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected void init() {
3535
layout.arrangeElements();
3636
layout.visitWidgets(this::addRenderableWidget);
3737
LocalPlayer player = Minecraft.getInstance().player;
38-
CreativeModeTabs.tryRebuildTabContents(player.connection.enabledFeatures(), player.canUseGameMasterBlocks(), player.clientLevel.registryAccess());
38+
CreativeModeTabs.tryRebuildTabContents(player.connection.enabledFeatures(), player.canUseGameMasterBlocks(), player.registryAccess());
3939
if (ClientUtils.glossary == null) {
4040
CompletableFuture.supplyAsync(() -> new Glossary().setTargetedObject(target)).thenAccept(glossary -> ClientUtils.glossary = glossary);
4141
}

src/main/java/harmonised/pmmo/client/gui/glossary/components/CollapsingPanel.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ public CollapsingPanel addCallback(Consumer<CollapsingPanel> callback) {
4646
@Override
4747
public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) {
4848
guiGraphics.enableScissor(this.getX(), this.getY(), this.getWidth(), this.getHeight());
49-
guiGraphics.blit(RenderPipelines.GUI, TEXTURE_LOCATION, this.getX(), this.getY(), this.getWidth(), this.getHeight(),
50-
collapsed() ? 140 : 0, 0, collapsed() ? 7 : 147, 165, 256, 256);
49+
guiGraphics.blit(RenderPipelines.GUI_TEXTURED, TEXTURE_LOCATION, this.getX(), this.getY(), collapsed() ? 140 : 0, 0,
50+
this.getWidth(), this.getHeight(), collapsed() ? 7 : 147, 165, 256, 256);
5151
int offset = (int) (28d / scale);
5252
int hScaled = (int) (80d / scale);
53-
guiGraphics.blit(RenderPipelines.GUI, collapsed() ? RIGHT : LEFT, this.getX()+this.width-offset,
54-
this.getY()+ (this.height/2) - (hScaled/2) - 1, offset, hScaled,
55-
0, 0, 7, 20, 7, 20);
53+
guiGraphics.blit(RenderPipelines.GUI_TEXTURED, collapsed() ? RIGHT : LEFT, this.getX()+this.width-offset,
54+
this.getY()+ (this.height/2) - (hScaled/2) - 1,
55+
0, 0, offset, hScaled, 7, 20, 7, 20);
5656
super.renderWidget(guiGraphics, mouseX, mouseY, partialTick);
5757
guiGraphics.disableScissor();
5858
}

src/main/java/harmonised/pmmo/client/gui/glossary/components/panels/BiomeObjectPanelWidget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public BiomeObjectPanelWidget(int color, int width, Holder<Biome> biome) {
4949
try {
5050
Minecraft.getInstance().getTextureManager().register(texture, Minecraft.getInstance().getTextureManager().getTexture(texture));
5151
}catch (Exception e) {
52-
texture = ResourceLocation.withDefaultNamespace("textures/biome/plains.png");
52+
texture = Identifier.withDefaultNamespace("textures/biome/plains.png");
5353
}
5454
LocationData data = core.getLoader().BIOME_LOADER.getData(rl);
5555
skills.addAll(data.bonusMap().values().stream().map(Map::keySet).flatMap(Set::stream).toList());

src/main/java/harmonised/pmmo/client/gui/glossary/components/panels/DimensionObjectPanelWidget.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public class DimensionObjectPanelWidget extends ObjectPanelWidget {
3838

3939
public DimensionObjectPanelWidget(int color, int width, ResourceKey<Level> dimension) {
4040
super(color, width, Core.get(LogicalSide.CLIENT));
41-
ResourceLocation texture = ResourceLocation.fromNamespaceAndPath(
42-
dimension.location().getNamespace(),
43-
"textures/dimension/" + dimension.location().getPath() + ".png");
41+
Identifier texture = Identifier.fromNamespaceAndPath(
42+
dimension.identifier().getNamespace(),
43+
"textures/dimension/" + dimension.identifier().getPath() + ".png");
4444
try {
4545
Minecraft.getInstance().getTextureManager().register(texture, Minecraft.getInstance().getTextureManager().getTexture(texture));
4646
}catch (Exception e) {
47-
texture = ResourceLocation.withDefaultNamespace("textures/dimension/overworld.png");
47+
texture = Identifier.withDefaultNamespace("textures/dimension/overworld.png");
4848
}
49-
LocationData data = core.getLoader().BIOME_LOADER.getData(dimension.location());
49+
LocationData data = core.getLoader().BIOME_LOADER.getData(dimension.identifier());
5050
skills.addAll(data.bonusMap().values().stream().map(Map::keySet).flatMap(Set::stream).toList());
5151
skills.addAll(data.travelReq().keySet());
5252
this.id = dimension.identifier().toString();

0 commit comments

Comments
 (0)