15041 Commits

Author SHA1 Message Date
Po Lu
607fc28abf Port Fence Gates to mcl_redstone
* mods/ITEMS/mcl_fences/init.lua (tpl_fence_gates)
(tpl_fence_gates_open): Port mesecons effector definitions to
mcl_redstone.
2024-12-03 02:52:34 +00:00
Jürgen Rühle
efbf928807 Small fixup for lectern without book
Fix typo to restore redstone connectivity and use mcl_redstone.swap_node to
force a comparator update when placing a book.
2024-12-02 13:03:00 +00:00
Elias Åström
803bb6cd4f Make wires connect to pistons 2024-12-02 02:03:01 +00:00
Po Lu
a56f365621 Improve end gateway teleportation
* mods/ITEMS/mcl_portals/portal_gateway.lua (gateway_teleport):
Export `teleport'.

* mods/ITEMS/mcl_throwing/register.lua
(check_gateway_teleportation): New function.
(pearl_on_step): Teleport thrower through any gateway traversed
by this pearl.
2024-12-01 17:10:46 +00:00
Elias Åström
a101525a37 Update credits 2024-11-30 23:50:51 +01:00
Elias Åström
fb88881d1c Update version number 2024-11-30 23:48:30 +01:00
Elias Åström
2c32904807 Run update-tr.sh 2024-11-30 23:07:56 +01:00
The_Pamps
46cff037e7 Fix slow falling velocity.
-Changed line 427 from object:add_velocity(vector.new(0,-3-vel.y,0)) to object:add_velocity(vector.new(0,-0.05*vel.y,0)), this resolves the issue of the slow falling effect flinging the player upwards if they were falling too fast when the effect activates.
2024-11-29 22:58:16 +00:00
Jürgen Rühle
33287ce95a Implement lectern support in comparator 2024-11-29 22:49:56 +00:00
Jürgen Rühle
0712959c31 Use mcl_redstone.register_action instead of overriding set/swap_node 2024-11-29 22:49:56 +00:00
Jürgen Rühle
93542d2258 Introduce mcl_redstone.register_action
This provides a callback mechanism when specific nodes are updated by the
redstone update logic, independent from actual redstone power level
changes.
2024-11-29 22:49:56 +00:00
Jürgen Rühle
2f0fe146eb Fix copper bulb comparator_signal 2024-11-29 22:49:56 +00:00
Jürgen Rühle
922b90d1a3 Support comparator_signal = 0
Comparators should read unlit copper bulbs as power level 0 even if
powered.
2024-11-29 22:49:56 +00:00
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