Gamemode4Dev / GM4_Datapacks

Gamemode 4 is a collection of modular Minecraft Datapacks that change or expand on the vanilla experience whilst keeping the vanilla feel. Our modules are developed with a focus on usability and efficiency.
https://gm4.co
GNU General Public License v3.0
113 stars 56 forks source link

Lumos Shamir placing torches inside water* #763

Closed jackythejack13 closed 2 years ago

jackythejack13 commented 2 years ago

Describe the bug Places torches while holding a Pickaxe with Lumos. Replacing torches inside water in the dark

To Reproduce Steps to reproduce the behavior:

  1. Cover yourself in water
  2. Hold a pickaxe with Lumos with torches in your inventory
  3. Torches keep getting replaced and broken by water

Expected behavior Torches should not be placed in water at a darkness level

Fix Add a if the player is in water, not to place torch

Environment

Dennis-0 commented 2 years ago

This is caused by the block tag #gm4:replaceable, which contains all blocks the player can directly replace with blocks (like torches). It's intended to copy the same behaviour as a player trying to place the torch, so technically it's working as intended, but I can see this should be prevented.

Note that Crossbow Cartridges should use the same conditions for placing a torch. It currently places the torch in water as well, but it's not too big of a problem because it's not repeatedly like with lumos.