public int getCapacity(Fluid f) { if (power < MINPOWER || torque < MINTORQUE) return 0; int log2 = (int) (ReikaMathLibrary.logbase(torque, 2) / 2); long power = ReikaMathLibrary.longpow(10, log2); int factor = f.isGaseous() ? 8 : 1; long frac = factor * (power / 40); return (int) Math.min(frac, tank.getCapacity()); }
public IBakedModel bake( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) { ImmutableMap<TransformType, TRSRTransformation> map = IPerspectiveAwareModel.MapWrapper.getTransforms(state); return new BakedFluid( state.apply(Optional.<IModelPart>absent()), map, format, fluid.getColor(), bakedTextureGetter.apply(fluid.getStill()), bakedTextureGetter.apply(fluid.getFlowing()), fluid.isGaseous(), Optional.<IExtendedBlockState>absent()); }