Fixed invalid flow vector caching of still fluids.

This commit is contained in:
RainWarrior 2016-01-04 12:48:10 +03:00
parent 686b32bfd0
commit 826b1d20f8

View file

@ -153,11 +153,13 @@ public class ModelFluid implements IModelCustomData
private static int getFlow(Optional<IExtendedBlockState> stateOption) private static int getFlow(Optional<IExtendedBlockState> stateOption)
{ {
int flowRound = -1000; float flow = -1000;
if(stateOption.isPresent()) if(stateOption.isPresent())
{ {
flowRound = (int)Math.round(Math.toDegrees(stateOption.get().getValue(BlockFluidBase.FLOW_DIRECTION).doubleValue())); flow = stateOption.get().getValue(BlockFluidBase.FLOW_DIRECTION);
} }
int flowRound = (int)Math.round(Math.toDegrees(flow));
flowRound = MathHelper.clamp_int(flowRound, -1000, 1000);
return flowRound; return flowRound;
} }
@ -197,7 +199,7 @@ public class ModelFluid implements IModelCustomData
TextureAtlasSprite topSprite = flowing; TextureAtlasSprite topSprite = flowing;
float scale = 4; float scale = 4;
if(flow < -999F) if(flow < -17F)
{ {
flow = 0; flow = 0;
scale = 8; scale = 8;