Merge branch 'master' of github.com:tommy1019/MinecraftForge into miscchanges
This commit is contained in:
commit
8b78f21199
3 changed files with 37 additions and 8 deletions
|
@ -121,8 +121,16 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.density > getDensity(world, x, y, z))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to displace the block at (x, y, z), return true if it was displaced.
|
* Attempt to displace the block at (x, y, z), return true if it was displaced.
|
||||||
|
@ -156,8 +164,16 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Block.blocksList[bId].dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
Block.blocksList[bId].dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||||
|
|
||||||
|
if (this.density > getDensity(world, x, y, z))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public abstract int getQuantaValue(IBlockAccess world, int x, int y, int z);
|
public abstract int getQuantaValue(IBlockAccess world, int x, int y, int z);
|
||||||
|
|
||||||
|
|
|
@ -302,8 +302,16 @@ public class BlockFluidClassic extends BlockFluidBase
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.density > getDensity(world, x, y, z))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected int getLargerQuanta(IBlockAccess world, int x, int y, int z, int compare)
|
protected int getLargerQuanta(IBlockAccess world, int x, int y, int z, int compare)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package net.minecraftforge.fluids;
|
package net.minecraftforge.fluids;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -30,11 +29,13 @@ public class RenderBlockFluid implements ISimpleBlockRenderingHandler
|
||||||
float total = 0;
|
float total = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
float end = 0;
|
||||||
|
|
||||||
for (int i = 0; i < flow.length; i++)
|
for (int i = 0; i < flow.length; i++)
|
||||||
{
|
{
|
||||||
if (flow[i] >= 0.875F)
|
if (flow[i] >= 0.875F && end != 1F)
|
||||||
{
|
{
|
||||||
return flow[i];
|
end = flow[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flow[i] >= 0)
|
if (flow[i] >= 0)
|
||||||
|
@ -43,7 +44,11 @@ public class RenderBlockFluid implements ISimpleBlockRenderingHandler
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return total / count;
|
|
||||||
|
if (end == 0)
|
||||||
|
end = total / count;
|
||||||
|
|
||||||
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getFluidHeightForRender(IBlockAccess world, int x, int y, int z, BlockFluidBase block)
|
public float getFluidHeightForRender(IBlockAccess world, int x, int y, int z, BlockFluidBase block)
|
||||||
|
|
Loading…
Reference in a new issue