mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fluid events now know how much fluid is moved
Added amount that is being filled/drained to the FluidEvent Added constructors without amount to ensure backwards compability Added deprecation to amountless constructors
This commit is contained in:
1 parent
83e7130216
commit
a3e8f0cbe4
2 files changed
+29
-3
No files matched your search
@@ -127,7 +127,7 @@ public class FluidTank implements IFluidTank
|
||||
|
||||
if (tile != null)
|
||||
{
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluid, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this));
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluid, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this, fluid.amount));
|
||||
}
|
||||
return fluid.amount;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ public class FluidTank implements IFluidTank
|
||||
|
||||
if (tile != null)
|
||||
{
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluid, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this));
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluid, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this, filled));
|
||||
}
|
||||
return filled;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ public class FluidTank implements IFluidTank
|
||||
|
||||
if (tile != null)
|
||||
{
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this));
|
||||
FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, this, drained));
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
|
||||
Reference in new issue
Block a user