mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Update and clean up Forge fluid render model (#4763)
This commit is contained in:
1 parent
ab228832f2
commit
2786cd279c
14 files changed
+620
-469
No files matched your search
@@ -1034,18 +1034,16 @@ public class ForgeHooks
|
||||
}
|
||||
else if (block instanceof BlockLiquid)
|
||||
{
|
||||
filled = BlockLiquid.getLiquidHeightPercent(block.getMetaFromState(state));
|
||||
filled = 1.0 - (BlockLiquid.getLiquidHeightPercent(block.getMetaFromState(state)) - (1.0 / 9.0));
|
||||
}
|
||||
|
||||
if (filled < 0)
|
||||
{
|
||||
filled *= -1;
|
||||
//filled -= 0.11111111F; //Why this is needed.. not sure...
|
||||
return eyes > pos.getY() + 1 + (1 - filled);
|
||||
return eyes > pos.getY() + (filled + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return eyes < pos.getY() + 1 + filled;
|
||||
return eyes < pos.getY() + filled;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package net.minecraftforge.common.property;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Range;
|
||||
|
||||
public class PropertyFloat implements IUnlistedProperty<Float>
|
||||
{
|
||||
@@ -29,7 +30,12 @@ public class PropertyFloat implements IUnlistedProperty<Float>
|
||||
|
||||
public PropertyFloat(String name)
|
||||
{
|
||||
this(name, Predicates.<Float>alwaysTrue());
|
||||
this(name, Predicates.alwaysTrue());
|
||||
}
|
||||
|
||||
public PropertyFloat(String name, float min, float max)
|
||||
{
|
||||
this(name, Range.closed(min, max));
|
||||
}
|
||||
|
||||
public PropertyFloat(String name, Predicate<Float> validator)
|
||||
|
||||
Reference in new issue
Block a user