Tree Chopper

Tree Chopper

4M Downloads

requesting axe blacklist

buglord opened this issue ยท 1 comments

commented

botania terra axe already functions similarly but registers as an axe even when removed from whitelist due to

try {
ItemAxe tmp = (ItemAxe) entityPlayer.getHeldItemMainhand().getItem();
test = true;
} catch (Exception e) {
test = false;
}
preventing normal function of the tool. having a blacklist in addition to the whitelist would solve problem.

sidenote (possible performance enhancement); throwing exceptions for every non-axe item is a bit messy, could check instanceof instead.

commented

https://lsimons.wordpress.com/2009/07/20/instanceof-vs-classcastexception-performance-which-is-faster/ notes that speed is equivilant for casting exceptions and instanceof but makes no mention of memory usage. but also includes casting after instanceof which is not relevant for simply checking type.