mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-06-02 05:53:38 +02:00
ca3cc00b85
Block reg refactor, part 1
34 lines
1.1 KiB
Java
34 lines
1.1 KiB
Java
/*
|
|
* This file ("BlockFluidFlowing.java") is part of the Actually Additions mod for Minecraft.
|
|
* It is created and owned by Ellpeck and distributed
|
|
* under the Actually Additions License to be found at
|
|
* http://ellpeck.de/actaddlicense
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
*
|
|
* © 2015-2017 Ellpeck
|
|
*/
|
|
|
|
package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.World;
|
|
|
|
public class BlockFluidFlowing extends BlockFluidClassic implements ItemBlockBase.ICustomRarity {
|
|
|
|
public BlockFluidFlowing(Fluid fluid, Material material) {
|
|
super(fluid, material);
|
|
this.displacements.put(this, false);
|
|
}
|
|
|
|
@Override
|
|
public boolean canDisplace(IBlockAccess world, BlockPos pos) {
|
|
return !world.getBlockState(pos).getMaterial().isLiquid() && super.canDisplace(world, pos);
|
|
}
|
|
|
|
@Override
|
|
public boolean displaceIfPossible(World world, BlockPos pos) {
|
|
return !world.getBlockState(pos).getMaterial().isLiquid() && super.displaceIfPossible(world, pos);
|
|
}
|
|
}
|