mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Fix return value of EnchantPower hook, closes #518
This commit is contained in:
1 parent
d3a2243799
commit
a0891d74a0
2 files changed
+8
-2
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user