Search in sources :

Example 1 with ItemFood

use of net.glowstone.block.itemtype.ItemFood in project Glowstone by GlowstoneMC.

the class ItemTable method registerBuiltins.

// //////////////////////////////////////////////////////////////////////////
// Registration
private void registerBuiltins() {
    // TODO: Some new materials in 1.13 may be missing, although most are covered as part of
    // MaterialUtil sets.
    // Blocks:
    reg(Material.FLOWER_POT, new BlockFlowerPot());
    reg(Material.JUKEBOX, new BlockJukebox());
    reg(Material.NOTE_BLOCK, new BlockNote());
    reg(Material.SPAWNER, new BlockMobSpawner());
    regAll(MaterialTags.INFESTED_BLOCKS, new BlockMonsterEgg());
    reg(Material.DRAGON_EGG, new BlockFalling(Material.DRAGON_EGG));
    regAll(Tag.SIGNS, BlockSign::new, Sound.BLOCK_WOOD_BREAK);
    regAll(Tag.WALL_SIGNS, BlockSign::new, Sound.BLOCK_WOOD_BREAK);
    reg(Material.CRAFTING_TABLE, new BlockWorkbench(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.ENDER_CHEST, new BlockEnderChest());
    reg(Material.CHEST, new BlockChest(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.TRAPPED_CHEST, new BlockChest(true), Sound.BLOCK_WOOD_BREAK);
    reg(Material.DISPENSER, new BlockDispenser());
    reg(Material.DROPPER, new BlockDropper());
    reg(Material.BOOKSHELF, new BlockDirectDrops(Material.BOOK, 3), Sound.BLOCK_WOOD_BREAK);
    reg(Material.CLAY, new BlockDirectDrops(Material.CLAY_BALL, 4), Sound.BLOCK_GRAVEL_BREAK);
    regAll(MaterialTags.STAINED_TERRACOTTA, new BlockDirectDrops(ToolType.PICKAXE));
    regAll(MaterialTags.GLAZED_TERRACOTTA, new BlockDirectDrops(ToolType.PICKAXE));
    regAll(Tag.WOODEN_DOORS, BlockDoor::new, Sound.BLOCK_WOOD_BREAK);
    reg(Material.IRON_DOOR, new BlockDoor(Material.IRON_DOOR));
    reg(Material.FARMLAND, new BlockFarmland(), Sound.BLOCK_GRAVEL_BREAK);
    reg(Material.GLASS, new BlockDropless());
    reg(Material.GLASS_PANE, new BlockDropless());
    regAll(MaterialTags.STAINED_GLASS, new BlockDropless());
    regAll(MaterialTags.STAINED_GLASS_PANES, new BlockDropless());
    reg(Material.GLOWSTONE, new BlockRandomDrops(Material.GLOWSTONE_DUST, 2, 4));
    reg(Material.MYCELIUM, new BlockMycel(), Sound.BLOCK_GRAVEL_BREAK);
    reg(Material.GRASS, new BlockGrass(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.DIRT, new BlockDirt(), Sound.BLOCK_GRAVEL_BREAK);
    reg(Material.GRAVEL, new BlockGravel(), Sound.BLOCK_GRAVEL_BREAK);
    reg(Material.SAND, new BlockFalling(Material.SAND), Sound.BLOCK_SAND_BREAK);
    reg(Material.ANVIL, new BlockAnvil());
    reg(Material.ICE, new BlockIce());
    reg(Material.PACKED_ICE, new BlockDropless());
    reg(Material.SNOW, new BlockSnow(), Sound.BLOCK_SNOW_BREAK);
    reg(Material.SNOW_BLOCK, new BlockSnowBlock(), Sound.BLOCK_SNOW_BREAK);
    reg(Material.PRISMARINE, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.RED_SANDSTONE, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.SANDSTONE, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.NETHER_BRICK, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.NETHER_BRICK_FENCE, new BlockFence(Material.NETHER_BRICK_FENCE, ToolType.PICKAXE));
    regAll(Tag.WOODEN_FENCES, BlockFence::new);
    reg(Material.NETHERRACK, new BlockDirectDrops(ToolType.PICKAXE));
    // TODO: Convert
    reg(Material.IRON_BARS, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.BRICK, new BlockDirectDrops(ToolType.PICKAXE));
    // TODO: Convert
    reg(Material.LEGACY_SMOOTH_BRICK, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.END_STONE, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.COBBLESTONE, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.COBBLESTONE_WALL, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.MOSSY_COBBLESTONE, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.STONE, new BlockStone());
    reg(Material.OBSIDIAN, new BlockDirectDrops(ToolType.DIAMOND_PICKAXE));
    reg(Material.COAL_ORE, new BlockOre(Material.COAL, ToolType.PICKAXE));
    reg(Material.COAL_BLOCK, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.IRON_ORE, new BlockDirectDrops(ToolType.STONE_PICKAXE));
    reg(Material.IRON_BLOCK, new BlockDirectDrops(ToolType.STONE_PICKAXE));
    reg(Material.GOLD_ORE, new BlockDirectDrops(ToolType.IRON_PICKAXE));
    reg(Material.GOLD_BLOCK, new BlockDirectDrops(ToolType.IRON_PICKAXE));
    reg(Material.DIAMOND_ORE, new BlockOre(Material.DIAMOND, ToolType.IRON_PICKAXE));
    reg(Material.DIAMOND_BLOCK, new BlockDirectDrops(ToolType.IRON_PICKAXE));
    reg(Material.EMERALD_ORE, new BlockOre(Material.EMERALD, ToolType.IRON_PICKAXE));
    reg(Material.EMERALD_BLOCK, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.LAPIS_ORE, new BlockOre(Material.LAPIS_LAZULI, ToolType.STONE_PICKAXE, 4, 4, 8));
    reg(Material.LAPIS_BLOCK, new BlockDirectDrops(ToolType.STONE_PICKAXE));
    reg(Material.NETHER_QUARTZ_ORE, new BlockOre(Material.QUARTZ, ToolType.PICKAXE));
    reg(Material.REDSTONE_ORE, new BlockRedstoneOre());
    reg(Material.REDSTONE_BLOCK, new BlockDirectDrops(ToolType.PICKAXE));
    reg(Material.CARROT, new BlockCarrot(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.COCOA, new BlockCocoa(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.DEAD_BUSH, new BlockDeadBush(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.TALL_GRASS, new BlockTallGrass(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.RED_MUSHROOM_BLOCK, new BlockHugeMushroom(true), Sound.BLOCK_WOOD_BREAK);
    reg(Material.BROWN_MUSHROOM_BLOCK, new BlockHugeMushroom(false), Sound.BLOCK_WOOD_BREAK);
    regAll(Tag.LEAVES, new BlockLeaves(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.MELON, new BlockMelon(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.MELON_STEM, new BlockStem(Material.MELON_STEM), Sound.BLOCK_GRASS_BREAK);
    reg(Material.NETHER_WART, new BlockNetherWart(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.POTATO, new BlockPotato(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.PUMPKIN_STEM, new BlockStem(Material.PUMPKIN_STEM), Sound.BLOCK_GRASS_BREAK);
    reg(Material.WHEAT, new BlockCrops(), Sound.BLOCK_GRASS_BREAK);
    reg(Material.CAKE, new BlockDropless(), Sound.BLOCK_WOOL_BREAK);
    reg(Material.COBWEB, new BlockWeb());
    reg(Material.FIRE, new BlockFire());
    reg(Material.END_PORTAL_FRAME, new BlockEnderPortalFrame());
    regAll(MaterialTags.WOODEN_GATES, new BlockFenceGate());
    regAll(Tag.TRAPDOORS, new BlockWoodenTrapDoor(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.IRON_TRAPDOOR, new BlockIronTrapDoor());
    reg(Material.FURNACE, new BlockFurnace());
    reg(Material.LEVER, new BlockLever());
    reg(Material.HOPPER, new BlockHopper());
    reg(Material.PISTON, new BlockPiston(false));
    reg(Material.STICKY_PISTON, new BlockPiston(true));
    regAll(Tag.WOODEN_STAIRS, new BlockStairs(), Sound.BLOCK_WOOD_BREAK);
    regAll(Sets.difference(Tag.STAIRS.getValues(), Tag.WOODEN_STAIRS.getValues()), new BlockStairs());
    regAll(Tag.WOODEN_SLABS, new BlockSlab(), Sound.BLOCK_WOOD_BREAK);
    regAll(Sets.difference(Tag.SLABS.getValues(), Tag.WOODEN_SLABS.getValues()), new BlockSlab());
    reg(Material.HAY_BLOCK, new BlockHay());
    reg(Material.QUARTZ_BLOCK, new BlockQuartz());
    regAll(Tag.LOGS, new BlockLog(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.LADDER, new BlockLadder(), Sound.BLOCK_WOOD_BREAK);
    reg(Material.VINE, new BlockVine());
    reg(Material.STONE_BUTTON, new BlockButton(Material.STONE_BUTTON));
    regAll(Tag.WOODEN_BUTTONS, BlockButton::new, Sound.BLOCK_WOOD_BREAK);
    regAll(MaterialTags.BEDS, new BlockBed());
    regAll(MaterialTags.SKULLS, new BlockSkull());
    reg(Material.TORCH, new BlockTorch());
    reg(Material.LIGHT_WEIGHTED_PRESSURE_PLATE, new BlockDirectDrops(Material.LIGHT_WEIGHTED_PRESSURE_PLATE, ToolType.PICKAXE));
    reg(Material.HEAVY_WEIGHTED_PRESSURE_PLATE, new BlockDirectDrops(Material.HEAVY_WEIGHTED_PRESSURE_PLATE, ToolType.PICKAXE));
    reg(Material.STONE_PRESSURE_PLATE, new BlockDirectDrops(Material.STONE_PRESSURE_PLATE, ToolType.PICKAXE));
    reg(Material.DAYLIGHT_DETECTOR, new BlockDaylightDetector());
    regAll(Tag.FLOWERS, new BlockNeedsAttached());
    reg(Material.BROWN_MUSHROOM, new BlockMushroom(Material.BROWN_MUSHROOM));
    reg(Material.RED_MUSHROOM, new BlockMushroom(Material.RED_MUSHROOM));
    reg(Material.SUGAR_CANE, new BlockSugarCane(), Sound.BLOCK_GRASS_BREAK);
    regAll(Tag.SAPLINGS, new BlockSapling());
    reg(Material.RAIL, new BlockRails());
    reg(Material.ACTIVATOR_RAIL, new BlockRails());
    reg(Material.DETECTOR_RAIL, new BlockRails());
    reg(Material.POWERED_RAIL, new BlockRails());
    regAll(Tag.CARPETS, new BlockCarpet(), Sound.BLOCK_WOOL_BREAK);
    reg(Material.ENCHANTING_TABLE, new BlockEnchantmentTable());
    reg(Material.BREWING_STAND, new BlockBrewingStand());
    reg(Material.CACTUS, new BlockCactus());
    reg(Material.WATER, new BlockWater());
    reg(Material.LAVA, new BlockLava());
    reg(Material.CAULDRON, new BlockCauldron());
    reg(Material.SPONGE, new BlockSponge());
    reg(Material.TNT, new BlockTnt());
    // TODO: Convert
    reg(Material.LEGACY_DOUBLE_PLANT, new BlockDoublePlant());
    reg(Material.PUMPKIN, new BlockPumpkin());
    reg(Material.JACK_O_LANTERN, new BlockPumpkinBase(Material.JACK_O_LANTERN));
    reg(Material.SEA_LANTERN, new BlockRandomDrops(Material.PRISMARINE_CRYSTALS, 2, 3));
    reg(Material.REDSTONE_LAMP, new BlockLamp());
    reg(Material.REDSTONE_WIRE, new BlockRedstone());
    reg(Material.REDSTONE_TORCH, new BlockRedstoneTorch());
    reg(Material.REPEATER, new BlockRedstoneRepeater());
    reg(Material.MAGMA_BLOCK, new BlockMagma());
    reg(Material.NETHER_WART_BLOCK, new BlockDirectDrops(Material.NETHER_WART_BLOCK, ToolType.AXE));
    reg(Material.RED_NETHER_BRICKS, new BlockDirectDrops(Material.RED_NETHER_BRICKS, ToolType.PICKAXE));
    reg(Material.BONE_BLOCK, new BlockDirectDrops(Material.BONE_BLOCK, ToolType.PICKAXE));
    reg(Material.OBSERVER, new BlockObserver());
    reg(Material.COMPARATOR, new BlockRedstoneComparator());
    reg(Material.BEACON, new BlockBeacon());
    reg(Material.PURPUR_PILLAR, new BlockPurpurPillar());
    reg(Material.PURPUR_BLOCK, new BlockDirectDrops(Material.PURPUR_BLOCK, ToolType.PICKAXE));
    reg(Material.END_ROD, new BlockEndRod());
    regAll(MaterialTags.CONCRETES, BlockDirectDrops::new);
    regAll(MaterialTags.CONCRETE_POWDER, new BlockConcretePowder());
    regAll(MaterialTags.GLAZED_TERRACOTTA, BlockDirectDrops::new);
    reg(Material.CHORUS_FLOWER, new BlockChorusFlower());
    reg(Material.CHORUS_PLANT, new BlockChorusPlant());
    reg(Material.GRASS_PATH, new BlockGrassPath(), Sound.BLOCK_GRASS_BREAK);
    // Non-block and ItemPlaceAs items:
    reg(Material.FLINT_AND_STEEL, new ItemFlintAndSteel());
    regAll(Tag.SIGNS, new ItemSign());
    reg(Material.REDSTONE, new ItemPlaceAs(Material.REDSTONE_WIRE));
    reg(Material.BREWING_STAND, new ItemPlaceAs(Material.BREWING_STAND));
    reg(Material.CAULDRON, new ItemPlaceAs(Material.CAULDRON));
    reg(Material.FLOWER_POT, new ItemPlaceAs(Material.FLOWER_POT));
    regAll(MaterialTags.SKULLS, ItemPlaceAs::new);
    reg(Material.BUCKET, new ItemBucket());
    reg(Material.WATER_BUCKET, new ItemFilledBucket(Material.WATER));
    reg(Material.LAVA_BUCKET, new ItemFilledBucket(Material.LAVA));
    reg(Material.WOODEN_HOE, new ItemHoe());
    reg(Material.STONE_HOE, new ItemHoe());
    reg(Material.IRON_HOE, new ItemHoe());
    reg(Material.GOLDEN_HOE, new ItemHoe());
    reg(Material.DIAMOND_HOE, new ItemHoe());
    reg(Material.WOODEN_SHOVEL, new ItemShovel());
    reg(Material.STONE_SHOVEL, new ItemShovel());
    reg(Material.IRON_SHOVEL, new ItemShovel());
    reg(Material.GOLDEN_SHOVEL, new ItemShovel());
    reg(Material.DIAMOND_SHOVEL, new ItemShovel());
    regAll(MaterialTags.SPAWN_EGGS, new ItemSpawn());
    reg(Material.WHEAT_SEEDS, new ItemSeeds(Material.WHEAT, Material.FARMLAND));
    reg(Material.MELON_SEEDS, new ItemSeeds(Material.MELON_STEM, Material.FARMLAND));
    reg(Material.PUMPKIN_SEEDS, new ItemSeeds(Material.PUMPKIN_STEM, Material.FARMLAND));
    reg(Material.NETHER_WART, new ItemSeeds(Material.NETHER_WART, Material.SOUL_SAND));
    reg(Material.CARROT, new ItemFoodSeeds(Material.CARROT, Material.FARMLAND, 3, 3.6f));
    reg(Material.POTATO, new ItemFoodSeeds(Material.POTATO, Material.FARMLAND, 1, 0.6f));
    reg(Material.INK_SAC, new ItemDye());
    regAll(Tag.BANNERS, new ItemBanner());
    reg(Material.IRON_DOOR, new ItemPlaceAs(Material.IRON_DOOR));
    reg(Material.WRITTEN_BOOK, new ItemWrittenBook());
    reg(Material.ITEM_FRAME, new ItemItemFrame());
    reg(Material.APPLE, new ItemFood(4, 2.4f));
    reg(Material.BAKED_POTATO, new ItemFood(5, 6f));
    reg(Material.BREAD, new ItemFood(5, 6f));
    reg(Material.COOKED_CHICKEN, new ItemFood(6, 7.2f));
    reg(Material.COOKED_COD, new ItemFishCooked());
    reg(Material.COOKED_SALMON, new ItemFishCooked());
    reg(Material.COOKED_MUTTON, new ItemFood(6, 9.6f));
    reg(Material.COOKED_BEEF, new ItemFood(8, 12.8f));
    reg(Material.COOKED_RABBIT, new ItemFood(5, 6f));
    reg(Material.COOKIE, new ItemFood(2, 0.4f));
    reg(Material.GOLDEN_APPLE, new ItemGoldenApple());
    reg(Material.GOLDEN_CARROT, new ItemFood(6, 14.4f));
    reg(Material.COOKED_PORKCHOP, new ItemFood(8, 12.8f));
    reg(Material.MELON, new ItemFood(2, 1.2f));
    reg(Material.BEETROOT, new ItemFood(1, 1.2f));
    reg(Material.BEETROOT_SOUP, new ItemSoup(6, 7.2f));
    reg(Material.MUSHROOM_STEW, new ItemSoup(6, 7.2f));
    reg(Material.POISONOUS_POTATO, new ItemPoisonousPotato());
    reg(Material.PUMPKIN_PIE, new ItemFood(8, 4.8f));
    reg(Material.RABBIT_STEW, new ItemSoup(10, 12f));
    reg(Material.BEEF, new ItemFood(3, 1.8f));
    reg(Material.CHICKEN, new ItemRawChicken());
    reg(Material.COD, new ItemFishRaw());
    reg(Material.SALMON, new ItemFishRaw());
    reg(Material.MUTTON, new ItemFood(2, 1.2f));
    reg(Material.PORKCHOP, new ItemFood(3, 1.8f));
    reg(Material.RABBIT, new ItemFood(3, 1.8f));
    reg(Material.ROTTEN_FLESH, new ItemRottenFlesh());
    reg(Material.SPIDER_EYE, new ItemSpiderEye());
    reg(Material.CHORUS_FRUIT, new ItemChorusFruit());
    reg(Material.ARMOR_STAND, new ItemArmorStand());
    reg(Material.MILK_BUCKET, new ItemMilk());
    reg(Material.MINECART, new ItemMinecart(GlowMinecart.MinecartType.RIDEABLE));
    reg(Material.COMMAND_BLOCK_MINECART, new ItemMinecart(GlowMinecart.MinecartType.COMMAND));
    reg(Material.TNT_MINECART, new ItemMinecart(GlowMinecart.MinecartType.TNT));
    reg(Material.HOPPER_MINECART, new ItemMinecart(GlowMinecart.MinecartType.HOPPER));
    reg(Material.FURNACE_MINECART, new ItemMinecart(GlowMinecart.MinecartType.FURNACE));
    reg(Material.CHEST_MINECART, new ItemMinecart(GlowMinecart.MinecartType.CHEST));
    reg(Material.SNOWBALL, new ItemSnowball());
    reg(Material.EGG, new ItemEgg());
    reg(Material.BOW, new ItemBow());
    reg(Material.EXPERIENCE_BOTTLE, new ItemExperienceBottle());
    reg(Material.END_CRYSTAL, new ItemEndCrystal());
    reg(Material.OAK_BOAT, new ItemBoat(TreeSpecies.GENERIC));
    reg(Material.SPRUCE_BOAT, new ItemBoat(TreeSpecies.REDWOOD));
    reg(Material.BIRCH_BOAT, new ItemBoat(TreeSpecies.BIRCH));
    reg(Material.JUNGLE_BOAT, new ItemBoat(TreeSpecies.JUNGLE));
    reg(Material.ACACIA_BOAT, new ItemBoat(TreeSpecies.ACACIA));
    reg(Material.DARK_OAK_BOAT, new ItemBoat(TreeSpecies.DARK_OAK));
    reg(Material.PAINTING, new ItemPainting());
    reg(Material.FIREWORK_ROCKET, new ItemFirework());
    reg(Material.ENDER_PEARL, new ItemEnderPearl());
    reg(Material.KNOWLEDGE_BOOK, new ItemKnowledgeBook());
    reg(Material.FISHING_ROD, new ItemFishingRod());
}
Also used : BlockChorusFlower(net.glowstone.block.blocktype.BlockChorusFlower) BlockOre(net.glowstone.block.blocktype.BlockOre) BlockStairs(net.glowstone.block.blocktype.BlockStairs) BlockRedstone(net.glowstone.block.blocktype.BlockRedstone) BlockFalling(net.glowstone.block.blocktype.BlockFalling) BlockDoublePlant(net.glowstone.block.blocktype.BlockDoublePlant) BlockMobSpawner(net.glowstone.block.blocktype.BlockMobSpawner) BlockDirectDrops(net.glowstone.block.blocktype.BlockDirectDrops) ItemBoat(net.glowstone.block.itemtype.ItemBoat) BlockDropper(net.glowstone.block.blocktype.BlockDropper) BlockFenceGate(net.glowstone.block.blocktype.BlockFenceGate) BlockHugeMushroom(net.glowstone.block.blocktype.BlockHugeMushroom) BlockWoodenTrapDoor(net.glowstone.block.blocktype.BlockWoodenTrapDoor) BlockHopper(net.glowstone.block.blocktype.BlockHopper) BlockConcretePowder(net.glowstone.block.blocktype.BlockConcretePowder) BlockSkull(net.glowstone.block.blocktype.BlockSkull) ItemFishingRod(net.glowstone.block.itemtype.ItemFishingRod) BlockPiston(net.glowstone.block.blocktype.BlockPiston) BlockPumpkinBase(net.glowstone.block.blocktype.BlockPumpkinBase) ItemSnowball(net.glowstone.block.itemtype.ItemSnowball) ItemFirework(net.glowstone.block.itemtype.ItemFirework) BlockStone(net.glowstone.block.blocktype.BlockStone) BlockFire(net.glowstone.block.blocktype.BlockFire) ItemSpawn(net.glowstone.block.itemtype.ItemSpawn) ItemFilledBucket(net.glowstone.block.itemtype.ItemFilledBucket) ItemFood(net.glowstone.block.itemtype.ItemFood) BlockLeaves(net.glowstone.block.blocktype.BlockLeaves) BlockMycel(net.glowstone.block.blocktype.BlockMycel) BlockSlab(net.glowstone.block.blocktype.BlockSlab) BlockPotato(net.glowstone.block.blocktype.BlockPotato) BlockMelon(net.glowstone.block.blocktype.BlockMelon) BlockCactus(net.glowstone.block.blocktype.BlockCactus) BlockNeedsAttached(net.glowstone.block.blocktype.BlockNeedsAttached) BlockRedstoneComparator(net.glowstone.block.blocktype.BlockRedstoneComparator) ItemMinecart(net.glowstone.block.itemtype.ItemMinecart) BlockDeadBush(net.glowstone.block.blocktype.BlockDeadBush) BlockSponge(net.glowstone.block.blocktype.BlockSponge) ItemGoldenApple(net.glowstone.block.itemtype.ItemGoldenApple) BlockChorusPlant(net.glowstone.block.blocktype.BlockChorusPlant) BlockRedstoneTorch(net.glowstone.block.blocktype.BlockRedstoneTorch) BlockEndRod(net.glowstone.block.blocktype.BlockEndRod) ItemHoe(net.glowstone.block.itemtype.ItemHoe) ItemChorusFruit(net.glowstone.block.itemtype.ItemChorusFruit) BlockCarpet(net.glowstone.block.blocktype.BlockCarpet) BlockBeacon(net.glowstone.block.blocktype.BlockBeacon) ItemRottenFlesh(net.glowstone.block.itemtype.ItemRottenFlesh) BlockGravel(net.glowstone.block.blocktype.BlockGravel) ItemArmorStand(net.glowstone.block.itemtype.ItemArmorStand) BlockDaylightDetector(net.glowstone.block.blocktype.BlockDaylightDetector) BlockBrewingStand(net.glowstone.block.blocktype.BlockBrewingStand) BlockChest(net.glowstone.block.blocktype.BlockChest) BlockGrass(net.glowstone.block.blocktype.BlockGrass) ItemExperienceBottle(net.glowstone.block.itemtype.ItemExperienceBottle) BlockJukebox(net.glowstone.block.blocktype.BlockJukebox) ItemPainting(net.glowstone.block.itemtype.ItemPainting) ItemDye(net.glowstone.block.itemtype.ItemDye) BlockTorch(net.glowstone.block.blocktype.BlockTorch) BlockLever(net.glowstone.block.blocktype.BlockLever) BlockEnderPortalFrame(net.glowstone.block.blocktype.BlockEnderPortalFrame) BlockRails(net.glowstone.block.blocktype.BlockRails) BlockRedstoneOre(net.glowstone.block.blocktype.BlockRedstoneOre) BlockRedstoneRepeater(net.glowstone.block.blocktype.BlockRedstoneRepeater) ItemFlintAndSteel(net.glowstone.block.itemtype.ItemFlintAndSteel) ItemFishCooked(net.glowstone.block.itemtype.ItemFishCooked) BlockEnchantmentTable(net.glowstone.block.blocktype.BlockEnchantmentTable) BlockCrops(net.glowstone.block.blocktype.BlockCrops) BlockLava(net.glowstone.block.blocktype.BlockLava) BlockAnvil(net.glowstone.block.blocktype.BlockAnvil) ItemEgg(net.glowstone.block.itemtype.ItemEgg) BlockIronTrapDoor(net.glowstone.block.blocktype.BlockIronTrapDoor) BlockLamp(net.glowstone.block.blocktype.BlockLamp) ItemEndCrystal(net.glowstone.block.itemtype.ItemEndCrystal) ItemSeeds(net.glowstone.block.itemtype.ItemSeeds) BlockNote(net.glowstone.block.blocktype.BlockNote) BlockDropless(net.glowstone.block.blocktype.BlockDropless) BlockSnowBlock(net.glowstone.block.blocktype.BlockSnowBlock) BlockSapling(net.glowstone.block.blocktype.BlockSapling) ItemSign(net.glowstone.block.itemtype.ItemSign) BlockWeb(net.glowstone.block.blocktype.BlockWeb) ItemFoodSeeds(net.glowstone.block.itemtype.ItemFoodSeeds) BlockCarrot(net.glowstone.block.blocktype.BlockCarrot) BlockStem(net.glowstone.block.blocktype.BlockStem) BlockNetherWart(net.glowstone.block.blocktype.BlockNetherWart) BlockLog(net.glowstone.block.blocktype.BlockLog) BlockPurpurPillar(net.glowstone.block.blocktype.BlockPurpurPillar) ItemWrittenBook(net.glowstone.block.itemtype.ItemWrittenBook) BlockQuartz(net.glowstone.block.blocktype.BlockQuartz) BlockWater(net.glowstone.block.blocktype.BlockWater) BlockTnt(net.glowstone.block.blocktype.BlockTnt) ItemKnowledgeBook(net.glowstone.block.itemtype.ItemKnowledgeBook) BlockSign(net.glowstone.block.blocktype.BlockSign) BlockSugarCane(net.glowstone.block.blocktype.BlockSugarCane) BlockCauldron(net.glowstone.block.blocktype.BlockCauldron) BlockPumpkin(net.glowstone.block.blocktype.BlockPumpkin) BlockDispenser(net.glowstone.block.blocktype.BlockDispenser) ItemPoisonousPotato(net.glowstone.block.itemtype.ItemPoisonousPotato) BlockMagma(net.glowstone.block.blocktype.BlockMagma) ItemEnderPearl(net.glowstone.block.itemtype.ItemEnderPearl) BlockFarmland(net.glowstone.block.blocktype.BlockFarmland) ItemSoup(net.glowstone.block.itemtype.ItemSoup) BlockVine(net.glowstone.block.blocktype.BlockVine) ItemBanner(net.glowstone.block.itemtype.ItemBanner) BlockEnderChest(net.glowstone.block.blocktype.BlockEnderChest) ItemPlaceAs(net.glowstone.block.itemtype.ItemPlaceAs) BlockRandomDrops(net.glowstone.block.blocktype.BlockRandomDrops) BlockButton(net.glowstone.block.blocktype.BlockButton) BlockLadder(net.glowstone.block.blocktype.BlockLadder) ItemBow(net.glowstone.block.itemtype.ItemBow) BlockHay(net.glowstone.block.blocktype.BlockHay) BlockDoor(net.glowstone.block.blocktype.BlockDoor) ItemShovel(net.glowstone.block.itemtype.ItemShovel) BlockFence(net.glowstone.block.blocktype.BlockFence) BlockGrassPath(net.glowstone.block.blocktype.BlockGrassPath) BlockMushroom(net.glowstone.block.blocktype.BlockMushroom) BlockSnow(net.glowstone.block.blocktype.BlockSnow) BlockFurnace(net.glowstone.block.blocktype.BlockFurnace) BlockIce(net.glowstone.block.blocktype.BlockIce) ItemRawChicken(net.glowstone.block.itemtype.ItemRawChicken) BlockWorkbench(net.glowstone.block.blocktype.BlockWorkbench) BlockObserver(net.glowstone.block.blocktype.BlockObserver) BlockCocoa(net.glowstone.block.blocktype.BlockCocoa) ItemMilk(net.glowstone.block.itemtype.ItemMilk) BlockBed(net.glowstone.block.blocktype.BlockBed) ItemItemFrame(net.glowstone.block.itemtype.ItemItemFrame) ItemBucket(net.glowstone.block.itemtype.ItemBucket) BlockFlowerPot(net.glowstone.block.blocktype.BlockFlowerPot) BlockTallGrass(net.glowstone.block.blocktype.BlockTallGrass) ItemFishRaw(net.glowstone.block.itemtype.ItemFishRaw) BlockMonsterEgg(net.glowstone.block.blocktype.BlockMonsterEgg) BlockDirt(net.glowstone.block.blocktype.BlockDirt) ItemSpiderEye(net.glowstone.block.itemtype.ItemSpiderEye)

Example 2 with ItemFood

use of net.glowstone.block.itemtype.ItemFood in project Glowstone by GlowstoneMC.

the class GlowPlayer method pulse.

@Override
public void pulse() {
    super.pulse();
    incrementStatistic(Statistic.TIME_SINCE_DEATH);
    if (usageItem != null) {
        if (usageItem.equals(getItemInHand())) {
            // todo: implement offhand
            if (--usageTime == 0) {
                ItemType item = ItemTable.instance().getItem(usageItem.getType());
                if (item instanceof ItemFood) {
                    ((ItemFood) item).eat(this, usageItem);
                }
            }
        } else {
            usageItem = null;
            usageTime = 0;
        }
    }
    if (digging != null) {
        pulseDigging();
    }
    if (exhaustion > 4.0f) {
        exhaustion -= 4.0f;
        if (saturation > 0f) {
            saturation = Math.max(saturation - 1f, 0f);
            sendHealth();
        } else if (world.getDifficulty() != Difficulty.PEACEFUL) {
            FoodLevelChangeEvent event = EventFactory.getInstance().callEvent(new FoodLevelChangeEvent(this, Math.max(foodLevel - 1, 0)));
            if (!event.isCancelled()) {
                foodLevel = event.getFoodLevel();
            }
            sendHealth();
        }
    }
    if (getHealth() < getMaxHealth() && !isDead()) {
        if (foodLevel >= 18 && ticksLived % 80 == 0 || world.getDifficulty() == Difficulty.PEACEFUL) {
            EntityUtils.heal(this, 1, EntityRegainHealthEvent.RegainReason.SATIATED);
            exhaustion = Math.min(exhaustion + 3.0f, 40.0f);
            saturation -= 3;
        }
    }
    // Process food level and starvation based on difficulty.
    switch(world.getDifficulty()) {
        case PEACEFUL:
            {
                if (foodLevel < 20 && ticksLived % 20 == 0) {
                    foodLevel++;
                }
                break;
            }
        case EASY:
            {
                if (foodLevel == 0 && getHealth() > 10 && ticksLived % 80 == 0) {
                    damage(1, DamageCause.STARVATION);
                }
                break;
            }
        case NORMAL:
            {
                if (foodLevel == 0 && getHealth() > 1 && ticksLived % 80 == 0) {
                    damage(1, DamageCause.STARVATION);
                }
                break;
            }
        case HARD:
            {
                if (foodLevel == 0 && ticksLived % 80 == 0) {
                    damage(1, DamageCause.STARVATION);
                }
                break;
            }
        default:
            {
            // Do nothing when there are other game difficulties.
            }
    }
    // process ender pearl cooldown, decrease by 1 every game tick.
    if (enderPearlCooldown > 0) {
        enderPearlCooldown--;
    }
    // stream world
    streamBlocks();
    processBlockChanges();
    // add to playtime (despite inaccurate name, this counts ticks rather than minutes)
    incrementStatistic(Statistic.PLAY_ONE_MINUTE);
    if (isSneaking()) {
        incrementStatistic(Statistic.SNEAK_TIME);
    }
    // update inventory
    for (InventoryMonitor.Entry entry : invMonitor.getChanges()) {
        sendItemChange(entry.slot, entry.item);
    }
    // send changed metadata
    List<MetadataMap.Entry> changes = metadata.getChanges();
    if (!changes.isEmpty()) {
        session.send(new EntityMetadataMessage(getEntityId(), changes));
    }
    // Entity IDs are only unique per world, so we can't spawn or teleport between worlds while
    // updating them.
    worldLock.writeLock().lock();
    try {
        // update or remove entities
        List<GlowEntity> destroyEntities = new LinkedList<>();
        for (Iterator<GlowEntity> it = knownEntities.iterator(); it.hasNext(); ) {
            GlowEntity entity = it.next();
            if (!isWithinDistance(entity) || entity.isRemoved()) {
                destroyEntities.add(entity);
            } else {
                entity.createUpdateMessage(session).forEach(session::send);
            }
        }
        if (!destroyEntities.isEmpty()) {
            List<Integer> destroyIds = new ArrayList<>(destroyEntities.size());
            for (GlowEntity entity : destroyEntities) {
                knownEntities.remove(entity);
                destroyIds.add(entity.getEntityId());
            }
            session.send(new DestroyEntitiesMessage(destroyIds));
        }
        // add entities
        knownChunks.forEach(key -> world.getChunkAt(key.getX(), key.getZ()).getRawEntities().stream().filter(entity -> this != entity && isWithinDistance(entity) && !entity.isDead() && !knownEntities.contains(entity) && !hiddenEntities.contains(entity.getUniqueId())).forEach((entity) -> Bukkit.getScheduler().runTaskAsynchronously(null, () -> {
            worldLock.readLock().lock();
            try {
                knownEntities.add(entity);
            } finally {
                worldLock.readLock().unlock();
            }
            entity.createSpawnMessage().forEach(session::send);
            entity.createAfterSpawnMessage(session).forEach(session::send);
        })));
    } finally {
        worldLock.writeLock().unlock();
    }
    if (passengerChanged) {
        session.send(new SetPassengerMessage(getEntityId(), getPassengers().stream().mapToInt(Entity::getEntityId).toArray()));
    }
    getAttributeManager().sendMessages(session);
    GlowFishingHook hook = currentFishingHook.get();
    if (hook != null) {
        // bobber, or if the player stops holding a fishing rod.
        if (getInventory().getItemInMainHand().getType() != Material.FISHING_ROD && getInventory().getItemInOffHand().getType() != Material.FISHING_ROD) {
            setCurrentFishingHook(null);
        }
        if (hook.location.distanceSquared(location) > HOOK_MAX_DISTANCE * HOOK_MAX_DISTANCE) {
            setCurrentFishingHook(null);
        }
    }
}
Also used : DestroyEntitiesMessage(net.glowstone.net.message.play.entity.DestroyEntitiesMessage) GlowBlock(net.glowstone.block.GlowBlock) PlayerPortalEvent(org.bukkit.event.player.PlayerPortalEvent) GlowTeam(net.glowstone.scoreboard.GlowTeam) PlayerStatisticIncrementEvent(org.bukkit.event.player.PlayerStatisticIncrementEvent) Entry(net.glowstone.net.message.play.game.UserListItemMessage.Entry) TitleMessage(net.glowstone.net.message.play.game.TitleMessage) MaterialData(org.bukkit.material.MaterialData) Location(org.bukkit.Location) Map(java.util.Map) PlayerToggleSneakEvent(org.bukkit.event.player.PlayerToggleSneakEvent) EntityAnimation(org.bukkit.EntityAnimation) GlowWorld(net.glowstone.GlowWorld) GlowInventory(net.glowstone.inventory.GlowInventory) Position(net.glowstone.util.Position) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage) Entity(org.bukkit.entity.Entity) GlowEffect(net.glowstone.constants.GlowEffect) MainHand(org.bukkit.inventory.MainHand) OpenWindowMessage(net.glowstone.net.message.play.inv.OpenWindowMessage) BlockVector(org.bukkit.util.BlockVector) Advancement(org.bukkit.advancement.Advancement) InventoryView(org.bukkit.inventory.InventoryView) InventoryOpenEvent(org.bukkit.event.inventory.InventoryOpenEvent) ChunkLock(net.glowstone.chunk.ChunkManager.ChunkLock) PlayerUnregisterChannelEvent(org.bukkit.event.player.PlayerUnregisterChannelEvent) Convert(net.glowstone.util.Convert) BoundingBox(org.bukkit.util.BoundingBox) BlockBreakAnimationMessage(net.glowstone.net.message.play.game.BlockBreakAnimationMessage) WindowPropertyMessage(net.glowstone.net.message.play.inv.WindowPropertyMessage) UpdateBlockEntityMessage(net.glowstone.net.message.play.game.UpdateBlockEntityMessage) RespawnMessage(net.glowstone.net.message.play.game.RespawnMessage) EntityUtils(net.glowstone.util.EntityUtils) GameRules(net.glowstone.constants.GameRules) PlayerLocaleChangeEvent(org.bukkit.event.player.PlayerLocaleChangeEvent) SoundCategory(org.bukkit.SoundCategory) EventFactory(net.glowstone.EventFactory) EntityVelocityMessage(net.glowstone.net.message.play.entity.EntityVelocityMessage) BossBar(org.bukkit.boss.BossBar) PlayerLevelChangeEvent(org.bukkit.event.player.PlayerLevelChangeEvent) PlayerResourcePackStatusEvent(org.bukkit.event.player.PlayerResourcePackStatusEvent) PositionRotationMessage(net.glowstone.net.message.play.game.PositionRotationMessage) HealthMessage(net.glowstone.net.message.play.game.HealthMessage) PluginMessage(net.glowstone.net.message.play.game.PluginMessage) Preconditions(com.google.common.base.Preconditions) Plugin(org.bukkit.plugin.Plugin) StatusFlags(net.glowstone.entity.meta.MetadataIndex.StatusFlags) ByteBufAllocator(io.netty.buffer.ByteBufAllocator) SetWindowSlotMessage(net.glowstone.net.message.play.inv.SetWindowSlotMessage) Player(org.bukkit.entity.Player) PlayEffectMessage(net.glowstone.net.message.play.game.PlayEffectMessage) BlockChangeMessage(net.glowstone.net.message.play.game.BlockChangeMessage) Unpooled(io.netty.buffer.Unpooled) GlowWorldBorder(net.glowstone.GlowWorldBorder) Scoreboard(org.bukkit.scoreboard.Scoreboard) Merchant(org.bukkit.inventory.Merchant) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) Locale(java.util.Locale) Instrument(org.bukkit.Instrument) Recipe(org.bukkit.inventory.Recipe) DamageCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause) GlowChunk(net.glowstone.chunk.GlowChunk) Collection(java.util.Collection) Property(org.bukkit.inventory.InventoryView.Property) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) BanList(org.bukkit.BanList) Reason(net.glowstone.net.message.play.game.StateChangeMessage.Reason) UUID(java.util.UUID) MultiBlockChangeMessage(net.glowstone.net.message.play.game.MultiBlockChangeMessage) UnloadChunkMessage(net.glowstone.net.message.play.game.UnloadChunkMessage) EntityType(org.bukkit.entity.EntityType) Collectors(java.util.stream.Collectors) StateChangeMessage(net.glowstone.net.message.play.game.StateChangeMessage) Villager(org.bukkit.entity.Villager) Objects(java.util.Objects) ComponentSerializer(net.md_5.bungee.chat.ComponentSerializer) PlayerExpChangeEvent(org.bukkit.event.player.PlayerExpChangeEvent) Queue(java.util.Queue) BlockBed(net.glowstone.block.blocktype.BlockBed) Title(com.destroystokyo.paper.Title) GlowServer.logger(net.glowstone.GlowServer.logger) InventoryUtil(net.glowstone.util.InventoryUtil) Level(java.util.logging.Level) HashSet(java.util.HashSet) GameMode(org.bukkit.GameMode) Environment(org.bukkit.World.Environment) ImmutableList(com.google.common.collect.ImmutableList) TickUtil(net.glowstone.util.TickUtil) ClientSettings(net.glowstone.entity.meta.ClientSettings) AsyncPlayerChatEvent(org.bukkit.event.player.AsyncPlayerChatEvent) MapView(org.bukkit.map.MapView) LinkedList(java.util.LinkedList) SpawnPositionMessage(net.glowstone.net.message.play.game.SpawnPositionMessage) WeatherType(org.bukkit.WeatherType) ExperienceMessage(net.glowstone.net.message.play.game.ExperienceMessage) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) GlowParticle(net.glowstone.constants.GlowParticle) NamedSoundEffectMessage(net.glowstone.net.message.play.game.NamedSoundEffectMessage) ConcurrentLinkedDeque(java.util.concurrent.ConcurrentLinkedDeque) Particle(org.bukkit.Particle) ItemFood(net.glowstone.block.itemtype.ItemFood) ChatColor(org.bukkit.ChatColor) GlowFishingHook(net.glowstone.entity.passive.GlowFishingHook) UserListHeaderFooterMessage(net.glowstone.net.message.play.game.UserListHeaderFooterMessage) HeldItemMessage(net.glowstone.net.message.play.inv.HeldItemMessage) ItemTable(net.glowstone.block.ItemTable) GlowBoss(net.glowstone.entity.monster.GlowBoss) PlayerVelocityEvent(org.bukkit.event.player.PlayerVelocityEvent) MapDataMessage(net.glowstone.net.message.play.game.MapDataMessage) PlayerBedLeaveEvent(org.bukkit.event.player.PlayerBedLeaveEvent) StopSoundMessage(net.glowstone.net.message.play.game.StopSoundMessage) World(org.bukkit.World) CloseWindowMessage(net.glowstone.net.message.play.inv.CloseWindowMessage) ChunkDataMessage(net.glowstone.net.message.play.game.ChunkDataMessage) Material(org.bukkit.Material) GlowInventoryView(net.glowstone.inventory.GlowInventoryView) BlockData(org.bukkit.block.data.BlockData) Set(java.util.Set) DelegateDeserialization(org.bukkit.configuration.serialization.DelegateDeserialization) ToolType(net.glowstone.inventory.ToolType) StandardCharsets(java.nio.charset.StandardCharsets) ItemStack(org.bukkit.inventory.ItemStack) ClientOption(com.destroystokyo.paper.ClientOption) MetadataIndex(net.glowstone.entity.meta.MetadataIndex) Action(net.glowstone.net.message.play.game.TitleMessage.Action) GlowOfflinePlayer(net.glowstone.GlowOfflinePlayer) InventoryMonitor(net.glowstone.inventory.InventoryMonitor) PlayerChangedMainHandEvent(org.bukkit.event.player.PlayerChangedMainHandEvent) Tag(org.bukkit.Tag) TimeMessage(net.glowstone.net.message.play.game.TimeMessage) Message(com.flowpowered.network.Message) PlayerRespawnEvent(org.bukkit.event.player.PlayerRespawnEvent) ArrayList(java.util.ArrayList) PlayerRegisterChannelEvent(org.bukkit.event.player.PlayerRegisterChannelEvent) BaseComponent(net.md_5.bungee.api.chat.BaseComponent) ProfileCache(net.glowstone.entity.meta.profile.ProfileCache) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) SetWindowContentsMessage(net.glowstone.net.message.play.inv.SetWindowContentsMessage) PlayParticleMessage(net.glowstone.net.message.play.game.PlayParticleMessage) Nullable(javax.annotation.Nullable) ResourcePackSendMessage(net.glowstone.net.message.play.player.ResourcePackSendMessage) TeleportCause(org.bukkit.event.player.PlayerTeleportEvent.TeleportCause) EntityRegainHealthEvent(org.bukkit.event.entity.EntityRegainHealthEvent) PlayerToggleSprintEvent(org.bukkit.event.player.PlayerToggleSprintEvent) Vector(org.bukkit.util.Vector) DyeColor(org.bukkit.DyeColor) Firework(org.bukkit.entity.Firework) PlayerProfile(com.destroystokyo.paper.profile.PlayerProfile) Enchantment(org.bukkit.enchantments.Enchantment) Statistic(org.bukkit.Statistic) Projectile(org.bukkit.entity.Projectile) PlayerBedEnterEvent(org.bukkit.event.player.PlayerBedEnterEvent) BlockFace(org.bukkit.block.BlockFace) Conversation(org.bukkit.conversations.Conversation) StatisticMap(net.glowstone.util.StatisticMap) Block(org.bukkit.block.Block) Difficulty(org.bukkit.Difficulty) DestroyEntitiesMessage(net.glowstone.net.message.play.entity.DestroyEntitiesMessage) PlayerReader(net.glowstone.io.PlayerDataService.PlayerReader) PlayerInventory(org.bukkit.inventory.PlayerInventory) SignEntity(net.glowstone.block.entity.SignEntity) Bukkit(org.bukkit.Bukkit) AdvancementProgress(org.bukkit.advancement.AdvancementProgress) JoinGameMessage(net.glowstone.net.message.play.game.JoinGameMessage) MaterialTags(com.destroystokyo.paper.MaterialTags) CreatureSpawnEvent(org.bukkit.event.entity.CreatureSpawnEvent) ChatMessageType(net.md_5.bungee.api.ChatMessageType) Sound(org.bukkit.Sound) InetSocketAddress(java.net.InetSocketAddress) List(java.util.List) JSONObject(org.json.simple.JSONObject) Key(net.glowstone.chunk.GlowChunk.Key) NotNull(org.jetbrains.annotations.NotNull) CompoundTag(net.glowstone.util.nbt.CompoundTag) ConversationAbandonedEvent(org.bukkit.conversations.ConversationAbandonedEvent) PlayerGameModeChangeEvent(org.bukkit.event.player.PlayerGameModeChangeEvent) PlayerRecipeMonitor(net.glowstone.inventory.crafting.PlayerRecipeMonitor) SignEditorMessage(net.glowstone.net.message.play.game.SignEditorMessage) Setter(lombok.Setter) SetPassengerMessage(net.glowstone.net.message.play.entity.SetPassengerMessage) GlowBlockEntity(net.glowstone.constants.GlowBlockEntity) Getter(lombok.Getter) MetadataMap(net.glowstone.entity.meta.MetadataMap) EntityAnimationMessage(net.glowstone.net.message.play.entity.EntityAnimationMessage) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Effect(org.bukkit.Effect) ByteBuf(io.netty.buffer.ByteBuf) Component(net.kyori.adventure.text.Component) GlowSession(net.glowstone.net.GlowSession) PlayerCommandPreprocessEvent(org.bukkit.event.player.PlayerCommandPreprocessEvent) GlowItem(net.glowstone.entity.objects.GlowItem) GlowMapCanvas(net.glowstone.map.GlowMapCanvas) GlowScoreboard(net.glowstone.scoreboard.GlowScoreboard) TextMessage(net.glowstone.util.TextMessage) Type(org.bukkit.Effect.Type) UpdateSignMessage(net.glowstone.net.message.play.game.UpdateSignMessage) StandardMessenger(org.bukkit.plugin.messaging.StandardMessenger) NamespacedKey(org.bukkit.NamespacedKey) Iterator(java.util.Iterator) ItemType(net.glowstone.block.itemtype.ItemType) GlowPlayerProfile(net.glowstone.entity.meta.profile.GlowPlayerProfile) PlayerDropItemEvent(org.bukkit.event.player.PlayerDropItemEvent) WorldType(org.bukkit.WorldType) UserListItemMessage(net.glowstone.net.message.play.game.UserListItemMessage) Note(org.bukkit.Note) FoodLevelChangeEvent(org.bukkit.event.entity.FoodLevelChangeEvent) PlayerTeleportEvent(org.bukkit.event.player.PlayerTeleportEvent) GlowSound(net.glowstone.constants.GlowSound) ChatMessage(net.glowstone.net.message.play.game.ChatMessage) Collections(java.util.Collections) PlayerChangedWorldEvent(org.bukkit.event.player.PlayerChangedWorldEvent) GlowFishingHook(net.glowstone.entity.passive.GlowFishingHook) SetPassengerMessage(net.glowstone.net.message.play.entity.SetPassengerMessage) ItemType(net.glowstone.block.itemtype.ItemType) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) ItemFood(net.glowstone.block.itemtype.ItemFood) Entry(net.glowstone.net.message.play.game.UserListItemMessage.Entry) InventoryMonitor(net.glowstone.inventory.InventoryMonitor) FoodLevelChangeEvent(org.bukkit.event.entity.FoodLevelChangeEvent) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage)

Aggregations

BlockBed (net.glowstone.block.blocktype.BlockBed)2 ItemFood (net.glowstone.block.itemtype.ItemFood)2 ClientOption (com.destroystokyo.paper.ClientOption)1 MaterialTags (com.destroystokyo.paper.MaterialTags)1 Title (com.destroystokyo.paper.Title)1 PlayerProfile (com.destroystokyo.paper.profile.PlayerProfile)1 Message (com.flowpowered.network.Message)1 Preconditions (com.google.common.base.Preconditions)1 Preconditions.checkArgument (com.google.common.base.Preconditions.checkArgument)1 Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)1 ImmutableList (com.google.common.collect.ImmutableList)1 ByteBuf (io.netty.buffer.ByteBuf)1 ByteBufAllocator (io.netty.buffer.ByteBufAllocator)1 Unpooled (io.netty.buffer.Unpooled)1 InetSocketAddress (java.net.InetSocketAddress)1 StandardCharsets (java.nio.charset.StandardCharsets)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1