From 485e462a83aeeb425477bccb7f45d3a6a317448f Mon Sep 17 00:00:00 2001 From: Abdiel Kavash <19243993+AbdielKavash@users.noreply.github.com> Date: Tue, 27 May 2025 13:53:44 -0600 Subject: [PATCH] Allow the Orb of Armok to work from within a Blood Altar. (#89) Adds a new method isFilledForFree to IBloodOrb which is false by default, but may be used by orbs like the Orb of Armok to be filled instantly by the Blood Altar. --- dependencies.gradle | 6 ++--- .../api/items/interfaces/IBloodOrb.java | 4 ++++ .../common/tileEntity/TEAltar.java | 24 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 1b2b27bc..42270f2c 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -24,11 +24,11 @@ dependencies { api("com.github.GTNewHorizons:waila:1.8.6:dev") - api("com.github.GTNewHorizons:NotEnoughItems:2.7.45-GTNH:dev") + api("com.github.GTNewHorizons:NotEnoughItems:2.7.49-GTNH:dev") - compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.310:dev") {transitive = false } + compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.314:dev") {transitive = false } - compileOnly("com.github.GTNewHorizons:Botania:1.12.8-GTNH:api") {transitive = false } + compileOnly("com.github.GTNewHorizons:Botania:1.12.10-GTNH:api") {transitive = false } compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.10:api") {transitive = false } compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.2:dev") {transitive = false } diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java index bd7e5708..2247b270 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/items/interfaces/IBloodOrb.java @@ -5,4 +5,8 @@ public interface IBloodOrb { int getMaxEssence(); int getOrbLevel(); + + default boolean isFilledForFree() { + return false; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index 625a8322..6bf2a227 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -629,6 +629,30 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return; } + if (item.isFilledForFree()) { + // Fill owner's network to the maximum, affected by altar runes. + SoulNetworkHandler.addCurrentEssenceToMaximum( + ownerName, + Integer.MAX_VALUE, + (int) Math.min(Integer.MAX_VALUE, (long) item.getMaxEssence() * this.orbCapacityMultiplier)); + + if (totalWorldTime % 4 == 0) { + SpellHelper.sendIndexedParticleToAllAround( + worldObj, + xCoord, + yCoord, + zCoord, + 20, + worldObj.provider.dimensionId, + 3, + xCoord, + yCoord, + zCoord); + } + + return; + } + if (fluid != null && fluid.amount >= 1) { int liquidDrained = Math.min( (int) (upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate),