Compare commits

..
13 Commits
Author SHA1 Message Date
Dream Master b5cf82b574 update 2025-01-02 13:32:42 +01:00
mM4riandMartin Robertz c4cb9a19c6 Fix crash for crumbling/transmuting effect if effect range is 0 (#49)
Co-authored-by: Martin Robertz <[email protected]>
2025-01-02 12:05:18 +01:00
glowredman 8fb3407357 Add Localizations (#50) 2025-01-02 12:03:06 +01:00
Martin Robertz 001f1b27f6 update 2024-09-12 08:22:10 +02:00
chochem 6429eea5d6 Merge pull request #48 from chochem/add-null-check
Add a couple of null checks
2024-09-11 18:27:58 +01:00
chochem 3ff6e91053 second null check 2024-09-11 18:07:25 +01:00
chochem cdf3046e61 sa 2024-09-11 17:59:35 +01:00
chochem 05476997e1 add null check to allow duplicate apatite removal 2024-09-11 17:58:27 +01:00
boubou19 c2cafd4a98 Merge pull request #47 from GTNewHorizons/rename
The renaming
2024-09-03 16:52:03 +02:00
NotAPenguin e9606af217 rename 2024-09-03 14:43:39 +02:00
Dream Master c3abd86907 update 2024-07-06 12:52:27 +07:00
Martin Robertz ddac6aeb67 Merge pull request #46 from Quantumlyy/patch-bee-speed-modifier
Patch production multiplier to account for difficulty and genome
2024-07-06 10:36:48 +07:00
Quantumlyy 31c130ebae adjust modifier calculations 2024-07-03 15:06:42 +02:00
14 changed files with 92 additions and 43 deletions

No files matched your search

+6 -6
View File
@@ -1,14 +1,14 @@
// Add your dependencies here
dependencies {
compile('com.github.GTNewHorizons:ForestryMC:4.9.3:dev')
compile('com.github.GTNewHorizons:ForestryMC:4.10.1:dev')
compileOnly('com.github.GTNewHorizons:BloodMagic:1.6.2:dev')
compileOnly('com.github.GTNewHorizons:ThaumicHorizons:1.6.1:dev')
compileOnly('com.github.GTNewHorizons:BloodMagic:1.7.0:dev')
compileOnly('com.github.GTNewHorizons:ThaumicHorizons:1.6.5:dev')
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Botania:1.11.1-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Botania:1.12.3-GTNH:api') {transitive = false}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.14:dev')
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.10-GTNH:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.40:dev')
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.0-GTNH: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, Modrinth, 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.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-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 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}
@@ -59,13 +59,17 @@ public class AlleleEffectCrumbling extends AlleleEffect {
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
// Get random coords within territory
int xRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
int yRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[1]);
int zRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[2]);
int[] randomCoords = new int[3];
for (int i = 0; i < 3; i++) {
int range = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[i]);
if (range > 0) {
randomCoords[i] = world.rand.nextInt(range) - range / 2;
}
}
int xCoord = coords.posX + world.rand.nextInt(xRange) - xRange / 2;
int yCoord = coords.posY + world.rand.nextInt(yRange) - yRange / 2;
int zCoord = coords.posZ + world.rand.nextInt(zRange) - zRange / 2;
int xCoord = coords.posX + randomCoords[0];
int yCoord = coords.posY + randomCoords[1];
int zCoord = coords.posZ + randomCoords[2];
Block block = world.getBlock(xCoord, yCoord, zCoord);
if (block != null) {
@@ -37,13 +37,17 @@ public class AlleleEffectTransmuting extends AlleleEffect {
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
// Get random coords within territory
int xRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
int yRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[1]);
int zRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[2]);
int[] randomCoords = new int[3];
for (int i = 0; i < 3; i++) {
int range = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[i]);
if (range > 0) {
randomCoords[i] = world.rand.nextInt(range) - range / 2;
}
}
int xCoord = coords.posX + world.rand.nextInt(xRange) - xRange / 2;
int yCoord = coords.posY + world.rand.nextInt(yRange) - yRange / 2;
int zCoord = coords.posZ + world.rand.nextInt(zRange) - zRange / 2;
int xCoord = coords.posX + randomCoords[0];
int yCoord = coords.posY + randomCoords[1];
int zCoord = coords.posZ + randomCoords[2];
BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord);
transmutationController.attemptTransmutations(
@@ -426,14 +426,16 @@ public class CraftingManager {
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(Items.emerald), "xxx", "xxx", "xxx", 'x', "nuggetEmerald"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
ItemInterface.getItemStack("apatite"),
"xxx",
"xxx",
"xxx",
'x',
Config.nuggets.getStackForType(NuggetType.APATITE)));
if (ItemInterface.getItemStack("apatite") != null) {
GameRegistry.addRecipe(
new ShapedOreRecipe(
ItemInterface.getItemStack("apatite"),
"xxx",
"xxx",
"xxx",
'x',
Config.nuggets.getStackForType(NuggetType.APATITE)));
}
output = Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY);
GameRegistry.addRecipe(
@@ -638,9 +638,11 @@ public class ThaumcraftHelper implements IModHelper {
new ItemStack(item.getItem(), 1, ForestryHelper.BlockResource.APATITE.ordinal()),
list.copy());
item = ItemInterface.getItemStack(ForestryHelper.Name, "apatite");
ThaumcraftApi.registerObjectTag(
new ItemStack(item.getItem(), 1, item.getItemDamage()),
list.copy().add(Aspect.CRYSTAL, 2));
if (item != null) {
ThaumcraftApi.registerObjectTag(
new ItemStack(item.getItem(), 1, item.getItemDamage()),
list.copy().add(Aspect.CRYSTAL, 2));
}
list = new AspectList().add(Aspect.MOTION, 2).add(Aspect.FLIGHT, 1);
item = ItemInterface.getItemStack("beeDroneGE");
@@ -15,6 +15,7 @@ import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeModifier;
import forestry.api.apiculture.IBeekeepingLogic;
import forestry.api.apiculture.IBeekeepingMode;
import forestry.apiculture.genetics.BeeGenome;
import magicbees.bees.BeeManager;
import magicbees.bees.BeeSpecies;
@@ -91,8 +92,16 @@ public class TileEntityApimancersDrainerCommon extends TileEntity
}
protected int getProductionMultiplier(IBeeModifier modifier, IBee queen, TileEntity te) {
IBeeGenome queenGenome = queen.getGenome();
float productionMultiplier = modifier.getProductionModifier(queenGenome, 1.0F);
IBeekeepingMode mode = BeeManager.beeRoot.getBeekeepingMode(te.getWorldObj());
IBeeGenome genome = queen.getGenome();
float genomeSpeed = genome.getSpeed();
float productionMultiplier = modifier.getProductionModifier(genome, 1.0F);
productionMultiplier += mode != null ? mode.getBeeModifier().getProductionModifier(genome, productionMultiplier)
: 0.0F;
productionMultiplier += genomeSpeed;
float minimum = Math.max(productionMultiplier, 1.0F);
return (int) Math.ceil(minimum);
}
@@ -12,7 +12,7 @@ import forestry.api.apiculture.IBeeModifier;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_IndustrialApiary;
import gregtech.common.tileentities.machines.basic.MTEIndustrialApiary;
public class TileEntityApimancersDrainerGT extends TileEntityApimancersDrainerCommon
implements IGregTechDeviceInformation {
@@ -43,7 +43,7 @@ public class TileEntityApimancersDrainerGT extends TileEntityApimancersDrainerCo
BaseMetaTileEntity GTMetaTileEntity = getGTTileEntity(above);
if (GTMetaTileEntity != null) {
IMetaTileEntity underlyingMetaTileEntity = GTMetaTileEntity.getMetaTileEntity();
if (!(underlyingMetaTileEntity instanceof GT_MetaTileEntity_IndustrialApiary)) return null;
if (!(underlyingMetaTileEntity instanceof MTEIndustrialApiary)) return null;
return (IBeeHousing) underlyingMetaTileEntity;
}
@@ -59,14 +59,14 @@ public class TileEntityApimancersDrainerGT extends TileEntityApimancersDrainerCo
@Override
protected ItemStack getQueen(IBeeHousing beeHousing, TileEntity te) {
BaseMetaTileEntity GTMetaTileEntity = getGTTileEntity(te);
GT_MetaTileEntity_IndustrialApiary industrialApiary = getGTIndustrialApiary(GTMetaTileEntity);
MTEIndustrialApiary industrialApiary = getGTIndustrialApiary(GTMetaTileEntity);
return industrialApiary != null ? industrialApiary.getUsedQueen() : super.getQueen(beeHousing, te);
}
@Override
protected int getProductionMultiplier(IBeeModifier modifier, IBee queen, TileEntity te) {
BaseMetaTileEntity GTMetaTileEntity = getGTTileEntity(te);
GT_MetaTileEntity_IndustrialApiary industrialApiary = getGTIndustrialApiary(GTMetaTileEntity);
MTEIndustrialApiary industrialApiary = getGTIndustrialApiary(GTMetaTileEntity);
int housingProductionMultiplier = super.getProductionMultiplier(modifier, queen, te);
return industrialApiary != null
? housingProductionMultiplier * (int) Math.ceil(Math.sqrt(industrialApiary.mSpeed))
@@ -78,11 +78,11 @@ public class TileEntityApimancersDrainerGT extends TileEntityApimancersDrainerCo
return isGTMetaTileEntity ? (BaseMetaTileEntity) te : null;
}
private GT_MetaTileEntity_IndustrialApiary getGTIndustrialApiary(BaseMetaTileEntity bmte) {
private MTEIndustrialApiary getGTIndustrialApiary(BaseMetaTileEntity bmte) {
if (bmte != null) {
IMetaTileEntity underlyingMetaTileEntity = bmte.getMetaTileEntity();
if (!(underlyingMetaTileEntity instanceof GT_MetaTileEntity_IndustrialApiary)) return null;
return (GT_MetaTileEntity_IndustrialApiary) underlyingMetaTileEntity;
if (!(underlyingMetaTileEntity instanceof MTEIndustrialApiary)) return null;
return (MTEIndustrialApiary) underlyingMetaTileEntity;
}
return null;
}
@@ -40,6 +40,7 @@ tile.magicApiary.name=Magic Apiary
tile.visAuraProvider.name=Vis Apiary Booster
tile.apimancersDrainer.name=Apimancer's Drainer
tile.manaAuraProvider.name=Mana Apiary Booster
tile.hive.name=Hive
tile.hive.curious.name=Curious Hive
tile.hive.unusual.name=Unusual Hive
tile.hive.deep.name=Deep Hive
@@ -49,6 +50,7 @@ tile.hive.oblivion.name=Oblivion Hive
tile.enchantedEarth.name=Enchanted Earth
#Combs
item.comb.name=Comb
comb.mundane=Mundane Comb
comb.molten=Molten Comb
comb.occult=Occult Comb
@@ -78,11 +80,13 @@ comb.TElux=Lux Comb
comb.TEendearing=Endearing Comb
#Waxes
item.wax.name=Wax
wax.magic=Magic Wax
wax.soul=Soulful Wax
wax.amnesic=Amnesic Wax
#Drops
item.drop.name=Drop
drop.enchanting=Enchanting Drop
drop.intellect=Intellect Drop
drop.destabilized=Destabilized Drop
@@ -91,10 +95,12 @@ drop.lux=Lux Drop
drop.endearing=Endearing Drop
#Pollens
item.pollen.name=Pollen
pollen.unusual=Unusual Pollen
pollen.phased=Phased Pollen
#Nuggets
item.beeNugget.name=Nugget
nugget.iron=Iron Nugget
nugget.steel=Steel Nugget
nugget.copper=Copper Nugget
@@ -106,6 +112,7 @@ nugget.emerald=Emerald Shard
nugget.apatite=Apatite Shard
#Propolises
item.propolis.name=Propolis
propolis.dull=Ordered Propolis
propolis.air=Breezey Propolis
propolis.fire=Burning Propolis
@@ -115,6 +122,7 @@ propolis.magic=Chaotic Propolis
propolis.unstable=Unstable Propolis
#Misc resources
item.miscResources.name=Resource
resource.fragment=Lore Fragment
resource.lump=Aromatic Lump
resource.fertilizer=Concentrated Compound
@@ -151,7 +159,9 @@ item.frenziedFrame.name=Maddening Frame of Frenzy
item.bloodSoakedFrame.name=Blood Frame
#Capsules
item.capsule.magic.name=Magic Capsule
capsule.magic=%s Magic Capsule
item.capsule.void.name=Void Capsule
capsule.void=%s Void Capsule
#Liquids
@@ -203,6 +213,8 @@ moon.new=New Moon
#moon.alt.new=
#Backpack
item.backpack.thaumaturgeT1.name=Thaumaturge's Backpack
item.backpack.thaumaturgeT2.name=Thaumaturge's Backpack
backpack.thaumaturge=Thaumaturge's Backpack
#Itemgroups