diff --git a/build.gradle b/build.gradle index 0e5ef830..c5af3407 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1690907958 +//version: 1691351470 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -1152,7 +1152,10 @@ tasks.named("processIdeaSettings").configure { tasks.named("ideVirtualMainClasses").configure { // Make IntelliJ "Build project" build the mod jars - dependsOn("jar", "reobfJar", "spotlessCheck") + dependsOn("jar", "reobfJar") + if (!disableSpotless) { + dependsOn("spotlessCheck") + } } // workaround variable hiding in pom processing diff --git a/dependencies.gradle b/dependencies.gradle index bb26e506..bec943b7 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,10 +1,10 @@ dependencies { - implementation('com.github.GTNewHorizons:Galacticraft:3.0.68-GTNH:dev') - implementation('com.github.GTNewHorizons:NotEnoughItems:2.3.45-GTNH:dev') + implementation('com.github.GTNewHorizons:Galacticraft:3.0.73-GTNH:dev') + implementation('com.github.GTNewHorizons:NotEnoughItems:2.3.81-GTNH:dev') implementation('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev') - compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.33:api') - compileOnly('com.github.GTNewHorizons:EnderIO:2.4.10:api') + compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.36:api') + compileOnly('com.github.GTNewHorizons:EnderIO:2.4.24:api') compileOnly('curse.maven:cofh-lib-220333:2388748') compileOnly(deobf('https://s3.amazonaws.com/aidancbrady/mekanism/281-recommended/Mekanism-1.7.10-9.1.0.281.jar')) } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba77..c1962a79 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d3..17a8ddce 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.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d42..aeb74cbb 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/src/main/java/de/katzenpapst/amunra/tile/TileEntityMothershipEngineAbstract.java b/src/main/java/de/katzenpapst/amunra/tile/TileEntityMothershipEngineAbstract.java index 26cbe596..14ed69a4 100755 --- a/src/main/java/de/katzenpapst/amunra/tile/TileEntityMothershipEngineAbstract.java +++ b/src/main/java/de/katzenpapst/amunra/tile/TileEntityMothershipEngineAbstract.java @@ -123,7 +123,7 @@ public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { /** * Calculates tank capacity based on the boosters - * + * * @return */ abstract protected int getTankCapacity(); @@ -321,36 +321,15 @@ protected void processFluids() { if (canister != null && this.isItemFuel(canister)) { // attempt to drain it into the tank - FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(canister); - // int spaceForFluid = this.fuelTank.getCapacity() - - /* - * if (this.fuelTank.getFluid() == null || this.fuelTank.getFluid().amount + liquid.amount <= - * this.fuelTank.getCapacity()) { - */ final int fluidAmount = this.fuelTank.getFluid() == null ? 0 : this.fuelTank.getFluid().amount; final int spaceForFluid = this.fuelTank.getCapacity() - fluidAmount; // attempt to drain as much as we have space - if (canister.getItem() instanceof IFluidContainerItem) { - // try to do - final FluidStack drained = ((IFluidContainerItem) canister.getItem()) - .drain(canister, spaceForFluid, true); + if (canister.getItem() instanceof IFluidContainerItem fluidCanister) { + // try to drain as much as we have space for + final FluidStack drained = fluidCanister.drain(canister, spaceForFluid, true); if (drained != null && drained.amount > 0) { - // this.fuelTank.fill(new FluidStack(this.fuel, drained.amount), true); - // check how much fluid remains in there - // getFluidForFilledItem doesn't work on IFluidContainerItem - liquid = ((IFluidContainerItem) canister.getItem()).getFluid(canister); - // liquid = FluidContainerRegistry.getFluidForFilledItem(canister); - if (liquid == null || liquid.amount == 0) { - // this should replace the container with it's empty version - final ItemStack canisterNew = FluidContainerRegistry.drainFluidContainer(canister); - if (canisterNew != null) { - this.containingItems[0] = canisterNew; - } - } - // if(((IFluidContainerItem)canister.getItem()).) - // FluidContainerRegistry.get } } else { // attempt to drain it all at once @@ -358,34 +337,15 @@ protected void processFluids() { if (spaceForFluid >= capacity) { // now drain it - this.fuelTank.fill(new FluidStack(this.fuel, capacity), true); final ItemStack canisterNew = FluidContainerRegistry.drainFluidContainer(canister); if (canisterNew != null) { + this.fuelTank.fill(new FluidStack(this.fuel, capacity), true); this.containingItems[0] = canisterNew; } } } - // } } - /* - * if (this.containingItems[0].getItem() instanceof ItemCanisterGeneric) { if (this.containingItems[0].getItem() - * == GCItems.fuelCanister) { int originalDamage = this.containingItems[0].getItemDamage(); int used = - * this.fuelTank.fill(new FluidStack(GalacticraftCore.fluidFuel, ItemCanisterGeneric.EMPTY - originalDamage), - * true); if (originalDamage + used == ItemCanisterGeneric.EMPTY) this.containingItems[0] = new - * ItemStack(GCItems.oilCanister, 1, ItemCanisterGeneric.EMPTY); else this.containingItems[0] = new - * ItemStack(GCItems.fuelCanister, 1, originalDamage + used); } } else { final FluidStack liquid = - * FluidContainerRegistry.getFluidForFilledItem(this.containingItems[0]); if (liquid != null) { boolean isFuel = - * FluidUtil.testFuel(FluidRegistry.getFluidName(liquid)); if (isFuel) { if (this.fuelTank.getFluid() == null || - * this.fuelTank.getFluid().amount + liquid.amount <= this.fuelTank.getCapacity()) { this.fuelTank.fill(new - * FluidStack(GalacticraftCore.fluidFuel, liquid.amount), true); if - * (FluidContainerRegistry.isBucket(this.containingItems[0]) && - * FluidContainerRegistry.isFilledContainer(this.containingItems[0])) { final int amount = - * this.containingItems[0].stackSize; if (amount > 1) { this.fuelTank.fill(new - * FluidStack(GalacticraftCore.fluidFuel, (amount - 1) * FluidContainerRegistry.BUCKET_VOLUME), true); } - * this.containingItems[0] = new ItemStack(Items.bucket, amount); } else { this.containingItems[0].stackSize--; - * if (this.containingItems[0].stackSize == 0) { this.containingItems[0] = null; } } } } } } - */ } @Override @@ -878,7 +838,7 @@ public void beginTransit(final long duration) { /** * This should return how much fuel units are consumed per AU travelled, in millibuckets - * + * * @return */ // abstract public int getFuelUsagePerAU();