
Previous issue regarding the
katubug opened this issue ยท 3 comments
Hi again! I'm still having trouble getting lootjs's "hasAnyStage" function to play nicely with this mod (I initially reported this here: AlmostReliable/lootjs#19). I haven't had the chance to really test it again until just now, so I'm sorry for the delay.
When I fish without the mod installed, the kubejs server log lists this:
[09:28:06] [INFO]
[ Loot information ]
LootTable : "minecraft:gameplay/fishing"
LootType : FISHING
Loot {
Before {
1 cod
}
After {
1 cod
}
}
Position : (-4.94, 62.47, -18.23)
Entity : Type="minecraft:fishing_bobber", Id=2319, Dim="minecraft:overworld", x=-4.94, y=62.47, z=-18.23
Killer Entity : Type="minecraft:player", Id=418, Dim="minecraft:overworld", x=-4.78, y=63.00, z=-12.30
Player : Type="minecraft:player", Id=418, Dim="minecraft:overworld", x=-4.78, y=63.00, z=-12.30
Player Pos : (-4.78, 63.00, -12.30)
Distance : 5.96
MainHand : 1 fishing_rod {Damage:0}
[ Modifications ]
๐ง "aberrant_fish" {
โ๏ธ PlayerParamPredicate
๐ RemoveLootAction
๐ AddLootAction
}
Whereas with your mod installed, it says:
[09:32:31] [INFO]
[ Loot information ]
LootTable : "tide:gameplay/fishing/climates/freshwater_normal"
LootType : FISHING
Loot {
Before {
1 bass
}
After {
1 bass
}
}
Position : (228.97, 62.87, -1750.45)
Entity : Type="tide:fishing_bobber", Id=976, Dim="minecraft:overworld", x=228.97, y=62.87, z=-1750.45
[ Modifications ]
๐ง "aberrant_fish" {
โ PlayerParamPredicate
}
In the non-Tide instance, it is able to read the player predicates, but in the Tide instance, it is not. I have no idea how to fix this, but maybe the lootjs people could help?
Hey,
hasAnyStage
requires a player. In LootJS I determine this based on the type of the loot table. For fishing loot I use the killer_entity
and the fun part is that in vanilla the killer_entity
is not set but Forge
and NeoForge
do patch this behavior and they add the player as the killer_entity
for fishing loot tables. So in a forge based loader you can write predicates with the killer entity as target.
From what I see Tide doesn't add the killer_entity
. It's just really easy to miss, especially with multi-loaders.
So it's up for Tide to decide if they wanna add this too.
Greetz
I didn't know that Forge and Neoforge added extra loot parameters. In the past, I had the fishing loot tables include the player as the main entity instead of the fishing hook, but this broke other features so I had to revert it. I'll definitely allow the killer_entity to be the player in the next update.