tweaks to trusted server

This commit is contained in:
gnembon committed 2019-07-31 17:08:25 -03:00
1 parent 056e479b4f
commit 87daa0b4da
3 files changed
+3 -6

No files matched your search

@@ -2,6 +2,7 @@ package carpet.mixins;
import carpet.settings.CarpetSettings;
import net.minecraft.client.network.packet.EntityPositionS2CPacket;
import net.minecraft.client.network.packet.VehicleMoveS2CPacket;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.mob.MobEntity;
@@ -40,8 +41,8 @@ public abstract class PlayerEntity_horseFixMixin extends Entity
((ServerWorld) getEntityWorld()).method_14178().sendToNearbyPlayers(this, new EntityPositionS2CPacket(getVehicle()));
// not sure if player at this point is actually considered to be next to the exiting vehicle
((ServerPlayerEntity)(Object)this).networkHandler.sendPacket(new EntityPositionS2CPacket(getVehicle()));
((ServerPlayerEntity)(Object)this).networkHandler.sendPacket(new VehicleMoveS2CPacket(getVehicle()));
}
}
}
}
@@ -75,7 +75,4 @@ public abstract class ServerPlayNetworkHandler_antiCheatDisabledMixin
return false;
return serverPlayerEntity.onGround;
}
}
@@ -16,7 +16,6 @@ import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.spongepowered.asm.mixin.injection.Redirect;
//needs tests, WIP
@Mixin(ServerPlayerInteractionManager.class)
public class ServerPlayerInteractionManager_ghostBlocksMixin
{
@@ -34,7 +33,7 @@ public class ServerPlayerInteractionManager_ghostBlocksMixin
float progress = blockState.calcBlockBreakingDelta(playerEntity_1, blockView_1, blockPos_1);
if (CarpetSettings.miningGhostBlockFix &&
(playerActionC2SPacket$Action_1 == PlayerActionC2SPacket.Action.START_DESTROY_BLOCK) &&
!playerEntity_1.onGround &&
!playerEntity_1.onGround && !playerEntity_1.isClimbing() && !playerEntity_1.isFallFlying() &&
progress >= 0.2
)
return progress*5;