diff --git a/client/src/main/java/client/renderer/chunk/RenderChunk.java b/client/src/main/java/client/renderer/chunk/RenderChunk.java index 88baf127..460302b6 100755 --- a/client/src/main/java/client/renderer/chunk/RenderChunk.java +++ b/client/src/main/java/client/renderer/chunk/RenderChunk.java @@ -170,7 +170,7 @@ public class RenderChunk if (block != Blocks.air) { - BlockLayer layer = block.hasTransparency() ? (block.getMaterial().isLiquid() ? BlockLayer.TRANSLUCENT : BlockLayer.CUTOUT) : BlockLayer.SOLID; + BlockLayer layer = block.hasTransparency() ? BlockLayer.CUTOUT : BlockLayer.SOLID; int idx = layer.ordinal(); RenderBuffer worldrenderer = generator.getRegionRenderCacheBuilder().getWorldRendererByLayerId(idx); diff --git a/client/src/main/java/client/renderer/ticked/TextureWater.java b/client/src/main/java/client/renderer/ticked/TextureWater.java index 85e9a1cf..cd8088d0 100755 --- a/client/src/main/java/client/renderer/ticked/TextureWater.java +++ b/client/src/main/java/client/renderer/ticked/TextureWater.java @@ -81,7 +81,10 @@ public class TextureWater extends TextureTicked b = (b * (this.color & 0xff)) / 255; a = (a * ((this.color >> 24) & 0xff)) / 255; } - textureData[i1] = (a << 24) | (r << 16) | (g << 8) | b; + r = (r * a) / 255; + g = (g * a) / 255; + b = (b * a) / 255; + textureData[i1] = 0xff000000 | (r << 16) | (g << 8) | b; } } diff --git a/client/src/main/java/client/renderer/ticked/TextureWaterFlow.java b/client/src/main/java/client/renderer/ticked/TextureWaterFlow.java index 3bbf1d1a..b81bc01b 100755 --- a/client/src/main/java/client/renderer/ticked/TextureWaterFlow.java +++ b/client/src/main/java/client/renderer/ticked/TextureWaterFlow.java @@ -80,10 +80,13 @@ public class TextureWaterFlow extends TextureTicked g = (g * ((this.color >> 8) & 0xff)) / 255; b = (b * (this.color & 0xff)) / 255; a = (a * ((this.color >> 24) & 0xff)) / 255; - } + } + r = (r * a) / 255; + g = (g * a) / 255; + b = (b * a) / 255; textureData[(i1 & 0x0f) | ((i1 & 0xf0) * 2)] = textureData[((i1 & 0x0f) + 16) | ((i1 & 0xf0) * 2)] = textureData[(i1 & 0x0f) | (((i1 & 0xf0) + 256) * 2)] = textureData[((i1 & 0x0f) + 16) | (((i1 & 0xf0) + 256) * 2)] = - (a << 24) | (r << 16) | (g << 8) | b; + 0xff000000 | (r << 16) | (g << 8) | b; } } diff --git a/client/src/main/resources/textures/blocks/acid_flow.png b/client/src/main/resources/textures/blocks/acid_flow.png index c4f0024b..25d7dd85 100755 Binary files a/client/src/main/resources/textures/blocks/acid_flow.png and b/client/src/main/resources/textures/blocks/acid_flow.png differ diff --git a/client/src/main/resources/textures/blocks/acid_still.png b/client/src/main/resources/textures/blocks/acid_still.png index 81936994..dd22de68 100755 Binary files a/client/src/main/resources/textures/blocks/acid_still.png and b/client/src/main/resources/textures/blocks/acid_still.png differ diff --git a/client/src/main/resources/textures/blocks/blood_flow.png b/client/src/main/resources/textures/blocks/blood_flow.png index 56eb9c98..7f8f93e7 100755 Binary files a/client/src/main/resources/textures/blocks/blood_flow.png and b/client/src/main/resources/textures/blocks/blood_flow.png differ diff --git a/client/src/main/resources/textures/blocks/blood_still.png b/client/src/main/resources/textures/blocks/blood_still.png index c6c97611..789039cf 100755 Binary files a/client/src/main/resources/textures/blocks/blood_still.png and b/client/src/main/resources/textures/blocks/blood_still.png differ diff --git a/client/src/main/resources/textures/blocks/ice.png b/client/src/main/resources/textures/blocks/ice.png index 0403ebb2..8b27e699 100755 Binary files a/client/src/main/resources/textures/blocks/ice.png and b/client/src/main/resources/textures/blocks/ice.png differ diff --git a/client/src/main/resources/textures/blocks/plasma_flow.png b/client/src/main/resources/textures/blocks/plasma_flow.png index c4cbea33..e30d9e9b 100755 Binary files a/client/src/main/resources/textures/blocks/plasma_flow.png and b/client/src/main/resources/textures/blocks/plasma_flow.png differ diff --git a/client/src/main/resources/textures/blocks/plasma_still.png b/client/src/main/resources/textures/blocks/plasma_still.png index fc260d5d..131d3e04 100755 Binary files a/client/src/main/resources/textures/blocks/plasma_still.png and b/client/src/main/resources/textures/blocks/plasma_still.png differ diff --git a/client/src/main/resources/textures/blocks/spring_water_flow.png b/client/src/main/resources/textures/blocks/spring_water_flow.png index 19dcfef3..e1b6369c 100755 Binary files a/client/src/main/resources/textures/blocks/spring_water_flow.png and b/client/src/main/resources/textures/blocks/spring_water_flow.png differ diff --git a/client/src/main/resources/textures/blocks/spring_water_still.png b/client/src/main/resources/textures/blocks/spring_water_still.png index fdd9eabf..f278a1a6 100755 Binary files a/client/src/main/resources/textures/blocks/spring_water_still.png and b/client/src/main/resources/textures/blocks/spring_water_still.png differ diff --git a/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java b/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java index bd16392e..869b0039 100755 --- a/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockDynamicLiquid.java @@ -19,14 +19,12 @@ import common.world.AWorldServer; public class BlockDynamicLiquid extends BlockLiquid { - private final boolean infinite; int adjacentSourceBlocks; private BlockStaticLiquid staticBlock; - public BlockDynamicLiquid(Material materialIn, boolean infinite, boolean opaque, int rate, Object animation) + public BlockDynamicLiquid(Material materialIn, int rate, Object animation) { - super(materialIn, true, opaque, rate, animation); - this.infinite = infinite; + super(materialIn, true, rate, animation); } void setStaticBlock(BlockStaticLiquid block) { @@ -89,8 +87,8 @@ public class BlockDynamicLiquid extends BlockLiquid if (this.adjacentSourceBlocks >= 2 && ((Vars.mergeWater && this.material == Material.WATER) || (Vars.mergeLava && this.material == Material.LAVA) - || (this.infinite && Vars.mergeInfinite && this.material != Material.WATER && this.material != Material.LAVA) - || (!this.infinite && Vars.mergeFinite && this.material != Material.WATER && this.material != Material.LAVA))) + || (Vars.mergeCold && this.material == Material.COLD) + || (Vars.mergeHot && this.material == Material.HOT))) { State iblockstate1 = worldIn.getState(pos.down()); diff --git a/common/src/main/java/common/block/liquid/BlockLiquid.java b/common/src/main/java/common/block/liquid/BlockLiquid.java index 74b2c62c..b55b526b 100755 --- a/common/src/main/java/common/block/liquid/BlockLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockLiquid.java @@ -14,7 +14,6 @@ import common.properties.PropertyInteger; import common.rng.Random; import common.util.BlockPos; import common.util.BoundingBox; -import common.util.Clientside; import common.util.ExtMath; import common.util.Facing; import common.util.Pair; @@ -32,18 +31,16 @@ public abstract class BlockLiquid extends Block public static final PropertyInteger LEVEL = PropertyInteger.create("level", 0, 15); public static final List> LIQUIDS = Lists.newArrayList(); - protected final boolean opaque; protected final int flowRate; protected final Object animation; - public BlockLiquid(Material materialIn, boolean tick, boolean opaque, int rate, Object animation) + public BlockLiquid(Material materialIn, boolean tick, int rate, Object animation) { super(materialIn); this.setDefaultState(this.getBaseState().withProperty(LEVEL, Integer.valueOf(0))); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); if(tick) this.setTicked(); - this.opaque = opaque; this.flowRate = rate; this.animation = animation; } @@ -212,11 +209,6 @@ public abstract class BlockLiquid extends Block return this.flowRate >= 0 ? this.flowRate : (worldIn.isLavaFaster(pos) ? (-this.flowRate / 3) : (-this.flowRate)); } - @Clientside - public boolean hasTransparency() { - return !this.opaque; - } - public void displayTick(World worldIn, BlockPos pos, State state, Random rand) { double d0 = (double)pos.getX(); diff --git a/common/src/main/java/common/block/liquid/BlockStaticLiquid.java b/common/src/main/java/common/block/liquid/BlockStaticLiquid.java index ebfe51ba..a8866d71 100755 --- a/common/src/main/java/common/block/liquid/BlockStaticLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockStaticLiquid.java @@ -19,9 +19,9 @@ public class BlockStaticLiquid extends BlockLiquid { private final BlockDynamicLiquid dynamicBlock; - public BlockStaticLiquid(Material materialIn, boolean opaque, int rate, Object animation, BlockDynamicLiquid flowing) + public BlockStaticLiquid(Material materialIn, int rate, Object animation, BlockDynamicLiquid flowing) { - super(materialIn, materialIn == Material.LAVA, opaque, rate, animation); + super(materialIn, materialIn == Material.LAVA, rate, animation); this.dynamicBlock = flowing; flowing.setStaticBlock(this); LIQUIDS.add(new Pair(this, flowing)); diff --git a/common/src/main/java/common/block/natural/BlockIce.java b/common/src/main/java/common/block/natural/BlockIce.java index 84b57b37..2cca363a 100755 --- a/common/src/main/java/common/block/natural/BlockIce.java +++ b/common/src/main/java/common/block/natural/BlockIce.java @@ -9,7 +9,6 @@ import common.item.CheatTab; import common.rng.Random; import common.tileentity.TileEntity; import common.util.BlockPos; -import common.util.Clientside; import common.util.Facing; import common.vars.Vars; import common.world.LightType; @@ -20,21 +19,12 @@ import common.world.IWorldAccess; public class BlockIce extends Block { public BlockIce() { - super(Material.TRANSLUCENT); + super(Material.LOOSE); this.setSlipperiness(0.98F); this.setTicked(); this.setTab(CheatTab.NATURE); } - public boolean isOpaqueCube() { - return false; - } - - @Clientside - public boolean hasTransparency() { - return true; - } - public boolean canRender(IWorldAccess world, BlockPos pos, Facing side) { State state = world.getState(pos); Block block = state.getBlock(); diff --git a/common/src/main/java/common/init/BlockRegistry.java b/common/src/main/java/common/init/BlockRegistry.java index d781dc9a..7e5410ec 100755 --- a/common/src/main/java/common/init/BlockRegistry.java +++ b/common/src/main/java/common/init/BlockRegistry.java @@ -115,13 +115,13 @@ public abstract class BlockRegistry { return STATES; } - private static void registerFluid(String name, String display, boolean infinite, LiquidType type, boolean opaque, int light, int rate, + private static void registerFluid(String name, String display, LiquidType type, int light, int rate, float radiation, Object still, Object flowing) { - BlockDynamicLiquid dy = (BlockDynamicLiquid)(new BlockDynamicLiquid(type.material, infinite, opaque, rate, flowing)).setHardness(100.0F) - .setOpacity(opaque ? 0 : 3).setLight((float)light / 15.0f).setDisplay(display) + BlockDynamicLiquid dy = (BlockDynamicLiquid)(new BlockDynamicLiquid(type.material, rate, flowing)).setHardness(100.0F) + .setLight((float)light / 15.0f).setDisplay(display) .setRadiation(radiation); - BlockStaticLiquid st = (BlockStaticLiquid)(new BlockStaticLiquid(type.material, opaque, rate, still, dy)).setHardness(100.0F) - .setOpacity(opaque ? 0 : 3).setLight((float)light / 15.0f).setDisplay(display) + BlockStaticLiquid st = (BlockStaticLiquid)(new BlockStaticLiquid(type.material, rate, still, dy)).setHardness(100.0F) + .setLight((float)light / 15.0f).setDisplay(display) .setRadiation(radiation); register("flowing_" + name, dy); register(name, st); @@ -176,20 +176,20 @@ public abstract class BlockRegistry { .setDisplay("Schwarzbruchstein").setTab(CheatTab.ROCK)); - registerFluid("water", "Wasser", true, LiquidType.WATER, false, 0, 5, 0.0f, TextureAnimation.WATER_STILL, TextureAnimation.WATER_FLOW); - registerFluid("lava", "Lava", false, LiquidType.LAVA, true, 15, -30, 0.0f, 2, 3); - registerFluid("magma", "Magma", false, LiquidType.HOT, true, 15, 40, 0.0f, TextureAnimation.MAGMA_STILL, TextureAnimation.MAGMA_FLOW); - registerFluid("plasma", "Plasma", false, LiquidType.HOT, false, 15, 15, 0.0f, 2, 2); - registerFluid("mercury", "Quecksilber", false, LiquidType.COLD, true, 0, 40, 0.0f, 8, 4); - registerFluid("hydrogen", "Wasserstoff", false, LiquidType.COLD, true, 0, 50, 0.0f, 8, 4); - registerFluid("acid", "Säure", false, LiquidType.HOT, false, 0, 5, 0.0f, 1, 1); - registerFluid("slime", "Schleim", false, LiquidType.COLD, true, 0, 50, 0.0f, 8, 4); - registerFluid("goo", "Klebrige Masse", false, LiquidType.COLD, true, 0, 60, 0.0f, 10, 5); - registerFluid("nukage", "Radioaktive Masse", false, LiquidType.COLD, true, 10, 10, 4.0f, 2, 2); - registerFluid("blood", "Blut", false, LiquidType.COLD, false, 0, 10, 0.0f, 2, 1); - registerFluid("spring_water", "Klares Wasser", true, LiquidType.COLD, false, 0, 5, 0.0f, 1, 1); - registerFluid("swamp_water", "Sumpfwasser", true, LiquidType.COLD, false, 0, 5, 0.0f, TextureAnimation.SWAMP_WATER_STILL, TextureAnimation.SWAMP_WATER_FLOW); - registerFluid("milk", "Milch", false, LiquidType.COLD, true, 0, 5, 0.0f, 1, 1); + registerFluid("water", "Wasser", LiquidType.WATER, 0, 5, 0.0f, TextureAnimation.WATER_STILL, TextureAnimation.WATER_FLOW); + registerFluid("lava", "Lava", LiquidType.LAVA, 15, -30, 0.0f, 2, 3); + registerFluid("magma", "Magma", LiquidType.HOT, 15, 40, 0.0f, TextureAnimation.MAGMA_STILL, TextureAnimation.MAGMA_FLOW); + registerFluid("plasma", "Plasma", LiquidType.HOT, 15, 15, 0.0f, 2, 2); + registerFluid("mercury", "Quecksilber", LiquidType.COLD, 0, 40, 0.0f, 8, 4); + registerFluid("hydrogen", "Wasserstoff", LiquidType.COLD, 0, 50, 0.0f, 8, 4); + registerFluid("acid", "Säure", LiquidType.HOT, 0, 5, 0.0f, 1, 1); + registerFluid("slime", "Schleim", LiquidType.COLD, 0, 50, 0.0f, 8, 4); + registerFluid("goo", "Klebrige Masse", LiquidType.COLD, 0, 60, 0.0f, 10, 5); + registerFluid("nukage", "Radioaktive Masse", LiquidType.COLD, 10, 10, 4.0f, 2, 2); + registerFluid("blood", "Blut", LiquidType.COLD, 0, 10, 0.0f, 2, 1); + registerFluid("spring_water", "Klares Wasser", LiquidType.COLD, 0, 5, 0.0f, 1, 1); + registerFluid("swamp_water", "Sumpfwasser", LiquidType.COLD, 0, 5, 0.0f, TextureAnimation.SWAMP_WATER_STILL, TextureAnimation.SWAMP_WATER_FLOW); + registerFluid("milk", "Milch", LiquidType.COLD, 0, 5, 0.0f, 1, 1); for(MetalType metal : MetalType.values()) { diff --git a/common/src/main/java/common/vars/Vars.java b/common/src/main/java/common/vars/Vars.java index 9add417d..f549df41 100755 --- a/common/src/main/java/common/vars/Vars.java +++ b/common/src/main/java/common/vars/Vars.java @@ -57,10 +57,6 @@ public abstract class Vars { public static boolean liquidPhysics = true; @Var(name = "lavaFire") public static boolean lavaFire = true; - @Var(name = "mergeWater") - public static boolean mergeWater = true; - @Var(name = "mergeInfinite") - public static boolean mergeInfinite = true; @Var(name = "infighting") public static boolean infight = true; @Var(name = "damageFall") @@ -200,10 +196,14 @@ public abstract class Vars { public static boolean keepInventory = false; @Var(name = "cleanCut") public static boolean cleanCut = false; - @Var(name = "mergeLava") + @Var(name = "infiniteWater") + public static boolean mergeWater = false; + @Var(name = "infiniteLava") public static boolean mergeLava = false; - @Var(name = "mergeFinite") - public static boolean mergeFinite = false; + @Var(name = "infiniteColdLiquids") + public static boolean mergeCold = false; + @Var(name = "infiniteHotLiquids") + public static boolean mergeHot = false; @Var(name = "veryHungryRabbits") public static boolean rabidRabbits = false; @Var(name = "evilFowl")