public int getRedstoneLevel() {
   double fractionFull = (float) fluidTank.getFluidAmount() / (float) fluidTank.getCapacity();
   return MathHelper.floor_float((float) (fractionFull * 14.0F)) + (fractionFull > 0 ? 1 : 0);
 }
Beispiel #2
0
 public short getShort() {
   return (short) (MathHelper.floor_float(this.data) & 65535);
 }
Beispiel #3
0
 public byte getByte() {
   return (byte) (MathHelper.floor_float(this.data) & 255);
 }
Beispiel #4
0
 public int getInt() {
   return MathHelper.floor_float(this.data);
 }