【发布时间】:2021-09-30 02:36:20
【问题描述】:
以下sn-p代码是我从网上找到的教程中使用的:
package com.jktech.minend.common.events;
import net.minecraft.entity.ItemEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(ItemEntity.class)
public abstract class itemevents extends ItemEntity {
public itemevents(World world, double x, double y, double z, ItemStack stack, doublevelocityX, double velocityY, double velocityZ) {
super(world, x, y, z, stack, velocityX, velocityY, velocityZ);
}
}
虽然代码可以编译,但它在运行时仍然显示错误,但游戏并没有崩溃。但是,我的函数没有执行,也没有任何反应(好像一开始就没有应用它们)。
[14:16:45] [main/ERROR] (mixin) minend.mixins.json:itemevents: Super class 'net.minecraft.entity.ItemEntity' of itemevents was not found in the hierarchy of target class 'net/minecraft/entity/ItemEntity'
org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: Super class 'net.minecraft.entity.ItemEntity' of itemevents was not found in the hierarchy of target class 'net/minecraft/entity/ItemEntity'
【问题讨论】:
标签: java minecraft mixins minecraft-fabric