-
Notifications
You must be signed in to change notification settings - Fork 181
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
Make stone types always show in TOP #1664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks reasonable and changes makes sense. Ingame test was not performed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked through last changes and it still looks good.
Though as I mentioned on Discord it could be cool to know as what it will drop (in case it is not same as block itself). For example if you have Diorite Iron Ore, it could have tooltip which mentions it will drop as Iron Ore.
return super.getSilkTouchDrop(state); | ||
} | ||
return super.getSilkTouchDrop(this.getDefaultState()); | ||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: Add annotations
What
Previously, when TOP tried to get the item for an ore block with a stone type that was meant to drop as the default stone type when mined, it would use the default
getPickBlock
method which called thegetItem
method, which prevented it from seeing its true stonetype. This was fixed by simply overridinggetPickBlock
.Implementation Details
I just use the method that
getItem()
used, which was its superclass's implementation, which I hope makes sense. Also, do I need the comment?Outcome
Always makes the correct stone type appear in TOP.
Additional Information
Potential Compatibility Issues
For any mods that add new stone types that are supposed to show the default stone type in TOP, this would prevent that, although I don't see why that would be intended.