Spelunkery

Spelunkery

80.4k Downloads

Incompatibility between Amendments cauldron behavior and Dimensional Tears cauldrons.

BasketCace opened this issue ยท 2 comments

commented

Describe the bug:
Attempting to fill a cauldron with Dimensional Tears / Portal Fluid with Amendments installed results in custom Portal Cauldron behavior being lost, as the cauldron becomes an amendments:liquid_cauldron with an incorrectly textured fluid inside it. The correct spelunkery:portal_cauldron block can still have layers added/removed properly, but must be placed either prior to installing Amendments or via /setblock

**Versions: **
Minecraft version: 1.20.1
Spelunkery version: 0.3.5
Moonlight Lib version: 2.11.3
Supplementaries version: 2.8.6
Amendments version: 1.1.10
NeoForge version: 47.1.89

Other mods:
Issue occurs with only the listed mods

Logs:

latest.log
debug.log

To Reproduce:

  1. Install both Spelunkery and Amendments
  2. Place a Cauldron
  3. Attempt to place either a Bucket or Bottle of Dimensional Tears in the Cauldron

Expected behavior:
The cauldron should become a spelunkery:portal_cauldron upon placing portal fluid inside

Additional info:
Initial instinct was that this was on Amendments end, so I reported it there. Was told that it is in fact not on their end.

Screenshots:
2024-03-12_21 09 53

commented

https://github.com/MehVahdJukaar/amendments/blob/a4e7e9832cf6abfba5f092f4446607d116b9420d/common/src/main/java/net/mehvahdjukaar/amendments/mixins/AbstractCauldronBlockMixin.java#L37-L39

block state use is called before the items useOn

for forge this

public InteractionResult useOn(@NotNull UseOnContext context) {

might have to move into

for (var event : EVENTS) {
var result = event.run(i, stack, pos, state, player, level, hand, hitResult);
if (result != InteractionResult.PASS) return result;
}

since the blocks use method will not be called if the event is cancelled

alternatively use Item#onItemUseFirst instead (forge only) as that is also called before the blocks use
probably the better way to do this just saw it's forge only, so yeah
(ServerPlayerGameMode#useItemOn will also do an early return if the interaction result is not PASS which would avoid calling the blocks use with an old block state)

commented

fixed for 0.3.10