diff --git a/dependencies.gradle b/dependencies.gradle index b58e546..8d5a4fc 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,24 +1,24 @@ dependencies { - api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-312-GTNH:dev") - api("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev") + api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-352-GTNH:dev") + api("com.github.GTNewHorizons:NotEnoughItems:2.5.27-GTNH:dev") implementation("com.github.GTNewHorizons:Baubles:1.0.4:dev") - implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.0:dev") + implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.2:dev") - compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.13-gtnh:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.0-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.28-gtnh:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.1-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.17:dev") { transitive = false } - compileOnly('com.github.GTNewHorizons:EnderIO:2.6.4:dev') { transitive=false } - compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.2:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.47:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.2-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.13-gtnh:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.0-GTNH:dev") { transitive = false } + compileOnly('com.github.GTNewHorizons:EnderIO:2.7.4:dev') { transitive=false } + compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.9:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.163:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.5-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.28-gtnh:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.1-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.17:dev") { transitive = false } - compileOnly('com.github.GTNewHorizons:EnderIO:2.6.4:dev') {transitive=false} - compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.2:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:GTplusplus:1.11.19:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.2-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Botania:1.10.5-GTNH:dev") { transitive = false } + compileOnly('com.github.GTNewHorizons:EnderIO:2.7.4:dev') {transitive=false} + compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.9:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:GTplusplus:1.11.58:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.5-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Botania:1.10.12-GTNH:dev") { transitive = false } compileOnly("com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev") { transitive = false } compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913") { transitive = false } compileOnly("curse.maven:thermal-expansion-69163:2388759") { transitive = false } diff --git a/gradle.properties b/gradle.properties index 600ff57..ac7de19 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ channel = stable mappingsVersion = 12 # Defines other MCP mappings for dependency deobfuscation. -remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ +remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ # Select a default username for testing your mod. You can always override this per-run by running # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. @@ -61,6 +61,9 @@ gradleTokenModId = # [DEPRECATED] Mod name replacement token. gradleTokenModName = +# [DEPRECATED] Mod Group replacement token. +gradleTokenGroupName = + # [DEPRECATED] # Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java # public static final String VERSION = "GRADLETOKEN_VERSION"; @@ -114,7 +117,7 @@ minimizeShadowedDependencies = true # If disabled, won't rename the shadowed classes. relocateShadowedDependencies = true -# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories. +# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories. includeWellKnownRepositories = true # Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven. @@ -123,7 +126,7 @@ includeWellKnownRepositories = true usesMavenPublishing = true # Maven repository to publish the mod to. -# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/ +# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/ # Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token. # @@ -187,5 +190,3 @@ customArchiveBaseName = NotEnoughEnergistics # This is meant to be set in $HOME/.gradle/gradle.properties. # ideaCheckSpotlessOnBuild = true -# Non-GTNH properties -gradleTokenGroupName = diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22c..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index e8946ad..94c2daf 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22' } diff --git a/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java b/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java index b5607be..b0d3072 100644 --- a/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/client/GuiEventHandler.java @@ -204,14 +204,13 @@ public boolean handleDragNDrop(GuiContainer gui, int mouseX, int mouseY, ItemSta if (button == 0) { boolean areStackEqual = slotStack != null && slotStack.isItemEqual(copyStack) && ItemStack.areItemStackTagsEqual(slotStack, copyStack); - copyStack.stackSize = areStackEqual ? Math.min(slotStack.stackSize + copySize, 127) - : Math.min(copySize, 127); + copyStack.stackSize = areStackEqual ? slotStack.stackSize + copySize : copySize; sendPacket = true; } else if (button == 1) { boolean areStackEqual = slotStack != null && slotStack.isItemEqual(copyStack) && ItemStack.areItemStackTagsEqual(slotStack, copyStack); if (areStackEqual) { - copyStack.stackSize = Math.min(slotStack.stackSize + 1, 127); + copyStack.stackSize = slotStack.stackSize; } else { copyStack.stackSize = slotStack == null ? 1 : copySize; } diff --git a/src/main/java/com/github/vfyjxf/nee/network/packet/PacketSlotStackChange.java b/src/main/java/com/github/vfyjxf/nee/network/packet/PacketSlotStackChange.java index 591d96b..c0888f0 100644 --- a/src/main/java/com/github/vfyjxf/nee/network/packet/PacketSlotStackChange.java +++ b/src/main/java/com/github/vfyjxf/nee/network/packet/PacketSlotStackChange.java @@ -6,6 +6,9 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import com.github.vfyjxf.nee.utils.ItemUtils; import cpw.mods.fml.common.network.ByteBufUtils; import cpw.mods.fml.common.network.simpleimpl.IMessage; @@ -38,7 +41,7 @@ public List getCraftingSlots() { @Override public void fromBytes(ByteBuf buf) { - this.stack = ByteBufUtils.readItemStack(buf); + this.stack = ItemUtils.loadItemStackFromNBT(ByteBufUtils.readTag(buf)); int craftingSlotsSize = buf.readInt(); this.craftingSlots = new ArrayList<>(craftingSlotsSize); for (int i = 0; i < craftingSlotsSize; i++) { @@ -49,7 +52,7 @@ public void fromBytes(ByteBuf buf) { @Override public void toBytes(ByteBuf buf) { - ByteBufUtils.writeItemStack(buf, this.stack); + ByteBufUtils.writeTag(buf, ItemUtils.writeItemStackToNBT(this.stack, new NBTTagCompound())); buf.writeInt(this.craftingSlots.size()); for (Integer craftingSlot : this.craftingSlots) { buf.writeInt(craftingSlot);