Port to 22w43a

This commit is contained in:
Motschen
2022-10-27 20:25:26 +02:00
parent 9cc5393703
commit 2d902bbf3c
8 changed files with 28 additions and 27 deletions

View File

@@ -102,7 +102,7 @@ dependencies {
}
include 'org.aperlambda:lambdajcommon:1.8.1'
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
modCompileOnlyApi "com.terraformersmc:modmenu:${project.modmenu_version}"
// Compatibility mods
@@ -110,15 +110,15 @@ dependencies {
// modImplementation("maven.modrinth:ok-zoomer:${project.ok_zoomer_version}")
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
modImplementation "io.github.cottonmc:LibGui:${project.libgui_version}"
modImplementation "org.quiltmc:quilt-json5:1.0.0"
modCompileOnlyApi "io.github.cottonmc:LibGui:${project.libgui_version}"
modCompileOnlyApi "org.quiltmc:quilt-json5:1.0.0"
modCompileOnly "maven.modrinth:sodium:${project.sodium_version}"
modImplementation("maven.modrinth:emi:${project.emi_version}")
modImplementation "maven.modrinth:emotecraft:${project.emotecraft_version}"
modImplementation "io.github.kosmx:bendy-lib:${project.bendylib_version}"
modImplementation "dev.isxander:yet-another-config-lib:${project.yacl_version}"
modImplementation "maven.modrinth:inventory-tabs-updated:${project.inventorytabs_version}"
modImplementation "maven.modrinth:bedrockify:${project.bedrockify_version}"
modCompileOnlyApi "maven.modrinth:emi:${project.emi_version}"
modCompileOnlyApi "maven.modrinth:emotecraft:${project.emotecraft_version}"
modCompileOnlyApi "io.github.kosmx:bendy-lib:${project.bendylib_version}"
modCompileOnlyApi "dev.isxander:yet-another-config-lib:${project.yacl_version}"
modCompileOnlyApi "maven.modrinth:inventory-tabs-updated:${project.inventorytabs_version}"
modCompileOnlyApi "maven.modrinth:bedrockify:${project.bedrockify_version}"
// Required for Inventory Tabs
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") {
exclude(group: "net.fabricmc.fabric-api")

View File

@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.9
loader_version=0.14.9
minecraft_version=22w43a
yarn_mappings=22w43a+build.4
loader_version=0.14.10
# Mod Properties
mod_version = 1.7.1
@@ -15,10 +15,10 @@ modrinth_id=bXX9h73M
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.60.0+1.19.2
fabric_version=0.65.1+1.19.3
sodium_version=mc1.19.2-0.4.4
spruceui_version=4.0.0+1.19
midnightlib_version=0.6.1
midnightlib_version=0.6.2
modmenu_version=4.0.6
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
bendylib_version=2.0.+

View File

@@ -34,6 +34,7 @@ import net.minecraft.client.gui.widget.PressableWidget;
import net.minecraft.client.input.Input;
import net.minecraft.client.util.ScreenshotRecorder;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemGroups;
import net.minecraft.screen.slot.Slot;
import net.minecraft.screen.slot.SlotActionType;
import net.minecraft.util.math.MathHelper;
@@ -88,10 +89,10 @@ public class InputHandlers {
int currentTab = CreativeInventoryScreenAccessor.getSelectedTab();
int nextTab = currentTab + (next ? 1 : -1);
if (nextTab < 0)
nextTab = ItemGroup.GROUPS.length - 1;
else if (nextTab >= ItemGroup.GROUPS.length)
nextTab = ItemGroups.GROUPS.length - 1;
else if (nextTab >= ItemGroups.GROUPS.length)
nextTab = 0;
inventory.midnightcontrols$setSelectedTab(ItemGroup.GROUPS[nextTab]);
inventory.midnightcontrols$setSelectedTab(ItemGroups.GROUPS[nextTab]);
return true;
} else if (client.currentScreen instanceof InventoryScreen || client.currentScreen instanceof CraftingScreen || client.currentScreen instanceof AbstractFurnaceScreen<?>) {
RecipeBookWidget recipeBook;

View File

@@ -38,7 +38,7 @@ import net.minecraft.text.MutableText;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.Util;
import net.minecraft.util.math.Matrix4f;
import org.joml.Matrix4f;
import org.lwjgl.glfw.GLFW;
import java.awt.*;
@@ -290,8 +290,8 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
this.buildTabs();
this.addDrawableChild(this.resetOption.createWidget(Position.of(this.width / 2 - 155, this.height - 29), 150));
this.addDrawableChild(new ButtonWidget(this.width / 2 - 155 + 160, this.height - 29, 150, 20, SpruceTexts.GUI_DONE,
btn -> this.client.setScreen(this.parent)));
this.addDrawableChild(ButtonWidget.method_46430(SpruceTexts.GUI_DONE, btn -> this.client.setScreen(this.parent))
.method_46434(this.width / 2 - 155 + 160, this.height - 29, 150, 20).method_46431());
}
public void buildTabs() {

View File

@@ -37,8 +37,8 @@ public class RingScreen extends Screen {
protected void init() {
super.init();
if (mod.ring.getMaxPages() > 1) {
this.addDrawableChild(new ButtonWidget(5, 5, 20, 20, Text.of(""), button -> this.mod.ring.cyclePage(false)));
this.addDrawableChild(new ButtonWidget(width - 25, 5, 20, 20, Text.of(""), button -> this.mod.ring.cyclePage(true)));
this.addDrawableChild(ButtonWidget.method_46430(Text.of(""), button -> this.mod.ring.cyclePage(false)).method_46434(5, 5, 20, 20).method_46431());
this.addDrawableChild(ButtonWidget.method_46430(Text.of(""), button -> this.mod.ring.cyclePage(true)).method_46434(width - 25, 5, 20, 20).method_46431());
}
}

View File

@@ -38,8 +38,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity {
private boolean midnightcontrols$driftingPrevented = false;
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile, @Nullable PlayerPublicKey publicKey) {
super(world, profile, publicKey);
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) {
super(world, profile);
}
@Shadow

View File

@@ -48,9 +48,9 @@ public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
int i = this.width / 2 - 155;
int j = i + 160;
int k = this.height / 6 - 12 + 48;
this.addDrawableChild(new ButtonWidget(j, k, 150, 20, Text.translatable("midnightcontrols.menu.title.controller").append("..."), (button) -> {
this.addDrawableChild(ButtonWidget.method_46430(Text.translatable("midnightcontrols.menu.title.controller").append("..."), (button) -> {
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
}));
}).method_46434(j, k, 150, 20).method_46431());
}
}
}

View File

@@ -22,8 +22,8 @@ import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemUsageContext;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.Matrix4f;
import net.minecraft.util.shape.VoxelShape;
import org.joml.Matrix4f;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;