Mixin icon indicating copy to clipboard operation
Mixin copied to clipboard

A Forge Mixin Issues

Open GoJean opened this issue 1 year ago • 1 comments

I develop a Forge mod for minecraft.Whenever I use the offical MDK or use the IDEA Plugin to generate, the refmap file is always in the ${project_root}/tmp/compileJava.More than that,its generation is incomplete.A code like

package name.gojean.miniworldforge2.mixin;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.CraftingTableBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(CraftingTableBlock.class)
public abstract class CraftingTableBlockMixin extends Block {

    public CraftingTableBlockMixin(Properties properties) {
        super(properties);
    }

    @Override
    protected @NotNull VoxelShape getOcclusionShape(@NotNull BlockState blockState) {
        return Shapes.empty();
    }
}

It only generate { "mappings": {}, "data": {} }!

GoJean avatar Sep 21 '25 16:09 GoJean

That mixin contains no remappable strings, and therefore the refmap is expectedly empty.

LlamaLad7 avatar Sep 21 '25 16:09 LlamaLad7