mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
Port to 22w43a
This commit is contained in:
18
build.gradle
18
build.gradle
@@ -102,7 +102,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
include 'org.aperlambda:lambdajcommon:1.8.1'
|
include 'org.aperlambda:lambdajcommon:1.8.1'
|
||||||
|
|
||||||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
modCompileOnlyApi "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||||
|
|
||||||
// Compatibility mods
|
// Compatibility mods
|
||||||
|
|
||||||
@@ -110,15 +110,15 @@ dependencies {
|
|||||||
// modImplementation("maven.modrinth:ok-zoomer:${project.ok_zoomer_version}")
|
// modImplementation("maven.modrinth:ok-zoomer:${project.ok_zoomer_version}")
|
||||||
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
||||||
|
|
||||||
modImplementation "io.github.cottonmc:LibGui:${project.libgui_version}"
|
modCompileOnlyApi "io.github.cottonmc:LibGui:${project.libgui_version}"
|
||||||
modImplementation "org.quiltmc:quilt-json5:1.0.0"
|
modCompileOnlyApi "org.quiltmc:quilt-json5:1.0.0"
|
||||||
modCompileOnly "maven.modrinth:sodium:${project.sodium_version}"
|
modCompileOnly "maven.modrinth:sodium:${project.sodium_version}"
|
||||||
modImplementation("maven.modrinth:emi:${project.emi_version}")
|
modCompileOnlyApi "maven.modrinth:emi:${project.emi_version}"
|
||||||
modImplementation "maven.modrinth:emotecraft:${project.emotecraft_version}"
|
modCompileOnlyApi "maven.modrinth:emotecraft:${project.emotecraft_version}"
|
||||||
modImplementation "io.github.kosmx:bendy-lib:${project.bendylib_version}"
|
modCompileOnlyApi "io.github.kosmx:bendy-lib:${project.bendylib_version}"
|
||||||
modImplementation "dev.isxander:yet-another-config-lib:${project.yacl_version}"
|
modCompileOnlyApi "dev.isxander:yet-another-config-lib:${project.yacl_version}"
|
||||||
modImplementation "maven.modrinth:inventory-tabs-updated:${project.inventorytabs_version}"
|
modCompileOnlyApi "maven.modrinth:inventory-tabs-updated:${project.inventorytabs_version}"
|
||||||
modImplementation "maven.modrinth:bedrockify:${project.bedrockify_version}"
|
modCompileOnlyApi "maven.modrinth:bedrockify:${project.bedrockify_version}"
|
||||||
// Required for Inventory Tabs
|
// Required for Inventory Tabs
|
||||||
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") {
|
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") {
|
||||||
exclude(group: "net.fabricmc.fabric-api")
|
exclude(group: "net.fabricmc.fabric-api")
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.19.2
|
minecraft_version=22w43a
|
||||||
yarn_mappings=1.19.2+build.9
|
yarn_mappings=22w43a+build.4
|
||||||
loader_version=0.14.9
|
loader_version=0.14.10
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.7.1
|
mod_version = 1.7.1
|
||||||
@@ -15,10 +15,10 @@ modrinth_id=bXX9h73M
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# 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
|
sodium_version=mc1.19.2-0.4.4
|
||||||
spruceui_version=4.0.0+1.19
|
spruceui_version=4.0.0+1.19
|
||||||
midnightlib_version=0.6.1
|
midnightlib_version=0.6.2
|
||||||
modmenu_version=4.0.6
|
modmenu_version=4.0.6
|
||||||
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
|
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
|
||||||
bendylib_version=2.0.+
|
bendylib_version=2.0.+
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import net.minecraft.client.gui.widget.PressableWidget;
|
|||||||
import net.minecraft.client.input.Input;
|
import net.minecraft.client.input.Input;
|
||||||
import net.minecraft.client.util.ScreenshotRecorder;
|
import net.minecraft.client.util.ScreenshotRecorder;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.item.ItemGroups;
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.screen.slot.SlotActionType;
|
import net.minecraft.screen.slot.SlotActionType;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
@@ -88,10 +89,10 @@ public class InputHandlers {
|
|||||||
int currentTab = CreativeInventoryScreenAccessor.getSelectedTab();
|
int currentTab = CreativeInventoryScreenAccessor.getSelectedTab();
|
||||||
int nextTab = currentTab + (next ? 1 : -1);
|
int nextTab = currentTab + (next ? 1 : -1);
|
||||||
if (nextTab < 0)
|
if (nextTab < 0)
|
||||||
nextTab = ItemGroup.GROUPS.length - 1;
|
nextTab = ItemGroups.GROUPS.length - 1;
|
||||||
else if (nextTab >= ItemGroup.GROUPS.length)
|
else if (nextTab >= ItemGroups.GROUPS.length)
|
||||||
nextTab = 0;
|
nextTab = 0;
|
||||||
inventory.midnightcontrols$setSelectedTab(ItemGroup.GROUPS[nextTab]);
|
inventory.midnightcontrols$setSelectedTab(ItemGroups.GROUPS[nextTab]);
|
||||||
return true;
|
return true;
|
||||||
} else if (client.currentScreen instanceof InventoryScreen || client.currentScreen instanceof CraftingScreen || client.currentScreen instanceof AbstractFurnaceScreen<?>) {
|
} else if (client.currentScreen instanceof InventoryScreen || client.currentScreen instanceof CraftingScreen || client.currentScreen instanceof AbstractFurnaceScreen<?>) {
|
||||||
RecipeBookWidget recipeBook;
|
RecipeBookWidget recipeBook;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import net.minecraft.text.MutableText;
|
|||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
import net.minecraft.util.math.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@@ -290,8 +290,8 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
this.buildTabs();
|
this.buildTabs();
|
||||||
|
|
||||||
this.addDrawableChild(this.resetOption.createWidget(Position.of(this.width / 2 - 155, this.height - 29), 150));
|
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,
|
this.addDrawableChild(ButtonWidget.method_46430(SpruceTexts.GUI_DONE, btn -> this.client.setScreen(this.parent))
|
||||||
btn -> this.client.setScreen(this.parent)));
|
.method_46434(this.width / 2 - 155 + 160, this.height - 29, 150, 20).method_46431());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildTabs() {
|
public void buildTabs() {
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ public class RingScreen extends Screen {
|
|||||||
protected void init() {
|
protected void init() {
|
||||||
super.init();
|
super.init();
|
||||||
if (mod.ring.getMaxPages() > 1) {
|
if (mod.ring.getMaxPages() > 1) {
|
||||||
this.addDrawableChild(new ButtonWidget(5, 5, 20, 20, Text.of("◀"), button -> this.mod.ring.cyclePage(false)));
|
this.addDrawableChild(ButtonWidget.method_46430(Text.of("◀"), button -> this.mod.ring.cyclePage(false)).method_46434(5, 5, 20, 20).method_46431());
|
||||||
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(true)).method_46434(width - 25, 5, 20, 20).method_46431());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity {
|
public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity {
|
||||||
private boolean midnightcontrols$driftingPrevented = false;
|
private boolean midnightcontrols$driftingPrevented = false;
|
||||||
|
|
||||||
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile, @Nullable PlayerPublicKey publicKey) {
|
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) {
|
||||||
super(world, profile, publicKey);
|
super(world, profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
|
|||||||
int i = this.width / 2 - 155;
|
int i = this.width / 2 - 155;
|
||||||
int j = i + 160;
|
int j = i + 160;
|
||||||
int k = this.height / 6 - 12 + 48;
|
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));
|
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
||||||
}));
|
}).method_46434(j, k, 150, 20).method_46431());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ import net.minecraft.item.ItemPlacementContext;
|
|||||||
import net.minecraft.item.ItemUsageContext;
|
import net.minecraft.item.ItemUsageContext;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.hit.HitResult;
|
import net.minecraft.util.hit.HitResult;
|
||||||
import net.minecraft.util.math.Matrix4f;
|
|
||||||
import net.minecraft.util.shape.VoxelShape;
|
import net.minecraft.util.shape.VoxelShape;
|
||||||
|
import org.joml.Matrix4f;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|||||||
Reference in New Issue
Block a user