mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
2
Commits
1.7.49
...
1.7.41-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6c7496141 | ||
|
|
09a104314b |
No files matched your search
+2
-2
@@ -24,9 +24,9 @@
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.8.8:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.57-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.59-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.353:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.357: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 }
|
||||
|
||||
@@ -71,12 +71,21 @@ public class BlockAltar extends BlockContainer {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile instanceof TEAltar) {
|
||||
ItemStack stack = ((TEAltar) tile).getStackInSlot(0);
|
||||
TEAltar altar = (TEAltar) tile;
|
||||
|
||||
if (stack != null && stack.getItem() instanceof EnergyBattery) {
|
||||
EnergyBattery bloodOrb = (EnergyBattery) stack.getItem();
|
||||
int maxEssence = bloodOrb.getMaxEssence();
|
||||
int currentEssence = bloodOrb.getCurrentEssence(stack);
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user