net.minecraft.block.piston.PistonBehavior Java Examples

The following examples show how to use net.minecraft.block.piston.PistonBehavior. 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: PistonBlock_movableTEMixin.java    From fabric-carpet with MIT License 5 votes vote down vote up
@Redirect(method = "isMovable", at = @At(
        value = "INVOKE",
        target = "Lnet/minecraft/block/BlockState;getPistonBehavior()Lnet/minecraft/block/piston/PistonBehavior;"
))
private static PistonBehavior moveGrindstones(BlockState blockState)
{
    if (CarpetSettings.movableBlockEntities && blockState.getBlock() == Blocks.GRINDSTONE) return PistonBehavior.NORMAL;
    return blockState.getPistonBehavior();
}
 
Example #2
Source File: BasicSolarPanelBlock.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
@Override
public PistonBehavior getPistonBehavior(BlockState blockState_1) {
    return PistonBehavior.BLOCK;
}
 
Example #3
Source File: BasicSolarPanelPartBlock.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
@Override
public PistonBehavior getPistonBehavior(BlockState blockState_1) {
    return PistonBehavior.BLOCK;
}
 
Example #4
Source File: WrappingUtil.java    From Sandbox with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static PistonBehavior convert(org.sandboxpowered.sandbox.api.block.Material.PistonInteraction interaction) {
    return PistonBehavior.values()[interaction.ordinal()];
}
 
Example #5
Source File: WrappingUtil.java    From Sandbox with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static org.sandboxpowered.sandbox.api.block.Material.PistonInteraction convert(PistonBehavior behavior) {
    return org.sandboxpowered.sandbox.api.block.Material.PistonInteraction.values()[behavior.ordinal()];
}
 
Example #6
Source File: BlockWrapper.java    From Sandbox with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public PistonBehavior getPistonBehavior(BlockState blockState_1) {
    return WrappingUtil.convert(block.getPistonInteraction((org.sandboxpowered.sandbox.api.state.BlockState) blockState_1));
}
 
Example #7
Source File: BlockWrapper.java    From Sandbox with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public PistonBehavior getPistonBehavior(BlockState blockState_1) {
    return WrappingUtil.convert(block.getPistonInteraction((org.sandboxpowered.sandbox.api.state.BlockState) blockState_1));
}
 
Example #8
Source File: MixinMaterial.java    From Sandbox with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Shadow
public abstract PistonBehavior getPistonBehavior();