Advertisement
Memes_land

CreeperStructure class

Mar 24th, 2021
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. public class CreeperStructure {
  2.  
  3.     public static void init(World world, int x, int y, int z) {
  4.         world.setBlock(x, y, z, Blocks.emerald_block);
  5.         world.setBlock(x, y + 1, z, Blocks.emerald_block);
  6.         world.setBlock(x, y + 2, z, Blocks.emerald_block);
  7.  
  8.         world.setBlock(x, y + 3, z, Block.getBlockById(52));
  9.  
  10.         Entity entity;
  11.         entity = new EntityCreeper(world);
  12.  
  13.         TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getTileEntity(x, y + 3, z);
  14.         tileentitymobspawner.func_145881_a().func_98265_a(entity);
  15.         NBTTagCompound nbt = new NBTTagCompound();
  16.         tileentitymobspawner.writeToNBT(nbt);
  17.         nbt.setShort("minSpawnDelay",(short)50);
  18.         nbt.setShort("maxSpawnDelay",(short)200);
  19.         tileentitymobspawner.readFromNBT(nbt);
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement