amadornes / MCMultiPart

A universal multipart API for Modern Minecraft
Other
67 stars 22 forks source link

New API Questions #115

Closed SonarSonic closed 6 years ago

SonarSonic commented 6 years ago

Hi There, I'm the dev of https://minecraft.curseforge.com/projects/practical-logistics-2 which relies heavily on MCMultipart (thanks very much for all your work btw).

I'm currently porting to 1.12.2 and I'm planning to depend entirely on MCMultipart (as I did on 1.10.2) and not have it as a soft dependency. However, having real trouble with getting multiparts to actually form, I have a block a which implements IMultipart and a tile which implement IMultipartTile and has the capability also, using ItemBlockMultipart to place it. They're bounding boxes do not cross, but they simply won't form a multipart container, are their additional methods I need to override?

I tried canPlacePartAt and canPlacePartOnSide, but if both of these return true the block is overwritten rather than combined, despite it being in a different PartSlot. Any pointers in the right direction will be hugely appreciated! Thanks!

2xsaiko commented 6 years ago

Try debugging it, I guess? (Start at ItemBlockMultipart#placePartAt) Without your code there isn't anything to go off of. The parts overriding themselves does sound like they have the same IPartSlot, though

SonarSonic commented 6 years ago

Thank you that was exactly what I needed, I hadn't realised the getSlotForPlacement didn't pass the parts IBlockState from getStateForPlacement.

2xsaiko commented 6 years ago

No problem! :)