mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
[1.11.x] Refine fluid placement utilities (#3509)
This commit is contained in:
1 parent
160427b12c
commit
8eea766288
12 files changed
+615
-69
No files matched your search
@@ -358,6 +358,20 @@ public class BlockFluidClassic extends BlockFluidBase
|
||||
}
|
||||
|
||||
/* IFluidBlock */
|
||||
@Override
|
||||
public int place(World world, BlockPos pos, @Nonnull FluidStack fluidStack, boolean doPlace)
|
||||
{
|
||||
if (fluidStack.amount < Fluid.BUCKET_VOLUME)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (doPlace)
|
||||
{
|
||||
world.setBlockState(pos, this.getDefaultState(), 11);
|
||||
}
|
||||
return Fluid.BUCKET_VOLUME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(World world, BlockPos pos, boolean doDrain)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user