MixinEntity.java 文件中存在错误。(MixinEntity,.java,.java中有个错误)
-
软件包 net.ccbluex.liquidbounce.injection.forge.mixins.entity;
导入 net.ccbluex.liquidbounce.injection.implementations.IMixinEntity;
导入 net.ccbluex.liquidbounce.event.EventManager;
导入 net.ccbluex.liquidbounce.event.StrafeEvent;
导入 net.ccbluex.liquidbounce.features.module.modules.combat.HitBox;
导入 net.ccbluex.liquidbounce.features.module.modules.exploit.NoPitchLimit;
导入 net.ccbluex.liquidbounce.features.module.modules.movement.NoFluid;
导入 net.minecraft.block.Block;
导入 net.minecraft.block.material.Material;
导入 net.minecraft.crash.CrashReportCategory;
导入 net.minecraft.entity.Entity;
导入 net.minecraft.util.AxisAlignedBB;
导入 net.minecraft.util.BlockPos;
导入 net.minecraft.util.Vec3;
进口 net.minecraft.world.World;
导入 net.minecraftforge.fml.relauncher.Side;
导入 net.minecraftforge.fml.relauncher.SideOnly;
导入 org.spongepowered.asm.mixin.Mixin;
导入 org.spongepowered.asm.mixin.Shadow;
进口 org.spongepowered.asm.mixin.injection.At;
导入 org.spongepowered.asm.mixin.injection.Inject;
导入 org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
导入 org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;导入 java.util.Random;
导入 java.util.UUID;导入静态 net.ccbluex.liquidbounce.utils.MinecraftInstance.mc;
@Mixin(Entity.class) @SideOnly(Side.CLIENT)
公共抽象类 MixinEntity 实现 IMixinEntity {
@Shadow
public double posX;@Shadow
public double posY;@Shadow
public double posZ;private double trueX;
public double getTrueX() {
return trueX;
}public void setTrueX(double x) {
trueX = x;
}private double trueY;
public double getTrueY() {
return trueY;
}public void setTrueY(double y) {
trueY = y;
}private double trueZ;
public double getTrueZ() {
return trueZ;
}public void setTrueZ(double z) {
trueZ = z;
}private boolean truePos;
public boolean getTruePos() {
return truePos;
}public void setTruePos(boolean set) {
truePos = set;
}@Shadow
public abstract boolean isSprinting();@Shadow
public float rotationPitch;@Shadow
public float rotationYaw;@Shadow
public abstract AxisAlignedBB getEntityBoundingBox();@Shadow
public Entity ridingEntity;@Shadow
public double motionX;@Shadow
public double motionY;@Shadow
public double motionZ;@Shadow
public boolean onGround;@Shadow
public boolean isAirBorne;@Shadow
public boolean noClip;@Shadow
public World worldObj;@Shadow
public void moveEntity(double x, double y, double z) {
}@Shadow
public boolean isInWeb;@Shadow
public float stepHeight;@Shadow
public boolean isCollidedHorizontally;@Shadow
public boolean isCollidedVertically;@Shadow
public boolean isCollided;@Shadow
public float distanceWalkedModified;@Shadow
public float distanceWalkedOnStepModified;@Shadow
public abstract boolean isInWater();@Shadow
protected Random rand;@Shadow
public int fireResistance;@Shadow
protected boolean inPortal;@Shadow
public int timeUntilPortal;@Shadow
public float width;@Shadow
public abstract boolean isRiding();@Shadow
public abstract void setFire(int seconds);@Shadow
protected abstract void dealFireDamage(int amount);@Shadow
public abstract boolean isWet();@Shadow
public abstract void addEntityCrashInfo(CrashReportCategory category);@Shadow
protected abstract void doBlockCollisions();@Shadow
protected abstract void playStepSound(BlockPos pos, Block blockIn);@Shadow
public abstract void setEntityBoundingBox(AxisAlignedBB bb);@Shadow
private int nextStepDistance;@Shadow
private int fire;@Shadow
public float prevRotationPitch;@Shadow
public float prevRotationYaw;@Shadow
protected abstract Vec3 getVectorForRotation(float pitch, float yaw);@Shadow
public abstract UUID getUniqueID();@Shadow
public abstract boolean isSneaking();@Shadow
public abstract boolean isInsideOfMaterial(Material materialIn);public int getNextStepDistance() {
return nextStepDistance;
}public void setNextStepDistance(int nextStepDistance) {
this.nextStepDistance = nextStepDistance;
}public int getFire() {
return fire;
}@Inject(method = "getCollisionBorderSize", at = @At("HEAD"), cancellable = true)
private void getCollisionBorderSize(final CallbackInfoReturnable<Float> callbackInfoReturnable) {
final HitBox hitBox = HitBox.INSTANCE;if (hitBox.handleEvents()) callbackInfoReturnable.setReturnValue(0.1F + hitBox.determineSize((Entity) (Object) this));
}
@Inject(method = "setAngles", at = @At("HEAD"), cancellable = true)
private void setAngles(final float yaw, final float pitch, final CallbackInfo callbackInfo) {
if (NoPitchLimit.INSTANCE.handleEvents()) {
callbackInfo.cancel();prevRotationYaw = rotationYaw; prevRotationPitch = rotationPitch; rotationYaw += yaw * 0.15f; rotationPitch -= pitch * 0.15f; }
}
@Inject(method = "moveFlying", at = @At("HEAD"), cancellable = true)
private void handleRotations(float strafe, float forward, float friction, final CallbackInfo callbackInfo) {
//noinspection ConstantConditions
if ((Object) this != mc.thePlayer) return;final StrafeEvent strafeEvent = new StrafeEvent(strafe, forward, friction, , , , , ); EventManager.INSTANCE.callEvent(strafeEvent); if (strafeEvent.isCancelled()) callbackInfo.cancel();
}
@Inject(method = "isInWater", at = @At("HEAD"), cancellable = true)
private void isInWater(final CallbackInfoReturnable<Boolean> cir) {
if (NoFluid.INSTANCE.handleEvents() && NoFluid.INSTANCE.getWater()) {
cir.setReturnValue(false);
}
}@Inject(method = "isInLava", at = @At("HEAD"), cancellable = true)
private void isInLava(final CallbackInfoReturnable<Boolean> cir) {
if (NoFluid.INSTANCE.handleEvents() && NoFluid.INSTANCE.getLava()) {
cir.setReturnValue(false);
}
}此行上存在错误。(中这一行出错)
final StrafeEvent strafeEvent = new StrafeEvent(strafe, forward, friction, , , , , , );
在初始构建期间没有问题。但是,当我稍后添加新模式时,IDEA 报告了一个错误,我无法找出原因。重建也没有解决问题。
(刚构建时没有问题.往后我添加新模式时IDEA就报错我无法找到其中的原因.重新构建还是不行)C:\Users\XHG_Gmy\Desktop\Ghostclitent\LiquidLite\build\sources\main\java\net\ccbluex\liquidbounce\injection\forge\mixins\entity\MixinEntity.java:254: :
最终 StrafeEvent strafeEvent = new StrafeEvent(strafe, forward, friction, , , , , );