Fix return value of EnchantPower hook, closes #518
This commit is contained in:
parent
d3a2243799
commit
a0891d74a0
2 changed files with 8 additions and 2 deletions
|
@ -379,6 +379,6 @@ public class ForgeHooks
|
|||
}
|
||||
|
||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
return (block == null ? 0 : block.getEnchantPower(world, x, y, z));
|
||||
return (block == null ? 0 : block.getEnchantPowerBonus(world, x, y, z));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -1439,4 +1459,911 @@
|
||||
@@ -1439,4 +1459,917 @@
|
||||
canBlockGrass[0] = true;
|
||||
StatList.initBreakableStats();
|
||||
}
|
||||
|
@ -1062,6 +1062,12 @@
|
|||
+ * @param z Z position
|
||||
+ * @return The amount of enchanting power this block produces.
|
||||
+ */
|
||||
+ public float getEnchantPowerBonus(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ return getEnchantPower(world, x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated //Changed return to float, see above.
|
||||
+ public int getEnchantPower(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ return blockID == bookShelf.blockID ? 1 : 0;
|
||||
|
|
Loading…
Reference in a new issue