Lychee (Fabric)

Lychee (Fabric)

211k Downloads

Contextual condition checks are run in the wrong position depending on the block face

TheInfine opened this issue ยท 2 comments

commented

Mod loader

Forge

Minecraft version

1.18.1

Mod version

1.6.1

Modloader version

39.0.85

Modpack info

No response

If bug:

  • Can you reproduce this issue with relevant mods only?

If bug: The latest.log file

No response

Issue description

I'm trying to make a block interaction recipe possible only if there is no log below the targeted block. This is possible with a contextual condition, execute. There is one problem though. The command is not run exactly where to block is and this results in weird behaviour.

Below is a video demonstration and the recipe file that I'm using.

Demonstration (play it with sound enabled):

2022-02-26.16-49-51.mp4

Recipe file:

{
	"type": "lychee:block_interacting",
	"item_in": {
		"item": "minecraft:iron_axe"
	},
	"block_in": "minecraft:stripped_oak_log",
	"post": [
		{
			"type": "prevent_default"
		},
		{
			"type": "execute",
			"command": "playsound minecraft:entity.experience_orb.pickup block @a",
			"contextual": {
				"type": "execute",
				"command": "execute unless block ~ ~-1 ~ minecraft:oak_log"
			}
		}
	]
}
commented

I will fix this tomorrow. Have you tried using location check? That one will run faster

https://lycheetweaker.readthedocs.io/en/latest/contextual-condition/#location-check-location

commented

I didn't realise I could use location check. I should definitely be using that instead. Thanks for telling me.