private void setGravity() { if (fluid.getDensity() < 0) { this.gravity = MathHelper.minF(0.01F, 0.03F + 0.03F * fluid.getDensity() / 1000F); } }
private BlockForestryFluid(Fluid fluid, int flammability, boolean flammable, Color color) { super(fluid, Material.WATER); setDensity(fluid.getDensity()); this.flammability = flammability; this.flammable = flammable; this.color = color; }
private BlockBinnieFluid(Fluid fluid, int flammability, boolean flammable, Color color) { super(fluid, Material.WATER); setDensity(fluid.getDensity()); this.flammability = flammability; this.flammable = flammable; this.color = color; }
@Override public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) { if (stack.getTagCompound() != null) { Fluid fluid = FluidRegistry.getFluid(stack.getTagCompound().getString(CoreProps.FLUID)); if (fluid == null || fluid.getDensity() >= 0) { return; } } if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { tooltip.add(StringHelper.shiftForDetails()); } if (!StringHelper.isShiftKeyDown()) { return; } if (stack.getTagCompound() == null) { if (ItemHelper.getItemDamage(stack) == 0) { tooltip.add(StringHelper.localize("info.thermalexpansion.florb.a.0")); } else { tooltip.add(StringHelper.localize("info.thermalexpansion.florb.b.0")); } tooltip.add(StringHelper.localize("info.thermalexpansion.florb.c.0")); tooltip.add(StringHelper.localize("info.thermalexpansion.florb.c.1")); } else { tooltip.add(StringHelper.localize("info.thermalexpansion.florb.d.0")); tooltip.add(StringHelper.localize("info.thermalexpansion.florb.d.1")); } }
protected void drawFluid(FluidStack fluid, int fluidHeight, int x, int y, int width, int height) { if (fluid == null || fluid.amount <= 0) return; if (fluid.getFluid().getDensity(fluid) < 0) y += fluidHeight - height;