Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requesting axe blacklist #81

Open
buglord opened this issue Jan 5, 2019 · 1 comment
Open

requesting axe blacklist #81

buglord opened this issue Jan 5, 2019 · 1 comment

Comments

@buglord
Copy link

buglord commented Jan 5, 2019

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.

@buglord
Copy link
Author

buglord commented Jan 5, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant