Compare commits

..
7 Commits
Author SHA1 Message Date
Martin Robertz 6b4f3eb1c7 update 2024-09-15 14:30:24 +02:00
Ryan Nasers f74f9e4967 Should be fixed (#49) 2024-09-15 11:07:23 +02:00
Dream Master 12643d1b98 update 2024-08-09 20:41:23 +07:00
Ethryan 5bf4224f03 don't let players eat fluids anymore (#48) 2024-08-09 19:54:49 +07:00
Martin Robertz 5a1030bde4 update 2024-05-31 19:00:50 +02:00
Martin Robertz 948876ffcd Dev (#47)
* Update settings.gradle

* Update gradle-wrapper.properties

* Update dependencies.gradle
2024-05-31 11:23:46 +02:00
chochem 83142abde9 fix division by zero (#46) 2024-05-31 10:38:45 +02:00
11 changed files with 50 additions and 55 deletions

No files matched your search

+3 -3
View File
@@ -1,10 +1,10 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:ForestryMC:4.8.8:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.2.10:dev')
api('com.github.GTNewHorizons:ForestryMC:4.9.16:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.5.11:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.5.25-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.36-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
+12 -1
View File
@@ -85,6 +85,11 @@ accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
# Mixin classes will have access to "main" classes, but not the other way around.
separateMixinSourceSet =
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
@@ -117,9 +122,15 @@ 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 CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
# list of strings, with the acceptable keys being(case does not matter):
# cursemaven
# modrinth
excludeWellKnownRepositories =
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
Binary file not shown.
+1 -1
View File
@@ -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.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+5 -2
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Vendored
+2
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
+1 -3
View File
@@ -17,7 +17,5 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.19'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
}
@@ -6,12 +6,9 @@ import java.util.Map;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import binnie.Binnie;
@@ -19,7 +16,7 @@ import binnie.core.util.I18N;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemFluidContainer extends ItemFood {
public class ItemFluidContainer extends Item {
private FluidContainer container;
public static int LiquidExtraBee = 64;
@@ -39,7 +36,6 @@ public class ItemFluidContainer extends ItemFood {
}
public ItemFluidContainer(FluidContainer container) {
super(0, false);
this.container = container;
container.item = this;
maxStackSize = container.getMaxStackSize();
@@ -113,26 +109,4 @@ public class ItemFluidContainer extends ItemFood {
return true;
}
@Override
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
player.getFoodStats().func_151686_a(this, stack);
world.playSoundAtEntity(player, "random.burp", 0.5f, world.rand.nextFloat() * 0.1f + 0.9f);
onFoodEaten(stack, world, player);
return container.getEmpty();
}
@Override
public int getMaxItemUseDuration(ItemStack stack) {
return 32;
}
@Override
public int func_150905_g(ItemStack stack) {
return 0;
}
@Override
public float func_150906_h(ItemStack stack) {
return 0.0f;
}
}
@@ -256,7 +256,12 @@ public class TransferRequest {
FluidStack largeAmountOfLiquid = containerLiquid.copy();
largeAmountOfLiquid.amount = tank.getCapacity();
int amountAdded = tank.fill(largeAmountOfLiquid, false);
int numberOfContainersToAdd = amountAdded / containerLiquid.amount;
int numberOfContainersToAdd;
if (containerLiquid.amount > 0) {
numberOfContainersToAdd = amountAdded / containerLiquid.amount;
} else {
numberOfContainersToAdd = item.stackSize;
}
if (numberOfContainersToAdd > item.stackSize) {
numberOfContainersToAdd = item.stackSize;
}
@@ -358,7 +363,12 @@ public class TransferRequest {
int maximumExtractedLiquid = item.stackSize * fluid.amount;
FluidStack drainedLiquid = tank.drain(maximumExtractedLiquid, false);
int amountInTank = (drainedLiquid == null) ? 0 : drainedLiquid.amount;
int numberOfContainersToFill = amountInTank / fluid.amount;
int numberOfContainersToFill;
if (fluid.amount > 0) {
numberOfContainersToFill = amountInTank / fluid.amount;
} else {
numberOfContainersToFill = item.stackSize;
}
if (numberOfContainersToFill > item.stackSize) {
numberOfContainersToFill = item.stackSize;
}
@@ -1,5 +1,8 @@
package binnie.genetics.nei;
import static binnie.genetics.Genetics.itemSerum;
import static binnie.genetics.Genetics.itemSerumArray;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.List;
@@ -15,11 +18,9 @@ import binnie.core.Mods;
import binnie.core.nei.NEIUtils;
import binnie.core.nei.PositionedFluidTank;
import binnie.core.nei.RecipeHandlerBase;
import binnie.genetics.Genetics;
import binnie.genetics.api.IItemSerum;
import binnie.genetics.item.GeneticLiquid;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemList;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import forestry.api.genetics.AlleleManager;
@@ -30,14 +31,9 @@ public class InoculatorRecipeHandler extends RecipeHandlerBase {
private static final List<InoculatorRecipe> recipes = new ArrayList<>();
private void createInoculatorRecipeForNEI(ItemStack dnaManipulable) {
recipes.add(new InoculatorRecipe(dnaManipulable, new ItemStack(itemSerum, 1, OreDictionary.WILDCARD_VALUE)));
recipes.add(
new InoculatorRecipe(
dnaManipulable,
new ItemStack(Genetics.itemSerum, 1, OreDictionary.WILDCARD_VALUE)));
recipes.add(
new InoculatorRecipe(
dnaManipulable,
new ItemStack(Genetics.itemSerumArray, 1, OreDictionary.WILDCARD_VALUE)));
new InoculatorRecipe(dnaManipulable, new ItemStack(itemSerumArray, 1, OreDictionary.WILDCARD_VALUE)));
}
@Override
@@ -151,9 +147,10 @@ public class InoculatorRecipeHandler extends RecipeHandlerBase {
if (recipe.getSerum() != null && recipe.getDnaManipulable() != null) {
ISpeciesRoot root1 = AlleleManager.alleleRegistry.getSpeciesRoot(recipe.getDnaManipulable());
List<ItemStack> serums = new ArrayList<>();
for (ItemStack serumStack : ItemList.itemMap.get(recipe.getSerum().getItem())) {
List<ItemStack> serums = new ArrayList<>(200);
List<ItemStack> allSerumList = new ArrayList<>(1000);
recipe.serum.getItem().getSubItems(recipe.serum.getItem(), null, allSerumList);
for (ItemStack serumStack : allSerumList) {
if (serumStack.getTagCompound() != null) {
IItemSerum itemSerum = (IItemSerum) serumStack.getItem();
ISpeciesRoot root2 = itemSerum.getSpeciesRoot(serumStack);
@@ -18,7 +18,6 @@ import binnie.genetics.Genetics;
import binnie.genetics.api.IItemSerum;
import binnie.genetics.item.GeneticLiquid;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemList;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import forestry.api.genetics.AlleleManager;
@@ -143,9 +142,10 @@ public class SplicerRecipeHandler extends RecipeHandlerBase {
public CachedSplicer(SplicerRecipe recipe) {
if (recipe.getSerum() != null && recipe.getDnaManipulable() != null) {
ISpeciesRoot root1 = AlleleManager.alleleRegistry.getSpeciesRoot(recipe.getDnaManipulable());
List<ItemStack> serums = new ArrayList<>();
for (ItemStack serumStack : ItemList.itemMap.get(recipe.getSerum().getItem())) {
List<ItemStack> serums = new ArrayList<>(200);
List<ItemStack> allSerumList = new ArrayList<>(1000);
recipe.serum.getItem().getSubItems(recipe.serum.getItem(), null, allSerumList);
for (ItemStack serumStack : allSerumList) {
if (serumStack.getTagCompound() != null) {
IItemSerum itemSerum = (IItemSerum) serumStack.getItem();
ISpeciesRoot root2 = itemSerum.getSpeciesRoot(serumStack);