Java Code Examples for net.minecraft.init.Blocks#CAKE

The following examples show how to use net.minecraft.init.Blocks#CAKE . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
@SubscribeEvent
public static void onBlockPlaced(EntityPlaceEvent event)
{
	Block placedBlock = event.getPlacedBlock().getBlock();
	if (placedBlock == Blocks.CAKE)
	{
		Block downBlock = event.getWorld().getBlockState(event.getPos().down()).getBlock();
		if (blocks_with_ants.contains(downBlock))
		{
			event.getWorld().setBlockState(event.getPos(), ant_covered_cake.getDefaultState());
		}
	}
}
 
Example 2
public static MetaBlock get(){
	return new MetaBlock(Blocks.CAKE);
}