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

The following examples show how to use net.minecraft.init.Blocks#CAKE . 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: SubmodAnts.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@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
Source File: Cake.java    From minecraft-roguelike with GNU General Public License v3.0 4 votes vote down vote up
public static MetaBlock get(){
	return new MetaBlock(Blocks.CAKE);
}