Java Code Examples for net.minecraft.stats.StatList#objectUseStats()
The following examples show how to use
net.minecraft.stats.StatList#objectUseStats() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftStatistic.java From Thermos with GNU General Public License v3.0 | 6 votes |
public static net.minecraft.stats.StatBase getMaterialStatistic(org.bukkit.Statistic stat, Material material) { try { if (stat == Statistic.MINE_BLOCK) { return StatList.mineBlockStatArray[material.getId()]; } if (stat == Statistic.CRAFT_ITEM) { return StatList.objectCraftStats[material.getId()]; } if (stat == Statistic.USE_ITEM) { return StatList.objectUseStats[material.getId()]; } if (stat == Statistic.BREAK_ITEM) { return StatList.objectBreakStats[material.getId()]; } } catch (ArrayIndexOutOfBoundsException e) { return null; } return null; }