Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void fluidTweaker(Block block) {
- try {
- if (block instanceof BlockFluidClassic) {
- Fluid fluid = ((BlockFluidClassic) block).getFluid();
- try {
- fluid.setDensity(
- config.getInt("Density", getCategory(block, SUBCAT_FLUID),
- fluid.getDensity(), Integer.MIN_VALUE, Integer.MAX_VALUE,
- "Overrides the density value with this value."
- )
- );
- } catch (Exception e) {
- LOGGER.error("Fail to tweak the density value for " + fluid.getName(), e);
- }
- try {
- fluid.setLuminosity(
- config.getInt("Luminosity", getCategory(block, SUBCAT_FLUID),
- fluid.getLuminosity(), 0, Integer.MAX_VALUE,
- "Overrides the luminosity value with this value."
- )
- );
- } catch (Exception e) {
- LOGGER.error("Fail to tweak the luminosity value for " + fluid.getName(), e);
- }
- try {
- fluid.setViscosity(
- config.getInt("Viscosity", getCategory(block, SUBCAT_FLUID),
- fluid.getLuminosity(), 0, Integer.MAX_VALUE,
- "Overrides the viscosity value with this value."
- )
- );
- } catch (Exception e) {
- LOGGER.error("Fail to tweak the viscosity value for " + fluid.getName(), e);
- }
- try {
- fluid.setTemperature(
- config.getInt("Temperature", getCategory(block, SUBCAT_FLUID),
- fluid.getTemperature(), 0, Integer.MAX_VALUE,
- "Overrides the temperature value with this value."
- )
- );
- } catch (Exception e) {
- LOGGER.error("Fail to tweak the temperature value for " + fluid.getName(), e);
- }
- config.setCategoryComment(getCategory(block, SUBCAT_FLUID), "Edit fluid properties for " + getFormattedBlockName(block));
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement