mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 15:23:06 +00:00
Compare commits
2
Commits
master
...
1.7.41-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6c7496141 | ||
|
|
09a104314b |
No files matched your search
+2
-2
@@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:waila:1.8.8:dev")
|
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:Botania:1.12.12-GTNH:api") {transitive = false }
|
||||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.13: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);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if (tile instanceof TEAltar) {
|
if (tile instanceof TEAltar) {
|
||||||
ItemStack stack = ((TEAltar) tile).getStackInSlot(0);
|
TEAltar altar = (TEAltar) tile;
|
||||||
|
|
||||||
if (stack != null && stack.getItem() instanceof EnergyBattery) {
|
if (world.getBlock(x, y - 1, z) instanceof LargeBloodStoneBrick) {
|
||||||
EnergyBattery bloodOrb = (EnergyBattery) stack.getItem();
|
ItemStack stack = altar.getStackInSlot(0);
|
||||||
int maxEssence = bloodOrb.getMaxEssence();
|
|
||||||
int currentEssence = bloodOrb.getCurrentEssence(stack);
|
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;
|
int level = currentEssence * 15 / maxEssence;
|
||||||
return Math.min(15, level) % 16;
|
return Math.min(15, level) % 16;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user