Java Code Examples for cn.nukkit.level.Level#BLOCK_UPDATE_TOUCH
The following examples show how to use
cn.nukkit.level.Level#BLOCK_UPDATE_TOUCH .
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: BlockOreRedstone.java From Jupiter with GNU General Public License v3.0 | 5 votes |
@Override public int onUpdate(int type) { if (type == Level.BLOCK_UPDATE_TOUCH) { //type == Level.BLOCK_UPDATE_NORMAL || this.getLevel().setBlock(this, new BlockOreRedstone(this.meta), false, false); return Level.BLOCK_UPDATE_WEAK; } return 0; }
Example 2
Source File: BlockOreRedstone.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public int onUpdate(int type) { if (type == Level.BLOCK_UPDATE_TOUCH) { //type == Level.BLOCK_UPDATE_NORMAL || this.getLevel().setBlock(this, Block.get(BlockID.GLOWING_REDSTONE_ORE), false, false); return Level.BLOCK_UPDATE_WEAK; } return 0; }
Example 3
Source File: BlockDragonEgg.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public int onUpdate(int type) { if (type == Level.BLOCK_UPDATE_TOUCH) { this.teleport(); } return super.onUpdate(type); }
Example 4
Source File: BlockOreRedstone.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public int onUpdate(int type) { if (type == Level.BLOCK_UPDATE_TOUCH) { //type == Level.BLOCK_UPDATE_NORMAL || this.getLevel().setBlock(this, new BlockOreRedstoneGlowing(), false, false); return Level.BLOCK_UPDATE_WEAK; } return 0; }