Open Parties and Claims

Open Parties and Claims

25M Downloads

Attach placement info to Create contraptions in some cases

thexaero opened this issue · 6 comments

commented

For example, when placing a minecart contraption.

commented

Hello. I am writing about this, the players complain a lot that the “thing” from Create that worked, for example, a drill outside the region in Wilderness, then the player puts it in his region and it all breaks and nothing falls out. So it needs to be fixed somehow.

commented

I noticed this issue in a modpack I play. The modpack has a lot of mining, so contraptions need to be moved a lot. When a contraption is moved anywhere inside a claim (even your own claim) it will drop the contraption's blocks but none of the items contained in the block entities. https://github.com/Creators-of-Create/Create/blob/mc1.18/dev/src/main/java/com/simibubi/create/content/contraptions/Contraption.java#L1095C52-L1095C52 line 1066 may have some conflicts with how OPAC handles contraptions in claims, and because of this all items in inventories on the contraption are voided.

commented

@CursedAtom
Inventories being voided is 100% on Create's end and happens when anything else breaks a chest on contraption disassembly, e.g. putting it into an unbreakable block like bedrock.

commented

As i understand it, create first places the block and after it changes it's nbt data. Since the creation of the block is denied ( and dropped in it's default state by opac) it nevers gets it's nbt data and it's lost. For items there could be a work around, and drop the items in the nbt data, but there is also liquids and i have no idea what could be the behavior in that case.

Is there a way for the mods to be aware of each other? for example for opac to expose a function to check the permissions of a block so that create could make a check for each chunk that the contraption will use and be able to rise the adequate exception.

or maybe add a mixin to interrupt the process before, maybe around

https://github.com/Creators-of-Create/Create/blob/e5e0477b498d26974ce6f76a0966451c6029a2e7/src/main/java/com/simibubi/create/content/contraptions/AbstractContraptionEntity.java#L647C9-L647C9

i'm going to reference this issue in a create issue also

commented

@Allmoz NBT data has nothing to do with this. Create very much can drop chest items but they likely forgot to code that. Create is the mod that drops the blocks when it can't place them, not OPAC. As my previous reply clearly states, you can reproduce this without OPAC, by disassembling into bedrock.
And the only reason claims are protected is because I'm already injecting checks into Create, so your suggested solution is the problem.
If you want this to be fixed on Create's end, then you're not asking for the right things. They're not going to add "compatibility" with this mod nor do they have to for this issue.

commented

Indeed you have added a lot of checks, and the insertion in forge looks way more painful that in fabric., looks cool though. I didn't know the bedrock issue, that means that every block to be placed needs to be checked before, not just chunks.

If there where a function in the create code that was checking if a block can be placed (for vanilla cases like bedrock), then a verification injection would make more sense? or it would be better for to check for permissions in other way?