-
Notifications
You must be signed in to change notification settings - Fork 23
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
Multipart rotation and recoloring hooks #117
Comments
Interesting. I'll work on this after #116 is merged. |
There's a problem: I've got no idea how to implement both of them, since those methods don't provide the player as a parameter which is needed for raytracing, so I can get the part that I need to rotate/color. EDIT: Hmm, I could make a custom packet that gets sent when the client clicks on the multipart block for each of those actions, that could work |
Well, in Charset I solved it by writing a wrench which explicitly handled multiparts. Not forwarding rotateBlock might actually be wise, as doing this could sometimes change the IPartSlot which would probably require a far deeper refactor? Not sure. It's almost 1AM here. |
I don't think it would be that hard to change the IPartSlot. Now what I would need to test it is a mod where that is actually the case. Otherwise I guess I'll have to make a small mod myself that adds such blocks EDIT: Actually, I forgot that rotateBlock rotates the block without checking anything (for example collision), so you're right that it will require a lot of changes. I'll see what I can come up with EDIT: There is actually already a way to rotate parts, I think: TileMultipartContainer.java#438 |
It assumes the Y axis. |
Essentially, IMultipart wrappers for rotateBlock and recolorBlock. (The recolor one could use a built-in way to say "no color", that is remove any color it has; this feels missing in Forge's hook.)
The rotation part is, interestingly, a regression from MCMP1 which allowed for such functionality.
The text was updated successfully, but these errors were encountered: