More review things
This commit is contained in:
parent
5e2f40a322
commit
94bf8d4bbd
@ -89,6 +89,14 @@ public enum Input {
|
||||
private final KeyBinding keyBinding;
|
||||
|
||||
Input(Function<GameSettings, KeyBinding> keyBindingMapper) {
|
||||
/*
|
||||
|
||||
Here, a Function is used because referring to a static field in this enum for the game instance,
|
||||
as it was before, wouldn't be possible in an Enum constructor unless the static field was in an
|
||||
interface that this class implemented. (Helper acted as this interface) I didn't feel like making
|
||||
an interface with a game instance field just to not have to do this.
|
||||
|
||||
*/
|
||||
this.keyBinding = keyBindingMapper.apply(Minecraft.getMinecraft().gameSettings);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ import java.util.Objects;
|
||||
|
||||
public class MovementParkour extends Movement {
|
||||
|
||||
private static final EnumFacing[] HORIZONTALS_BUT_ALSO_DOWN____SO_EVERY_DIRECTION_EXCEPT_UP = { EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.EAST, EnumFacing.WEST, EnumFacing.DOWN };
|
||||
private static final EnumFacing[] HORIZONTALS_BUT_ALSO_DOWN____SO_EVERY_DIRECTION_EXCEPT_UP = { EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.EAST, EnumFacing.WEST, EnumFacing.DOWN };
|
||||
private static final BetterBlockPos[] EMPTY = new BetterBlockPos[]{};
|
||||
|
||||
private final EnumFacing direction;
|
||||
|
@ -44,50 +44,6 @@ public interface Helper {
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
/*
|
||||
default EntityPlayerSP player() {
|
||||
if (!mc.isCallingFromMinecraftThread()) {
|
||||
throw new IllegalStateException("h00000000");
|
||||
}
|
||||
return mc.player;
|
||||
}
|
||||
|
||||
default PlayerControllerMP playerController() { // idk
|
||||
if (!mc.isCallingFromMinecraftThread()) {
|
||||
throw new IllegalStateException("h00000000");
|
||||
}
|
||||
return mc.playerController;
|
||||
}
|
||||
|
||||
default WorldClient world() {
|
||||
if (!mc.isCallingFromMinecraftThread()) {
|
||||
throw new IllegalStateException("h00000000");
|
||||
}
|
||||
return mc.world;
|
||||
}
|
||||
|
||||
default BetterBlockPos playerFeet() {
|
||||
// TODO find a better way to deal with soul sand!!!!!
|
||||
BetterBlockPos feet = new BetterBlockPos(player().posX, player().posY + 0.1251, player().posZ);
|
||||
if (BlockStateInterface.get(feet).getBlock() instanceof BlockSlab) {
|
||||
return feet.up();
|
||||
}
|
||||
return feet;
|
||||
}
|
||||
|
||||
default Vec3d playerFeetAsVec() {
|
||||
return new Vec3d(player().posX, player().posY, player().posZ);
|
||||
}
|
||||
|
||||
default Vec3d playerHead() {
|
||||
return new Vec3d(player().posX, player().posY + player().getEyeHeight(), player().posZ);
|
||||
}
|
||||
|
||||
default Rotation playerRotations() {
|
||||
return new Rotation(player().rotationYaw, player().rotationPitch);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Send a message to chat only if chatDebug is on
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user