update a few things the automation could not handle
This commit is contained in:
+3
-3
@@ -17,12 +17,12 @@ version = '1.0.3'
|
||||
group = 'de.skate702.craftingkeys' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'craftingkeys'
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaLanguageVersion.of(8) // Need this here so eclipse task generates correctly.
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaLanguageVersion.of(17)
|
||||
compileJava.options.encoding = "UTF-8"
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
minecraft {
|
||||
mappings channel: 'official', version: '1.16.4'
|
||||
mappings channel: 'official', version: '1.19'
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
@@ -69,7 +69,7 @@ minecraft {
|
||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.16.5-36.2.20'
|
||||
minecraft 'net.minecraftforge:forge:1.19-41.0.62'
|
||||
}
|
||||
|
||||
// Example for how to get properties into the manifest for reading by the runtime..
|
||||
|
||||
@@ -3,10 +3,9 @@ package de.skate702.craftingkeys;
|
||||
|
||||
import net.minecraft.client.gui.screens.inventory.EnchantmentScreen;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.gui.screen.inventory.*;
|
||||
import net.minecraftforge.event.TickEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.ExtensionPoint;
|
||||
import net.minecraftforge.fml.IExtensionPoint;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import de.skate702.craftingkeys.manager.*;
|
||||
@@ -45,7 +44,7 @@ public class CraftingKeys {
|
||||
instance = this;
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, () -> Pair.of(() -> "client side mod only", (remoteversionstring,networkbool) -> networkbool));
|
||||
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> "client side mod only", (remote, isServer) -> isServer));
|
||||
Logger.info("load(e)", "Registered Mod.");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package de.skate702.craftingkeys.util;
|
||||
|
||||
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@@ -31,7 +32,7 @@ public class Util {
|
||||
* @return A item stack
|
||||
*/
|
||||
public static ItemStack getHeldStack() {
|
||||
return client.player.inventory.getCarried();
|
||||
return ((AbstractContainerScreen<?>)client.screen).getMenu().getCarried();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,8 +65,7 @@ public class Util {
|
||||
* @param lang_key key from lang-file
|
||||
*/
|
||||
public static void printMessage(String lang_key) {
|
||||
String translated = new TranslatableComponent(lang_key).getContents();
|
||||
client.player.chat(translated);
|
||||
client.player.displayClientMessage(Component.translatable(lang_key), false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
modLoader = "javafml" #mandatory
|
||||
loaderVersion = "[36,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
loaderVersion = "[41,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
license = "All rights reserved"
|
||||
[[mods]] #mandatory
|
||||
modId = "craftingkeys" #mandatory
|
||||
@@ -14,12 +14,12 @@ description = "Simple better crafting! Crafing Keys enables new inventory key-bi
|
||||
[[dependencies.craftingkeys]] #optional
|
||||
modId = "forge" #mandatory
|
||||
mandatory = true #mandatory
|
||||
versionRange = "[36,)" #mandatory
|
||||
versionRange = "[41,)" #mandatory
|
||||
ordering = "NONE"
|
||||
side = "CLIENT"
|
||||
[[dependencies.craftingkeys]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[1.16.5,)"
|
||||
versionRange = "[1.19,)"
|
||||
ordering = "NONE"
|
||||
side = "CLIENT"
|
||||
|
||||
Reference in New Issue
Block a user