P3pp3rF1y / Reliquary

The source code of Reliquary! That mod, with the magical swag, and a weapon, and stuff.
Other
43 stars 28 forks source link

[1.18.2] Game crashed when apothecary cauldron is placed near other block entities with Rubidium installed #578

Closed yanang007 closed 2 years ago

yanang007 commented 2 years ago

Game version: 1.18.2 Mod version: Reliquary 1.18.2-2.0.8.1139, Rubidium 0.5.2a

Step to reproduce:

  1. Install both Reliquary and Rubidium.
  2. Get into the game and place a cauldron and a mortar(any other block with block entity also works) near each other.
  3. Game crashes.

Crash report: https://paste.ubuntu.com/p/z4ZJp9ZnTH/

Possible cause is that rubidium's color blender LinearColorBlender.java will call this color sampler on registered block and its neighbouring blocks. A possible workaround may be:

if (world.getBlockEntity(pos) instanceof ApothecaryCauldronBlockEntity cauldron) {
  if (cauldron.getLiquidLevel() > 0) {
    return cauldron.getColorMultiplier();
  }
}
P3pp3rF1y commented 2 years ago

I am sure you will have to complain to Rubidium about this. They somehow made it so that the incorrect block entity (mortar one) is passed to block color handler for cauldron. Nothing I can do about that. And I am not going to implement workarounds for something that should be working correctly on their side - there's a reason block color handler is being registered for a specific block and not in general for just about anything.

yanang007 commented 2 years ago

Thanks for the reply! I see the point. It sure is a problem on Rubidium side.