-
Notifications
You must be signed in to change notification settings - Fork 8
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
ClassCastException: newBiospheresMod.BlockDome cannot be cast to net.minecraft.block.BlockAnvil #15
Comments
Ooh. Ouch. Will make this a high priority fix. |
Should be fixed in latest -- didn't remove the block dome yet -- but for now, I made it just so that anvil isn't a valid blockdome (if you try to use it, it will just use the regular anvil block instead). |
This hack does not fix the issue for any other (i.e. mod) blocks that use custom renderers and (rightfully) assume that if they're being called to render a block it's the type of block they executed to render. I'm also wondering about hoppers, A better method would be to have a config option to enable / disable BlockDome for a given block. Alternatively, designate your own rendering handler (an instance of I may do up a pull request that does exactly this. |
Still haven't had a chance to look at that pull request (will take a look this weekend). -- Doesn't the current BlockDome class call the original class (for things like material and renderer) and return them properly? It seems like this is a lot of extra work that we're doing manually where we should just be letting the original class handle it itself. Also, I was thinking about the race-condition solution you mentioned before (i.e. set the block to the correct one, before calling the original method, then setting it back to the BlockDome in a finally/etc. before returning). What if -- instead of that -- we just passed in a different IWorld object -- one that just wrapped the actual IWorld object for all interface calls, except for getBlock (or whatever it's named) -- where if the object was a BlockDome -- we pass back the BlockDome's imitated object instead -- then when we call those methods, and they check the type of the current block (via our passed in IWorld object) or try to perform a cast, etc. -- they behave correctly. It still wouldn't work for server / client (since you need extra blocks), but it's a thought. |
(Re-opening this -- thought it was open. -- since I haven't done the pull request yet.) |
Happens every time I search for an anvil in the creative menu with 0.85.
The text was updated successfully, but these errors were encountered: