Skip to content

Commit

Permalink
feat: Update to Minecraft 1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Sep 22, 2023
1 parent 8dc01bd commit 22cac7d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 28 deletions.
7 changes: 1 addition & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
- Added display of distance between waystones in the selection screen (by iTrooz)
- Added some more tags for Waystones items
- Fixed TheOneProbe integration not being loaded
- Fixed sandy and mossy waystones not retaining their name when broken with silk touch
- Updated French Translation (by ChokoJoestar)
- Removed disableParticles option
- Updated to Minecraft 1.20.2
6 changes: 3 additions & 3 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
"waystones.mixins.json"
],
"depends": {
"balm-fabric": ">=7.0.0",
"fabricloader": ">=0.14.21",
"balm-fabric": ">=8.0.0",
"fabricloader": ">=0.14.22",
"fabric-api": "*",
"minecraft": ">=1.20",
"minecraft": ">=1.20.2",
"java": ">=17"
},
"suggests": {
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ journeymap_api_common_version=1.18.1-1.8-SNAPSHOT
journeymap_api_forge_version=1.18.1-1.8-SNAPSHOT

# Minecraft
minecraft_version = 1.20
minecraft_versions = 1.20,1.20.1
minecraft_version_range=[1.20,1.21)
minecraft_version = 1.20.2
minecraft_versions = 1.20.2
minecraft_version_range=[1.20.2,1.21)
java_version = 17

# Balm
balm_version = 7.1.0-SNAPSHOT
balm_version_range = [7.0.0,)
balm_version = 8.1.0-SNAPSHOT
balm_version_range = [8.0.0,)

# Forge
forge_version = 46.0.10
forge_version_range=[46.0.0,)
forge_loader_version_range=[46,)
forge_version = 48.0.1
forge_version_range=[48.0.0,)
forge_loader_version_range=[48,)
forge_mixins=true

# Fabric
fabric_version = 0.83.0+1.20
fabric_loader_version = 0.14.21
fabric_version = 0.89.0+1.20.2
fabric_loader_version = 0.14.22

# Dependencies
jei_minecraft_version=1.19.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ protected void renderLabels(GuiGraphics guiGraphics, int x, int y) {

@Override
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
renderBackground(guiGraphics);
super.render(guiGraphics, mouseX, mouseY, partialTicks);
renderTooltip(guiGraphics, mouseX, mouseY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) {

@Override
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
renderBackground(guiGraphics);
super.render(guiGraphics, mouseX, mouseY, partialTicks);
renderTooltip(guiGraphics, mouseX, mouseY);
for (ITooltipProvider tooltipProvider : tooltipProviders) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package net.blay09.mods.waystones.client.gui.screen;

import com.mojang.blaze3d.vertex.PoseStack;
import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.waystones.api.IWaystone;
import net.blay09.mods.waystones.menu.WaystoneSettingsMenu;
import net.blay09.mods.waystones.core.PlayerWaystoneManager;
import net.blay09.mods.waystones.core.WaystoneTypes;
import net.blay09.mods.waystones.network.message.EditWaystoneMessage;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.Checkbox;
Expand Down Expand Up @@ -110,8 +108,6 @@ public boolean keyPressed(int keyCode, int scanCode, int modifiers) {

@Override
protected void containerTick() {
textField.tick();

// Button presses focus the button after onPress, so we can't change focus inside. Defer to here instead.
if (focusTextFieldNextTick) {
setInitialFocus(textField);
Expand All @@ -121,7 +117,6 @@ protected void containerTick() {

@Override
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
renderBackground(guiGraphics);
super.render(guiGraphics, mouseX, mouseY, partialTicks);

guiGraphics.drawString(font, getTitle(), width / 2 - 100, height / 2 - 35, 0xFFFFFF);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import net.blay09.mods.waystones.Waystones;
import net.blay09.mods.waystones.api.IWaystone;
import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase;
import net.blay09.mods.waystones.worldgen.namegen.NameGenerator;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.Tag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.datafix.DataFixTypes;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
Expand Down Expand Up @@ -97,7 +99,8 @@ public CompoundTag save(CompoundTag tagCompound) {
public static WaystoneManager get(@Nullable MinecraftServer server) {
if (server != null) {
ServerLevel overworld = server.getLevel(Level.OVERWORLD);
return Objects.requireNonNull(overworld).getDataStorage().computeIfAbsent(WaystoneManager::read, WaystoneManager::new, DATA_NAME);
return Objects.requireNonNull(overworld).getDataStorage().computeIfAbsent(new Factory<>(WaystoneManager::new, WaystoneManager::read,
DataFixTypes.SAVED_DATA_MAP_DATA), DATA_NAME); // TODO this is most likely wrong but I don't think Forge has a solution, Fabric allows null
}

return clientStorageCopy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
import net.minecraft.util.datafix.DataFixTypes;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.saveddata.SavedData;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -91,7 +92,9 @@ public CompoundTag save(CompoundTag compound) {
public static NameGenerator get(@Nullable MinecraftServer server) {
if (server != null) {
ServerLevel overworld = server.getLevel(Level.OVERWORLD);
return Objects.requireNonNull(overworld).getDataStorage().computeIfAbsent(NameGenerator::load, NameGenerator::new, DATA_NAME);
return Objects.requireNonNull(overworld).getDataStorage().computeIfAbsent(new Factory<>(NameGenerator::new,
NameGenerator::load,
DataFixTypes.SAVED_DATA_MAP_DATA), DATA_NAME); // TODO this is most likely wrong but I don't think Forge has a solution, Fabric allows null
}

return clientStorageCopy;
Expand Down

0 comments on commit 22cac7d

Please sign in to comment.