net.minecraft.block.FluidBlock Java Examples

The following examples show how to use net.minecraft.block.FluidBlock. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlockWrapper.java    From Sandbox with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static SandboxInternal.BlockWrapper create(Block block) {
    if (block instanceof org.sandboxpowered.sandbox.api.block.FluidBlock)
        return new WithFluid((BaseFluid) WrappingUtil.convert(((org.sandboxpowered.sandbox.api.block.FluidBlock) block).getFluid()), block);
    if (block instanceof FluidContainer) {
        if (block.hasBlockEntity()) {
            return new BlockWrapper.WithWaterloggableBlockEntity(block);
        }
        return new BlockWrapper.WithWaterloggable(block);
    }
    if (block.hasBlockEntity()) {
        return new BlockWrapper.WithBlockEntity(block);
    }
    return new BlockWrapper(block);
}
 
Example #2
Source File: CrudeOilFluid.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
@Override
public BlockState toBlockState(FluidState fluidState) {
    return GalacticraftBlocks.CRUDE_OIL.getDefaultState().with(FluidBlock.LEVEL, method_15741(fluidState));
}
 
Example #3
Source File: FuelFluid.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
@Override
public BlockState toBlockState(FluidState fluidState) {
    return GalacticraftBlocks.FUEL.getDefaultState().with(FluidBlock.LEVEL, method_15741(fluidState));
}
 
Example #4
Source File: WitchWaterFluid.java    From the-hallow with MIT License 4 votes vote down vote up
@Override
public BlockState toBlockState(FluidState fluidState) {
	return HallowedBlocks.WITCH_WATER_BLOCK.getDefaultState().with(FluidBlock.LEVEL, method_15741(fluidState));
}
 
Example #5
Source File: BloodFluid.java    From the-hallow with MIT License 4 votes vote down vote up
@Override
public BlockState toBlockState(FluidState fluidState) {
	return HallowedBlocks.BLOOD_BLOCK.getDefaultState().with(FluidBlock.LEVEL, method_15741(fluidState));
}
 
Example #6
Source File: BlockWrapper.java    From Sandbox with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
protected void appendProperties(StateManager.Builder<net.minecraft.block.Block, BlockState> stateFactory$Builder_1) {
    super.appendProperties(stateFactory$Builder_1);
    if (block instanceof org.sandboxpowered.sandbox.api.block.FluidBlock)
        ((BaseBlock) block).appendProperties(((SandboxInternal.StateFactoryBuilder) stateFactory$Builder_1).getSboxBuilder());
}