Jürgen Rühle
697618d303
WIP: support nodes with comparator_signal group
...
This is pretty heavy handed with overloading set_node and swap_node which
is probably not acceptable. But everything else would require a sizable
refactoring of the measured node and its interaction with other items.
2024-11-29 22:49:56 +00:00
Jürgen Rühle
c99496f22c
Add brewing stand nodes to comparator measure tab in after_mods_loaded
...
Also document nodes being added to measure_tab using after_mods_loaded.
2024-11-29 22:49:56 +00:00
Jürgen Rühle
6739ac904a
Document comparator TODOs
...
List all blocks that need to be supported.
2024-11-29 22:49:56 +00:00
Jürgen Rühle
5e4911c89f
Implement brewing stand inventory measurement in comparator
2024-11-29 22:49:56 +00:00
Jürgen Rühle
be4ae94c10
Implement furnace inventory measurement in comparator
2024-11-29 22:49:56 +00:00
Jürgen Rühle
4ac8516ff5
Implement barrel inventory measurement in comparator
2024-11-29 22:49:56 +00:00
Jürgen Rühle
852782bc93
Implement double chest inventory measurement in comparator
2024-11-29 22:49:56 +00:00
Jürgen Rühle
5a3529c3e5
Implement shulker box inventory measurement in comparator
...
Trigger comparator update on inventory changes. Shulker boxes additionally
need to trigger comparator update after being placed, because inventory may
not be empty. While at it, clean up shulker inventory restoration a bit.
2024-11-29 22:49:56 +00:00
Jürgen Rühle
7693868f57
Implement dispenser/dropper inventory measurement in comparator
2024-11-29 22:49:56 +00:00
Jürgen Rühle
0f47d6fd51
Update comparator when a measurable block is dug
2024-11-29 22:49:56 +00:00
Jürgen Rühle
f3de3eb1ab
Clamp comparator block measurement to range [0,15]
2024-11-29 22:49:56 +00:00
Jürgen Rühle
71ed901272
Refactor block measuring
...
This prepares support for other measuring types besides inventory fullness.
Introduce table that maps node names to measuring function.
Implement support for small (trapped) chests and hoppers.
2024-11-29 22:49:56 +00:00
Elias Åström
934ccd35ea
Make pistons be dug faster using pickaxe
2024-11-29 22:43:06 +00:00
Jürgen Rühle
0cddf2281a
Preserve copper bulb preservation state when switching and digging
2024-11-29 22:39:57 +00:00
Jürgen Rühle
d880284a42
Fix copper bulb connection
...
Also unify update functions in on/off bulb variants.
2024-11-29 22:39:57 +00:00
Jürgen Rühle
e36958b8c0
Readd drop specification on lit copper bulb
2024-11-29 22:39:57 +00:00
cora
68d4a7bc31
Document mcl_armor on_place functionality
2024-11-29 22:39:36 +00:00
cora
a25a5e940e
Move leather armor washing to mcl_armor
2024-11-29 22:39:36 +00:00
cora
d9e73574d3
Allow custom on_place function for armor sets
2024-11-29 22:39:36 +00:00
cora
190abc6b58
Reset lectern book item node meta when taking book out
2024-11-29 21:19:51 +00:00
cora
dfc5bac7ff
Reset lectern infotext when taking book out
2024-11-29 21:19:51 +00:00
cora
04c82e1659
Don't set lectern infotext for writeable books
2024-11-29 21:19:51 +00:00
cora
6b021caa26
Stonecutter yields 4 copper grates
2024-11-29 15:13:53 +00:00
goblin_mode
d1a8b217a4
fix _on_unequip callback not being called
2024-11-28 20:48:51 +01:00
cora
2d54fba6ae
Make active furnaces unmovable by piston
2024-11-27 19:52:42 +00:00
nooneatall
e3c3848cd6
Make piston pusher minable and drop correct piston type.
2024-11-27 11:12:46 +02:00
goblin_mode
b06b4dbaa2
make craftinguide logging be a warning instead
2024-11-26 15:45:20 +00:00
goblin_mode
faa3ae67b0
handle edgecase where ingredient is an item string
2024-11-26 15:45:20 +00:00
goblin_mode
d34ddce8a3
Revert custom crafting guide API removal
2024-11-26 15:45:20 +00:00
cora
4da948c9b4
Vaults: spawn loot items a little higher to prevent them getting stuck
...
in the vault
2024-11-24 17:14:26 +00:00
Jürgen Rühle
411bd48f6b
Change auto activation to use node timer
...
Inactive vaults have a 1 second node timer started by on_construct, lbm,
or vault deactivation. Activating requires a player within distance 3
while deactivating only happens if there is no player within distance 5.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
7bca6fcce9
Only auto activate if player can open vault
...
Otherwise it wouldn't be useful to deactivate the vault after ejecting the
loot. This resolves the activate/deactivate cycle between auto activation
and active vault deactivation when no eligible player is near.
Also guard can_open and try_open against non player clickers.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
5cb18fed5e
Slightly reduce visual_size of vault item entity
...
To prevent clipping into the node textures.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
ebc65e1516
Make mcl_enchanting support PcgRandom
...
mcl_enchanting.random(pr) assumed PseudoRandom's range of integer results.
TODO: discuss better solutions
2024-11-24 17:14:26 +00:00
Jürgen Rühle
f682a30281
Support generating no loot in mcl_loot.get_loot
...
This makes it easier to adapt MC loot tables that have a failure chance.
It was actually possible before, but this changes gives a way to suppress
the error message that appeared.
Also update the documentation.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
ea3aa4946d
Verify vault and ominous vault loot table
...
Add failure chance to unique loot table, adapt potion levels and
enchantments to wiki values.
To compensate for the missing trident, slightly reduced the failure chance
for the unique loot. The missing trident enchantments now give a high
chance to create a mending book, which seems appropriate.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
351ac5c351
Auto activate vaults when a player is near
...
Don't require any other condition for activation.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
3e73e23605
Only activate inactive vaults
...
Provide node as bonus result from get_vault_def
2024-11-24 17:14:26 +00:00
Jürgen Rühle
2b613bba20
Fix vault loot getting lost on server shutdown
...
Store loot list in private node meta data, handle ejection in the item entity,
and recreate the entity for active and ejecting vaults in a LBM.
This also fixes active vaults having no item display after server restart and
ejecting vaults having display of the ejected items.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
eadef8efbf
Add comment to ringbuffer:serialize
2024-11-24 17:14:26 +00:00
Jürgen Rühle
c79b249c8c
Allow inserting false into ringbuffer
...
This was broken in the previous commit. Also improve assert message.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
1b59a19050
Don't allow to insert nil values into ringbuffer
...
Otherwise index_of breaks. Also trim leading nil values when serializing.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
2b8c43428a
Fix vault deactivating while ejecting
...
Vault item entity on_step must check for presence of active vault node
before swapping to inactive vault.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
d20857d062
Prevent nil values in serialized ringbuffer data
2024-11-24 17:14:26 +00:00
Jürgen Rühle
20c56e4263
Make ringbuffer into an actual ring buffer
...
Note that serialization/deserialization is always processing all elements.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
c722ecb41b
Make vault looter ringbuffer size configurable
...
Note that currently the smallest supported size is 1, so in a singleplayer
world each vault can be looted at most once.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
40bc1513dc
Provide default values in ringbuffer_class
2024-11-24 17:14:26 +00:00
Jürgen Rühle
01ba6bf061
Optionally register trial key in register_vault
...
Add (optipng-ed) ominous trial key image from
https://github.com/NovaWostra/Pixel-Perfection-Chorus-Eddit.git
2024-11-24 17:14:26 +00:00
Jürgen Rühle
4e30ee9657
Initialize all ringbuffer keys explicitly
...
Use false instead of nil.
2024-11-24 17:14:26 +00:00
Jürgen Rühle
70a0070184
Refactor vaults api to use ringbuffer node meta handling
2024-11-24 17:14:26 +00:00