Commit graph

6 commits

Author SHA1 Message Date
Mikita Wiśniewski
16dd8694a6 Refactor mcl_chests.register_chest AGAIN + cleanup
Now you can define custom groups for the chests, as shown in the trapped
chests example (now they show up under "Mechanisms" tab in creative!).

I'm a bit suspicious of the new return-wrapped functions, as in *they
might break under some circumstances I didn't observe*. It will require
some heavy testing to make sure nothing crashes in the future.

Also, `on_rightclick` for double chests is something I really want to
return-wrap as well, but failed to do so. 🤷
2024-07-31 02:27:26 +02:00
Jürgen Rühle
7a5ee4e6e2 Better detection of properly serialized data
Remove entity if initialization data is missing. Downgrade message in that case
to a warning.
2024-07-31 02:27:26 +02:00
Jürgen Rühle
d0d9600709 Fix invisible chests
Pass chest entity initialization data to on_activate as staticdata so
initialization is atomic, preventing premature deletion of chest entity
by concurrent server steps.
2024-07-31 02:27:26 +02:00
cora
709b73295c Fix meta:set_string being called with nil 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
1d77017ca9 Refactor mcl_chests.register_chest and clean-up 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
e771f0e3ff Split ITEMS/mcl_chests/init.lua (fixes #281)
Shulker boxes can now be rotated.

The TODO will now be transferred to PR.
2024-07-31 02:27:26 +02:00