package net.rustnotmc.client; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.stats.RecipeBook; import net.minecraft.stats.StatisticsManager; import net.minecraft.world.World; /** * Our player. * * The vanilla player with two things changed: the crouch is a little faster * and the jump is a little higher. Everything else is the vanilla behaviour, * so the player still walks, swims, rides, fights and dies the way the game * always did. * * The class exists so that the numbers of our movement live in our code and * not in the patches of the vanilla tree: the patches only have to say "the * player is ours", and everything else is here. */ public class RsxPlayer extends EntityPlayerSP { public RsxPlayer(Minecraft minecraft, World world, NetHandlerPlayClient connection, StatisticsManager statistics, RecipeBook recipeBook) { super(minecraft, world, connection, statistics, recipeBook); this.movementInput = new RsxMovementInput(minecraft.gameSettings); } /** * How high the player jumps. * * The override lives here and not in EntityLivingBase, because the mobs * have to keep jumping the way they always did. */ @Override protected float getJumpUpwardsMotion() { return RsxPlayerTuning.jumpMotion(); } }