Create Fabric

Create Fabric

7M Downloads

[Crash] Open REI recipe screen

Phoupraw opened this issue · 3 comments

commented

Describe the Bug

Game crashes when opening REI recipe browser screen of create's recipes.

Reproduction Steps

  1. Enter any world.
  2. Check a recipe of create by REI.
  3. Game crashes.

Expected Result

Not to crash.

Screenshots and Videos

No response

Crash Report or Log

latest.log

Operating System

Windows 10

Mod Version

0.5.0g

Minecraft Version

1.19.2

Other Mods

74 mods:

  • create 0.5.0.g-851+1.19.2
  • createsdelight 0.1.0-pre1
  • dripstone_fluid_lib 2.0.1
  • fabric-api 0.67.0+1.19.2
  • fabric-api-base 0.4.12+93d8cb8290
  • fabric-api-lookup-api-v1 1.6.11+93d8cb8290
  • fabric-biome-api-v1 9.0.19+3dd584b490
  • fabric-block-api-v1 1.0.0+12bfe4ea90
  • fabric-blockrenderlayer-v1 1.1.21+c6af733c90
  • fabric-client-tags-api-v1 1.0.2+b35fea8390
  • fabric-command-api-v2 2.1.8+93d8cb8290
  • fabric-content-registries-v0 3.4.2+6064db2a90
  • fabric-convention-tags-v1 1.1.2+93d8cb8290
  • fabric-crash-report-info-v1 0.2.6+aeb40ebe90
  • fabric-data-generation-api-v1 5.3.0+ad31814d90
  • fabric-dimensions-v1 2.1.32+0dd10df690
  • fabric-entity-events-v1 1.5.1+9244241690
  • fabric-events-interaction-v0 0.4.29+c6af733c90
  • fabric-game-rule-api-v1 1.0.22+c6af733c90
  • fabric-gametest-api-v1 1.1.3+704e47e990
  • fabric-item-api-v1 1.6.0+fa140d5990
  • fabric-item-groups-v0 0.3.34+9244241690
  • fabric-key-binding-api-v1 1.0.22+aaaf9d3390
  • fabric-lifecycle-events-v1 2.2.1+9244241690
  • fabric-loot-api-v2 1.1.8+83a8659290
  • fabric-message-api-v1 5.0.4+93d8cb8290
  • fabric-mining-level-api-v1 2.1.19+33fbc73890
  • fabric-models-v0 0.3.18+c6af733c90
  • fabric-networking-api-v1 1.2.6+9244241690
  • fabric-object-builder-api-v1 4.1.1+06e0e25190
  • fabric-particles-v1 1.0.11+79adfe0a90
  • fabric-registry-sync-v0 0.9.27+9244241690
  • fabric-renderer-api-v1 1.0.13+12bfe4ea90
  • fabric-renderer-indigo 0.6.15+aeb40ebe90
  • fabric-rendering-data-attachment-v1 0.3.16+12bfe4ea90
  • fabric-rendering-fluids-v1 3.0.8+c6af733c90
  • fabric-rendering-v1 1.11.0+73145abb90
  • fabric-resource-conditions-api-v1 2.1.0+aae9039d90
  • fabric-resource-loader-v0 0.8.0+f9594cb690
  • fabric-screen-api-v1 1.0.28+28270f5890
  • fabric-screen-handler-api-v1 1.3.2+1cc24b1b90
  • fabric-sound-api-v1 1.0.0+c4f28df590
  • fabric-textures-v0 1.0.21+aeb40ebe90
  • fabric-transfer-api-v1 2.1.2+cd10d4fc90
  • fabric-transitive-access-wideners-v1 1.3.1+42d99c3290
  • fabricloader 0.14.13
  • farmersdelight 1.19-1.3.3
  • flywheel 0.6.8-2
  • forge_tags 3.0
  • forgeconfigapiport 4.2.10
  • java 17
  • lazydfu 0.1.3
  • milk 1.0.51
  • minecraft 1.19.2
  • mm 2.3
  • porting_lib 2.1.724+1.19.2
  • porting_lib_accessors 2.1.724+1.19.2
  • porting_lib_attributes 2.1.724+1.19.2
  • porting_lib_base 2.1.724+1.19.2
  • porting_lib_common 2.1.724+1.19.2
  • porting_lib_constants 2.1.724+1.19.2
  • porting_lib_entity 2.1.724+1.19.2
  • porting_lib_extensions 2.1.724+1.19.2
  • porting_lib_fake_players 2.1.724+1.19.2
  • porting_lib_lazy_registration 2.1.724+1.19.2
  • porting_lib_model_generators 2.1.724+1.19.2
  • porting_lib_model_loader 2.1.724+1.19.2
  • porting_lib_models 2.1.724+1.19.2
  • porting_lib_networking 2.1.724+1.19.2
  • porting_lib_obj_loader 2.1.724+1.19.2
  • porting_lib_transfer 2.1.724+1.19.2
  • reach-entity-attributes 2.3.0
  • registrate-fabric 1.1.47-MC1.19.2
  • serialization_hooks 0.3.26

Additional Context

It's in development environment.

commented

I use the following mixins and fixed it.

import net.minecraft.client.gui.Drawable;
import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.ParentElement;
import net.minecraft.client.util.math.MatrixStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

import java.util.List;
/**
 * 修复<a href="https://github.com/Phoupraw/CreateSDelightFabricJava/issues/1">Can't check the recipe of chocolate pie in jei alone #1</a>、<a href="https://github.com/Fabricators-of-Create/Create/issues/788">[Crash] Open REI recipe screen #788</a>
 */
@Mixin(targets = "com.simibubi.create.compat.rei.category.WidgetUtil$1")
public abstract class MixinWidgetUtil_1 implements ParentElement ,Drawable{
    @Shadow(remap = false)
    public abstract void method_25394(MatrixStack matrices, int mouseX, int mouseY, float delta);

    @Override
    public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
        method_25394(matrices, mouseX, mouseY, delta);
    }

    @Shadow(remap = false)
    public abstract List<? extends Element> method_25396();

    @Override
    public List<? extends Element> children() {
        return method_25396();
    }
}
import com.simibubi.create.compat.rei.widgets.AnimatedKineticsWidget;
import net.minecraft.client.gui.Drawable;
import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.ParentElement;
import net.minecraft.client.util.math.MatrixStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

import java.util.List;
/**
 * @see MixinWidgetUtil_1
 */
@Mixin(AnimatedKineticsWidget.class)
public abstract class MixinAnimatedKineticsWidget implements ParentElement  , Drawable {
    @Shadow(remap = false)
    public abstract void method_25394(MatrixStack matrices, int mouseX, int mouseY, float delta);

    @Override
    public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
        method_25394(matrices, mouseX, mouseY, delta);
    }
    @Shadow(remap = false)
    public abstract List<? extends Element> method_25396();

    @Override
    public List<? extends Element> children() {
        return method_25396();
    }
}
commented

Game suddenly stopped crashing. The bytecode suddenly came back to normal, while the mixins above can't pass compile. I don't konw what happened.

commented

freak accident in remapping? I don't know, but I doubt it's our fault.