Compare commits

..
2 Commits
Author SHA1 Message Date
Maya 72ba898f39 update 2025-06-28 09:33:12 -06:00
ctrlaltmilk 9d18a56cc1 Backport WayofTime/BloodMagic@64660d2d28 (#99) 2025-06-28 09:33:03 -06:00
2 changed files with 25 additions and 22 deletions

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ dependencies {
api("com.github.GTNewHorizons:waila:1.8.8:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.7.59-GTNH:dev")
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.357:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.359:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.12.12-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.13:api") {transitive = false }
@@ -18,7 +18,9 @@ import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.items.IAltarManipulator;
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding;
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
import cpw.mods.fml.relauncher.Side;
@@ -70,28 +72,29 @@ public class BlockAltar extends BlockContainer {
public int getComparatorInputOverride(World world, int x, int y, int z, int meta) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TEAltar) {
TEAltar altar = (TEAltar) tile;
if (world.getBlock(x, y - 1, z) instanceof LargeBloodStoneBrick) {
ItemStack stack = altar.getStackInSlot(0);
if (stack != null && stack.getItem() instanceof EnergyBattery) {
EnergyBattery bloodOrb = (EnergyBattery) stack.getItem();
int maxEssence = bloodOrb.getMaxEssence();
int currentEssence = bloodOrb.getCurrentEssence(stack);
int level = currentEssence * 15 / maxEssence;
return Math.min(15, level) % 16;
}
} else {
int maxEssence = altar.getCapacity();
int currentEssence = altar.getCurrentBlood();
int level = currentEssence * 15 / maxEssence;
return Math.min(15, level) % 16;
}
if (!(tile instanceof TEAltar altar)) {
return 0;
}
return 0;
int maxEssence;
int currentEssence;
if (world.getBlock(x, y - 1, z) instanceof LargeBloodStoneBrick) {
ItemStack stack = altar.getStackInSlot(0);
if (stack == null || !(stack.getItem() instanceof IBloodOrb bloodOrb)
|| !(stack.getItem() instanceof IBindable)) {
return 0;
}
maxEssence = (int) (bloodOrb.getMaxEssence() * altar.getOrbMultiplier());
currentEssence = SoulNetworkHandler.getCurrentEssence(IBindable.getOwnerName(stack));
} else {
maxEssence = altar.getCapacity();
currentEssence = altar.getCurrentBlood();
}
return Math.min(15, currentEssence * 15 / maxEssence) % 16;
}
@Override