mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-13 19:51:27 +01:00
Registry update
This commit is contained in:
parent
a2b36f56c0
commit
be36486285
@ -1,5 +1,6 @@
|
||||
package fr.themode.demo;
|
||||
|
||||
import fr.themode.demo.entity.ChickenCreature;
|
||||
import fr.themode.demo.generator.ChunkGeneratorDemo;
|
||||
import fr.themode.minestom.MinecraftServer;
|
||||
import fr.themode.minestom.entity.Entity;
|
||||
@ -78,8 +79,8 @@ public class PlayerInit {
|
||||
p.teleport(player.getPosition());
|
||||
}
|
||||
|
||||
//ChickenCreature chickenCreature = new ChickenCreature(player.getPosition());
|
||||
//chickenCreature.setInstance(player.getInstance());
|
||||
ChickenCreature chickenCreature = new ChickenCreature(player.getPosition());
|
||||
chickenCreature.setInstance(player.getInstance());
|
||||
|
||||
});
|
||||
|
||||
@ -112,7 +113,7 @@ public class PlayerInit {
|
||||
//itemEntity.remove();
|
||||
}*/
|
||||
|
||||
ItemStack item = new ItemStack(1, (byte) 43);
|
||||
ItemStack item = new ItemStack((short) 1, (byte) 43);
|
||||
item.setDisplayName("LE NOM DE L'ITEM");
|
||||
//item.getLore().add("lol le lore");
|
||||
player.getInventory().addItemStack(item);
|
||||
@ -125,7 +126,7 @@ public class PlayerInit {
|
||||
|
||||
player.openInventory(inventory);
|
||||
|
||||
player.getInventory().addItemStack(new ItemStack(1, (byte) 100));
|
||||
player.getInventory().addItemStack(new ItemStack((short) 1, (byte) 100));
|
||||
|
||||
/*TeamManager teamManager = Main.getTeamManager();
|
||||
Team team = teamManager.createTeam(getUsername());
|
||||
|
@ -76,6 +76,8 @@ public class MinecraftServer {
|
||||
|
||||
// Registry
|
||||
RegistryMain.registerBlocks();
|
||||
RegistryMain.registerItems();
|
||||
RegistryMain.registerEntities();
|
||||
|
||||
minecraftServer = new MinecraftServer();
|
||||
|
||||
|
@ -3,84 +3,119 @@ package fr.themode.minestom.entity;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
public enum EntityType {
|
||||
ARMOR_STAND(1), // Object
|
||||
BAT(3),
|
||||
BLAZE(4),
|
||||
CAT(6),
|
||||
CAVE_SPIDER(7),
|
||||
CHICKEN(8),
|
||||
COD(9),
|
||||
COW(10),
|
||||
CREEPER(11),
|
||||
DONKEY(12),
|
||||
DOLPHIN(13),
|
||||
DROWNED(15),
|
||||
ELDER_GUARDIAN(16),
|
||||
ENDER_DRAGON(18),
|
||||
ENDERMAN(19),
|
||||
ENDERMITE(20),
|
||||
EVOKER(22),
|
||||
FOX(27),
|
||||
GHAST(28),
|
||||
GIANT(29),
|
||||
GUARDIAN(30),
|
||||
HORSE(31),
|
||||
HUSK(32),
|
||||
ILLUSIONER(33),
|
||||
LLAMA(38),
|
||||
MAGMA_CUBE(40),
|
||||
MULE(48),
|
||||
MOOSHROOM(49),
|
||||
OCELOT(50),
|
||||
PANDA(52),
|
||||
PARROT(53),
|
||||
PIG(54),
|
||||
PUFFERFISH(55),
|
||||
ZOMBIE_PIGMAN(56),
|
||||
POLAR_BEAR(57),
|
||||
RABBIT(59),
|
||||
SALMON(60),
|
||||
SHEEP(61),
|
||||
SHULKER(62),
|
||||
SILVERFISH(64),
|
||||
SKELETON(65),
|
||||
SKELETON_HORSE(66),
|
||||
SLIME(67),
|
||||
SNOW_GOLEM(69),
|
||||
SPIDER(72),
|
||||
SQUID(73),
|
||||
STRAY(74),
|
||||
TRADER_LLAMA(75),
|
||||
TROPICAL_FISH(76),
|
||||
TURTLE(77),
|
||||
VEX(83),
|
||||
VILLAGER(84),
|
||||
IRON_GOLEM(85),
|
||||
VINDICATOR(86),
|
||||
PILLAGER(87),
|
||||
WANGERING_TRADER(88),
|
||||
WITCH(89),
|
||||
WITHER(90),
|
||||
WITHER_SKELETON(91),
|
||||
WOLF(93),
|
||||
ZOMBIE(94),
|
||||
ZOMBIE_HORSE(95),
|
||||
ZOMBIE_VILLAGER(96),
|
||||
PHANTOM(97),
|
||||
RAVAGER(98);
|
||||
|
||||
AREA_EFFECT_CLOUD,
|
||||
ARMOR_STAND,
|
||||
ARROW,
|
||||
BAT,
|
||||
BEE,
|
||||
BLAZE,
|
||||
BOAT,
|
||||
CAT,
|
||||
CAVE_SPIDER,
|
||||
CHICKEN,
|
||||
COD,
|
||||
COW,
|
||||
CREEPER,
|
||||
DONKEY,
|
||||
DOLPHIN,
|
||||
DRAGON_FIREBALL,
|
||||
DROWNED,
|
||||
ELDER_GUARDIAN,
|
||||
END_CRYSTAL,
|
||||
ENDER_DRAGON,
|
||||
ENDERMAN,
|
||||
ENDERMITE,
|
||||
EVOKER_FANGS,
|
||||
EVOKER,
|
||||
EXPERIENCE_ORB,
|
||||
EYE_OF_ENDER,
|
||||
FALLING_BLOCK,
|
||||
FIREWORK_ROCKET,
|
||||
FOX,
|
||||
GHAST,
|
||||
GIANT,
|
||||
GUARDIAN,
|
||||
HORSE,
|
||||
HUSK,
|
||||
ILLUSIONER,
|
||||
ITEM,
|
||||
ITEM_FRAME,
|
||||
FIREBALL,
|
||||
LEASH_KNOT,
|
||||
LLAMA,
|
||||
LLAMA_SPIT,
|
||||
MAGMA_CUBE,
|
||||
MINECART,
|
||||
CHEST_MINECART,
|
||||
COMMAND_BLOCK_MINECART,
|
||||
FURNACE_MINECART,
|
||||
HOPPER_MINECART,
|
||||
SPAWNER_MINECART,
|
||||
TNT_MINECART,
|
||||
MULE,
|
||||
MOOSHROOM,
|
||||
OCELOT,
|
||||
PAINTING,
|
||||
PANDA,
|
||||
PARROT,
|
||||
PIG,
|
||||
PUFFERFISH,
|
||||
ZOMBIE_PIGMAN,
|
||||
POLAR_BEAR,
|
||||
TNT,
|
||||
RABBIT,
|
||||
SALMON,
|
||||
SHEEP,
|
||||
SHULKER,
|
||||
SHULKER_BULLET,
|
||||
SILVERFISH,
|
||||
SKELETON,
|
||||
SKELETON_HORSE,
|
||||
SLIME,
|
||||
SMALL_FIREBALL,
|
||||
SNOW_GOLEM,
|
||||
SNOWBALL,
|
||||
SPECTRAL_ARROW,
|
||||
SPIDER,
|
||||
SQUID,
|
||||
STRAY,
|
||||
TRADER_LLAMA,
|
||||
TROPICAL_FISH,
|
||||
TURTLE,
|
||||
EGG,
|
||||
ENDER_PEARL,
|
||||
EXPERIENCE_BOTTLE,
|
||||
POTION,
|
||||
TRIDENT,
|
||||
VEX,
|
||||
VILLAGER,
|
||||
IRON_GOLEM,
|
||||
VINDICATOR,
|
||||
PILLAGER,
|
||||
WANDERING_TRADER,
|
||||
WITCH,
|
||||
WITHER,
|
||||
WITHER_SKELETON,
|
||||
WITHER_SKULL,
|
||||
WOLF,
|
||||
ZOMBIE,
|
||||
ZOMBIE_HORSE,
|
||||
ZOMBIE_VILLAGER,
|
||||
PHANTOM,
|
||||
RAVAGER,
|
||||
LIGHTNING_BOLT,
|
||||
PLAYER,
|
||||
FISHING_BOBBER;
|
||||
|
||||
private static Int2ObjectOpenHashMap<EntityType> map = new Int2ObjectOpenHashMap();
|
||||
|
||||
static {
|
||||
for (EntityType type : EntityType.values()) {
|
||||
map.put(type.id, type);
|
||||
}
|
||||
}
|
||||
|
||||
private int id;
|
||||
|
||||
EntityType(int id) {
|
||||
public void setIdentifier(int id) {
|
||||
this.id = id;
|
||||
|
||||
map.put(id, this);
|
||||
}
|
||||
|
||||
public static EntityType fromId(int id) {
|
||||
|
@ -83,7 +83,7 @@ public class Player extends LivingEntity {
|
||||
private PlayerVehicleInformation vehicleInformation;
|
||||
|
||||
public Player(UUID uuid, String username, PlayerConnection playerConnection) {
|
||||
super(100);
|
||||
super(EntityType.PLAYER.getId());
|
||||
this.uuid = uuid;
|
||||
this.username = username;
|
||||
this.playerConnection = playerConnection;
|
||||
@ -872,13 +872,13 @@ public class Player extends LivingEntity {
|
||||
|
||||
public enum MainHand {
|
||||
LEFT,
|
||||
RIGHT;
|
||||
RIGHT
|
||||
}
|
||||
|
||||
public enum ChatMode {
|
||||
ENABLED,
|
||||
COMMANDS_ONLY,
|
||||
HIDDEN;
|
||||
HIDDEN
|
||||
}
|
||||
|
||||
public class PlayerSettings {
|
||||
|
@ -8,10 +8,10 @@ import java.util.ArrayList;
|
||||
|
||||
public class ItemStack implements DataContainer {
|
||||
|
||||
public static final ItemStack AIR_ITEM = new ItemStack(0, (byte) 0);
|
||||
public static final ItemStack AIR_ITEM = new ItemStack((short) 0, (byte) 0);
|
||||
private static StackingRule defaultStackingRule;
|
||||
|
||||
private int materialId;
|
||||
private short materialId;
|
||||
|
||||
{
|
||||
if (defaultStackingRule == null)
|
||||
@ -28,7 +28,7 @@ public class ItemStack implements DataContainer {
|
||||
private StackingRule stackingRule;
|
||||
private Data data;
|
||||
|
||||
public ItemStack(int materialId, byte amount, short damage) {
|
||||
public ItemStack(short materialId, byte amount, short damage) {
|
||||
this.materialId = materialId;
|
||||
this.amount = amount;
|
||||
this.damage = damage;
|
||||
@ -37,8 +37,8 @@ public class ItemStack implements DataContainer {
|
||||
this.stackingRule = defaultStackingRule;
|
||||
}
|
||||
|
||||
public ItemStack(int id, byte amount) {
|
||||
this(id, amount, (short) 0);
|
||||
public ItemStack(short materialId, byte amount) {
|
||||
this(materialId, amount, (short) 0);
|
||||
}
|
||||
|
||||
public ItemStack(Material material, byte amount) {
|
||||
@ -72,7 +72,7 @@ public class ItemStack implements DataContainer {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public int getMaterialId() {
|
||||
public short getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
|
@ -1,45 +1,924 @@
|
||||
package fr.themode.minestom.item;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import fr.themode.minestom.instance.block.Block;
|
||||
import it.unimi.dsi.fastutil.shorts.Short2ObjectOpenHashMap;
|
||||
|
||||
public enum Material {
|
||||
|
||||
AIR(0, 0),
|
||||
STONE(1, 1),
|
||||
BOW(525, 0),
|
||||
ARROW(526, 0),
|
||||
DIAMOND_SWORD(541, 0);
|
||||
AIR,
|
||||
STONE,
|
||||
GRANITE,
|
||||
POLISHED_GRANITE,
|
||||
DIORITE,
|
||||
POLISHED_DIORITE,
|
||||
ANDESITE,
|
||||
POLISHED_ANDESITE,
|
||||
GRASS_BLOCK,
|
||||
DIRT,
|
||||
COARSE_DIRT,
|
||||
PODZOL,
|
||||
COBBLESTONE,
|
||||
OAK_PLANKS,
|
||||
SPRUCE_PLANKS,
|
||||
BIRCH_PLANKS,
|
||||
JUNGLE_PLANKS,
|
||||
ACACIA_PLANKS,
|
||||
DARK_OAK_PLANKS,
|
||||
OAK_SAPLING,
|
||||
SPRUCE_SAPLING,
|
||||
BIRCH_SAPLING,
|
||||
JUNGLE_SAPLING,
|
||||
ACACIA_SAPLING,
|
||||
DARK_OAK_SAPLING,
|
||||
BEDROCK,
|
||||
SAND,
|
||||
RED_SAND,
|
||||
GRAVEL,
|
||||
GOLD_ORE,
|
||||
IRON_ORE,
|
||||
COAL_ORE,
|
||||
OAK_LOG,
|
||||
SPRUCE_LOG,
|
||||
BIRCH_LOG,
|
||||
JUNGLE_LOG,
|
||||
ACACIA_LOG,
|
||||
DARK_OAK_LOG,
|
||||
STRIPPED_OAK_LOG,
|
||||
STRIPPED_SPRUCE_LOG,
|
||||
STRIPPED_BIRCH_LOG,
|
||||
STRIPPED_JUNGLE_LOG,
|
||||
STRIPPED_ACACIA_LOG,
|
||||
STRIPPED_DARK_OAK_LOG,
|
||||
STRIPPED_OAK_WOOD,
|
||||
STRIPPED_SPRUCE_WOOD,
|
||||
STRIPPED_BIRCH_WOOD,
|
||||
STRIPPED_JUNGLE_WOOD,
|
||||
STRIPPED_ACACIA_WOOD,
|
||||
STRIPPED_DARK_OAK_WOOD,
|
||||
OAK_WOOD,
|
||||
SPRUCE_WOOD,
|
||||
BIRCH_WOOD,
|
||||
JUNGLE_WOOD,
|
||||
ACACIA_WOOD,
|
||||
DARK_OAK_WOOD,
|
||||
OAK_LEAVES,
|
||||
SPRUCE_LEAVES,
|
||||
BIRCH_LEAVES,
|
||||
JUNGLE_LEAVES,
|
||||
ACACIA_LEAVES,
|
||||
DARK_OAK_LEAVES,
|
||||
SPONGE,
|
||||
WET_SPONGE,
|
||||
GLASS,
|
||||
LAPIS_ORE,
|
||||
LAPIS_BLOCK,
|
||||
DISPENSER,
|
||||
SANDSTONE,
|
||||
CHISELED_SANDSTONE,
|
||||
CUT_SANDSTONE,
|
||||
NOTE_BLOCK,
|
||||
POWERED_RAIL,
|
||||
DETECTOR_RAIL,
|
||||
STICKY_PISTON,
|
||||
COBWEB,
|
||||
GRASS,
|
||||
FERN,
|
||||
DEAD_BUSH,
|
||||
SEAGRASS,
|
||||
SEA_PICKLE,
|
||||
PISTON,
|
||||
WHITE_WOOL,
|
||||
ORANGE_WOOL,
|
||||
MAGENTA_WOOL,
|
||||
LIGHT_BLUE_WOOL,
|
||||
YELLOW_WOOL,
|
||||
LIME_WOOL,
|
||||
PINK_WOOL,
|
||||
GRAY_WOOL,
|
||||
LIGHT_GRAY_WOOL,
|
||||
CYAN_WOOL,
|
||||
PURPLE_WOOL,
|
||||
BLUE_WOOL,
|
||||
BROWN_WOOL,
|
||||
GREEN_WOOL,
|
||||
RED_WOOL,
|
||||
BLACK_WOOL,
|
||||
DANDELION,
|
||||
POPPY,
|
||||
BLUE_ORCHID,
|
||||
ALLIUM,
|
||||
AZURE_BLUET,
|
||||
RED_TULIP,
|
||||
ORANGE_TULIP,
|
||||
WHITE_TULIP,
|
||||
PINK_TULIP,
|
||||
OXEYE_DAISY,
|
||||
CORNFLOWER,
|
||||
LILY_OF_THE_VALLEY,
|
||||
WITHER_ROSE,
|
||||
BROWN_MUSHROOM,
|
||||
RED_MUSHROOM,
|
||||
GOLD_BLOCK,
|
||||
IRON_BLOCK,
|
||||
OAK_SLAB,
|
||||
SPRUCE_SLAB,
|
||||
BIRCH_SLAB,
|
||||
JUNGLE_SLAB,
|
||||
ACACIA_SLAB,
|
||||
DARK_OAK_SLAB,
|
||||
STONE_SLAB,
|
||||
SMOOTH_STONE_SLAB,
|
||||
SANDSTONE_SLAB,
|
||||
CUT_SANDSTONE_SLAB,
|
||||
PETRIFIED_OAK_SLAB,
|
||||
COBBLESTONE_SLAB,
|
||||
BRICK_SLAB,
|
||||
STONE_BRICK_SLAB,
|
||||
NETHER_BRICK_SLAB,
|
||||
QUARTZ_SLAB,
|
||||
RED_SANDSTONE_SLAB,
|
||||
CUT_RED_SANDSTONE_SLAB,
|
||||
PURPUR_SLAB,
|
||||
PRISMARINE_SLAB,
|
||||
PRISMARINE_BRICK_SLAB,
|
||||
DARK_PRISMARINE_SLAB,
|
||||
SMOOTH_QUARTZ,
|
||||
SMOOTH_RED_SANDSTONE,
|
||||
SMOOTH_SANDSTONE,
|
||||
SMOOTH_STONE,
|
||||
BRICKS,
|
||||
TNT,
|
||||
BOOKSHELF,
|
||||
MOSSY_COBBLESTONE,
|
||||
OBSIDIAN,
|
||||
TORCH,
|
||||
END_ROD,
|
||||
CHORUS_PLANT,
|
||||
CHORUS_FLOWER,
|
||||
PURPUR_BLOCK,
|
||||
PURPUR_PILLAR,
|
||||
PURPUR_STAIRS,
|
||||
SPAWNER,
|
||||
OAK_STAIRS,
|
||||
CHEST,
|
||||
DIAMOND_ORE,
|
||||
DIAMOND_BLOCK,
|
||||
CRAFTING_TABLE,
|
||||
FARMLAND,
|
||||
FURNACE,
|
||||
LADDER,
|
||||
RAIL,
|
||||
COBBLESTONE_STAIRS,
|
||||
LEVER,
|
||||
STONE_PRESSURE_PLATE,
|
||||
OAK_PRESSURE_PLATE,
|
||||
SPRUCE_PRESSURE_PLATE,
|
||||
BIRCH_PRESSURE_PLATE,
|
||||
JUNGLE_PRESSURE_PLATE,
|
||||
ACACIA_PRESSURE_PLATE,
|
||||
DARK_OAK_PRESSURE_PLATE,
|
||||
REDSTONE_ORE,
|
||||
REDSTONE_TORCH,
|
||||
STONE_BUTTON,
|
||||
SNOW,
|
||||
ICE,
|
||||
SNOW_BLOCK,
|
||||
CACTUS,
|
||||
CLAY,
|
||||
JUKEBOX,
|
||||
OAK_FENCE,
|
||||
SPRUCE_FENCE,
|
||||
BIRCH_FENCE,
|
||||
JUNGLE_FENCE,
|
||||
ACACIA_FENCE,
|
||||
DARK_OAK_FENCE,
|
||||
PUMPKIN,
|
||||
CARVED_PUMPKIN,
|
||||
NETHERRACK,
|
||||
SOUL_SAND,
|
||||
GLOWSTONE,
|
||||
JACK_O_LANTERN,
|
||||
OAK_TRAPDOOR,
|
||||
SPRUCE_TRAPDOOR,
|
||||
BIRCH_TRAPDOOR,
|
||||
JUNGLE_TRAPDOOR,
|
||||
ACACIA_TRAPDOOR,
|
||||
DARK_OAK_TRAPDOOR,
|
||||
INFESTED_STONE,
|
||||
INFESTED_COBBLESTONE,
|
||||
INFESTED_STONE_BRICKS,
|
||||
INFESTED_MOSSY_STONE_BRICKS,
|
||||
INFESTED_CRACKED_STONE_BRICKS,
|
||||
INFESTED_CHISELED_STONE_BRICKS,
|
||||
STONE_BRICKS,
|
||||
MOSSY_STONE_BRICKS,
|
||||
CRACKED_STONE_BRICKS,
|
||||
CHISELED_STONE_BRICKS,
|
||||
BROWN_MUSHROOM_BLOCK,
|
||||
RED_MUSHROOM_BLOCK,
|
||||
MUSHROOM_STEM,
|
||||
IRON_BARS,
|
||||
GLASS_PANE,
|
||||
MELON,
|
||||
VINE,
|
||||
OAK_FENCE_GATE,
|
||||
SPRUCE_FENCE_GATE,
|
||||
BIRCH_FENCE_GATE,
|
||||
JUNGLE_FENCE_GATE,
|
||||
ACACIA_FENCE_GATE,
|
||||
DARK_OAK_FENCE_GATE,
|
||||
BRICK_STAIRS,
|
||||
STONE_BRICK_STAIRS,
|
||||
MYCELIUM,
|
||||
LILY_PAD,
|
||||
NETHER_BRICKS,
|
||||
NETHER_BRICK_FENCE,
|
||||
NETHER_BRICK_STAIRS,
|
||||
ENCHANTING_TABLE,
|
||||
END_PORTAL_FRAME,
|
||||
END_STONE,
|
||||
END_STONE_BRICKS,
|
||||
DRAGON_EGG,
|
||||
REDSTONE_LAMP,
|
||||
SANDSTONE_STAIRS,
|
||||
EMERALD_ORE,
|
||||
ENDER_CHEST,
|
||||
TRIPWIRE_HOOK,
|
||||
EMERALD_BLOCK,
|
||||
SPRUCE_STAIRS,
|
||||
BIRCH_STAIRS,
|
||||
JUNGLE_STAIRS,
|
||||
COMMAND_BLOCK,
|
||||
BEACON,
|
||||
COBBLESTONE_WALL,
|
||||
MOSSY_COBBLESTONE_WALL,
|
||||
BRICK_WALL,
|
||||
PRISMARINE_WALL,
|
||||
RED_SANDSTONE_WALL,
|
||||
MOSSY_STONE_BRICK_WALL,
|
||||
GRANITE_WALL,
|
||||
STONE_BRICK_WALL,
|
||||
NETHER_BRICK_WALL,
|
||||
ANDESITE_WALL,
|
||||
RED_NETHER_BRICK_WALL,
|
||||
SANDSTONE_WALL,
|
||||
END_STONE_BRICK_WALL,
|
||||
DIORITE_WALL,
|
||||
OAK_BUTTON,
|
||||
SPRUCE_BUTTON,
|
||||
BIRCH_BUTTON,
|
||||
JUNGLE_BUTTON,
|
||||
ACACIA_BUTTON,
|
||||
DARK_OAK_BUTTON,
|
||||
ANVIL,
|
||||
CHIPPED_ANVIL,
|
||||
DAMAGED_ANVIL,
|
||||
TRAPPED_CHEST,
|
||||
LIGHT_WEIGHTED_PRESSURE_PLATE,
|
||||
HEAVY_WEIGHTED_PRESSURE_PLATE,
|
||||
DAYLIGHT_DETECTOR,
|
||||
REDSTONE_BLOCK,
|
||||
NETHER_QUARTZ_ORE,
|
||||
HOPPER,
|
||||
CHISELED_QUARTZ_BLOCK,
|
||||
QUARTZ_BLOCK,
|
||||
QUARTZ_PILLAR,
|
||||
QUARTZ_STAIRS,
|
||||
ACTIVATOR_RAIL,
|
||||
DROPPER,
|
||||
WHITE_TERRACOTTA,
|
||||
ORANGE_TERRACOTTA,
|
||||
MAGENTA_TERRACOTTA,
|
||||
LIGHT_BLUE_TERRACOTTA,
|
||||
YELLOW_TERRACOTTA,
|
||||
LIME_TERRACOTTA,
|
||||
PINK_TERRACOTTA,
|
||||
GRAY_TERRACOTTA,
|
||||
LIGHT_GRAY_TERRACOTTA,
|
||||
CYAN_TERRACOTTA,
|
||||
PURPLE_TERRACOTTA,
|
||||
BLUE_TERRACOTTA,
|
||||
BROWN_TERRACOTTA,
|
||||
GREEN_TERRACOTTA,
|
||||
RED_TERRACOTTA,
|
||||
BLACK_TERRACOTTA,
|
||||
BARRIER,
|
||||
IRON_TRAPDOOR,
|
||||
HAY_BLOCK,
|
||||
WHITE_CARPET,
|
||||
ORANGE_CARPET,
|
||||
MAGENTA_CARPET,
|
||||
LIGHT_BLUE_CARPET,
|
||||
YELLOW_CARPET,
|
||||
LIME_CARPET,
|
||||
PINK_CARPET,
|
||||
GRAY_CARPET,
|
||||
LIGHT_GRAY_CARPET,
|
||||
CYAN_CARPET,
|
||||
PURPLE_CARPET,
|
||||
BLUE_CARPET,
|
||||
BROWN_CARPET,
|
||||
GREEN_CARPET,
|
||||
RED_CARPET,
|
||||
BLACK_CARPET,
|
||||
TERRACOTTA,
|
||||
COAL_BLOCK,
|
||||
PACKED_ICE,
|
||||
ACACIA_STAIRS,
|
||||
DARK_OAK_STAIRS,
|
||||
SLIME_BLOCK,
|
||||
GRASS_PATH,
|
||||
SUNFLOWER,
|
||||
LILAC,
|
||||
ROSE_BUSH,
|
||||
PEONY,
|
||||
TALL_GRASS,
|
||||
LARGE_FERN,
|
||||
WHITE_STAINED_GLASS,
|
||||
ORANGE_STAINED_GLASS,
|
||||
MAGENTA_STAINED_GLASS,
|
||||
LIGHT_BLUE_STAINED_GLASS,
|
||||
YELLOW_STAINED_GLASS,
|
||||
LIME_STAINED_GLASS,
|
||||
PINK_STAINED_GLASS,
|
||||
GRAY_STAINED_GLASS,
|
||||
LIGHT_GRAY_STAINED_GLASS,
|
||||
CYAN_STAINED_GLASS,
|
||||
PURPLE_STAINED_GLASS,
|
||||
BLUE_STAINED_GLASS,
|
||||
BROWN_STAINED_GLASS,
|
||||
GREEN_STAINED_GLASS,
|
||||
RED_STAINED_GLASS,
|
||||
BLACK_STAINED_GLASS,
|
||||
WHITE_STAINED_GLASS_PANE,
|
||||
ORANGE_STAINED_GLASS_PANE,
|
||||
MAGENTA_STAINED_GLASS_PANE,
|
||||
LIGHT_BLUE_STAINED_GLASS_PANE,
|
||||
YELLOW_STAINED_GLASS_PANE,
|
||||
LIME_STAINED_GLASS_PANE,
|
||||
PINK_STAINED_GLASS_PANE,
|
||||
GRAY_STAINED_GLASS_PANE,
|
||||
LIGHT_GRAY_STAINED_GLASS_PANE,
|
||||
CYAN_STAINED_GLASS_PANE,
|
||||
PURPLE_STAINED_GLASS_PANE,
|
||||
BLUE_STAINED_GLASS_PANE,
|
||||
BROWN_STAINED_GLASS_PANE,
|
||||
GREEN_STAINED_GLASS_PANE,
|
||||
RED_STAINED_GLASS_PANE,
|
||||
BLACK_STAINED_GLASS_PANE,
|
||||
PRISMARINE,
|
||||
PRISMARINE_BRICKS,
|
||||
DARK_PRISMARINE,
|
||||
PRISMARINE_STAIRS,
|
||||
PRISMARINE_BRICK_STAIRS,
|
||||
DARK_PRISMARINE_STAIRS,
|
||||
SEA_LANTERN,
|
||||
RED_SANDSTONE,
|
||||
CHISELED_RED_SANDSTONE,
|
||||
CUT_RED_SANDSTONE,
|
||||
RED_SANDSTONE_STAIRS,
|
||||
REPEATING_COMMAND_BLOCK,
|
||||
CHAIN_COMMAND_BLOCK,
|
||||
MAGMA_BLOCK,
|
||||
NETHER_WART_BLOCK,
|
||||
RED_NETHER_BRICKS,
|
||||
BONE_BLOCK,
|
||||
STRUCTURE_VOID,
|
||||
OBSERVER,
|
||||
SHULKER_BOX,
|
||||
WHITE_SHULKER_BOX,
|
||||
ORANGE_SHULKER_BOX,
|
||||
MAGENTA_SHULKER_BOX,
|
||||
LIGHT_BLUE_SHULKER_BOX,
|
||||
YELLOW_SHULKER_BOX,
|
||||
LIME_SHULKER_BOX,
|
||||
PINK_SHULKER_BOX,
|
||||
GRAY_SHULKER_BOX,
|
||||
LIGHT_GRAY_SHULKER_BOX,
|
||||
CYAN_SHULKER_BOX,
|
||||
PURPLE_SHULKER_BOX,
|
||||
BLUE_SHULKER_BOX,
|
||||
BROWN_SHULKER_BOX,
|
||||
GREEN_SHULKER_BOX,
|
||||
RED_SHULKER_BOX,
|
||||
BLACK_SHULKER_BOX,
|
||||
WHITE_GLAZED_TERRACOTTA,
|
||||
ORANGE_GLAZED_TERRACOTTA,
|
||||
MAGENTA_GLAZED_TERRACOTTA,
|
||||
LIGHT_BLUE_GLAZED_TERRACOTTA,
|
||||
YELLOW_GLAZED_TERRACOTTA,
|
||||
LIME_GLAZED_TERRACOTTA,
|
||||
PINK_GLAZED_TERRACOTTA,
|
||||
GRAY_GLAZED_TERRACOTTA,
|
||||
LIGHT_GRAY_GLAZED_TERRACOTTA,
|
||||
CYAN_GLAZED_TERRACOTTA,
|
||||
PURPLE_GLAZED_TERRACOTTA,
|
||||
BLUE_GLAZED_TERRACOTTA,
|
||||
BROWN_GLAZED_TERRACOTTA,
|
||||
GREEN_GLAZED_TERRACOTTA,
|
||||
RED_GLAZED_TERRACOTTA,
|
||||
BLACK_GLAZED_TERRACOTTA,
|
||||
WHITE_CONCRETE,
|
||||
ORANGE_CONCRETE,
|
||||
MAGENTA_CONCRETE,
|
||||
LIGHT_BLUE_CONCRETE,
|
||||
YELLOW_CONCRETE,
|
||||
LIME_CONCRETE,
|
||||
PINK_CONCRETE,
|
||||
GRAY_CONCRETE,
|
||||
LIGHT_GRAY_CONCRETE,
|
||||
CYAN_CONCRETE,
|
||||
PURPLE_CONCRETE,
|
||||
BLUE_CONCRETE,
|
||||
BROWN_CONCRETE,
|
||||
GREEN_CONCRETE,
|
||||
RED_CONCRETE,
|
||||
BLACK_CONCRETE,
|
||||
WHITE_CONCRETE_POWDER,
|
||||
ORANGE_CONCRETE_POWDER,
|
||||
MAGENTA_CONCRETE_POWDER,
|
||||
LIGHT_BLUE_CONCRETE_POWDER,
|
||||
YELLOW_CONCRETE_POWDER,
|
||||
LIME_CONCRETE_POWDER,
|
||||
PINK_CONCRETE_POWDER,
|
||||
GRAY_CONCRETE_POWDER,
|
||||
LIGHT_GRAY_CONCRETE_POWDER,
|
||||
CYAN_CONCRETE_POWDER,
|
||||
PURPLE_CONCRETE_POWDER,
|
||||
BLUE_CONCRETE_POWDER,
|
||||
BROWN_CONCRETE_POWDER,
|
||||
GREEN_CONCRETE_POWDER,
|
||||
RED_CONCRETE_POWDER,
|
||||
BLACK_CONCRETE_POWDER,
|
||||
TURTLE_EGG,
|
||||
DEAD_TUBE_CORAL_BLOCK,
|
||||
DEAD_BRAIN_CORAL_BLOCK,
|
||||
DEAD_BUBBLE_CORAL_BLOCK,
|
||||
DEAD_FIRE_CORAL_BLOCK,
|
||||
DEAD_HORN_CORAL_BLOCK,
|
||||
TUBE_CORAL_BLOCK,
|
||||
BRAIN_CORAL_BLOCK,
|
||||
BUBBLE_CORAL_BLOCK,
|
||||
FIRE_CORAL_BLOCK,
|
||||
HORN_CORAL_BLOCK,
|
||||
TUBE_CORAL,
|
||||
BRAIN_CORAL,
|
||||
BUBBLE_CORAL,
|
||||
FIRE_CORAL,
|
||||
HORN_CORAL,
|
||||
DEAD_BRAIN_CORAL,
|
||||
DEAD_BUBBLE_CORAL,
|
||||
DEAD_FIRE_CORAL,
|
||||
DEAD_HORN_CORAL,
|
||||
DEAD_TUBE_CORAL,
|
||||
TUBE_CORAL_FAN,
|
||||
BRAIN_CORAL_FAN,
|
||||
BUBBLE_CORAL_FAN,
|
||||
FIRE_CORAL_FAN,
|
||||
HORN_CORAL_FAN,
|
||||
DEAD_TUBE_CORAL_FAN,
|
||||
DEAD_BRAIN_CORAL_FAN,
|
||||
DEAD_BUBBLE_CORAL_FAN,
|
||||
DEAD_FIRE_CORAL_FAN,
|
||||
DEAD_HORN_CORAL_FAN,
|
||||
BLUE_ICE,
|
||||
CONDUIT,
|
||||
POLISHED_GRANITE_STAIRS,
|
||||
SMOOTH_RED_SANDSTONE_STAIRS,
|
||||
MOSSY_STONE_BRICK_STAIRS,
|
||||
POLISHED_DIORITE_STAIRS,
|
||||
MOSSY_COBBLESTONE_STAIRS,
|
||||
END_STONE_BRICK_STAIRS,
|
||||
STONE_STAIRS,
|
||||
SMOOTH_SANDSTONE_STAIRS,
|
||||
SMOOTH_QUARTZ_STAIRS,
|
||||
GRANITE_STAIRS,
|
||||
ANDESITE_STAIRS,
|
||||
RED_NETHER_BRICK_STAIRS,
|
||||
POLISHED_ANDESITE_STAIRS,
|
||||
DIORITE_STAIRS,
|
||||
POLISHED_GRANITE_SLAB,
|
||||
SMOOTH_RED_SANDSTONE_SLAB,
|
||||
MOSSY_STONE_BRICK_SLAB,
|
||||
POLISHED_DIORITE_SLAB,
|
||||
MOSSY_COBBLESTONE_SLAB,
|
||||
END_STONE_BRICK_SLAB,
|
||||
SMOOTH_SANDSTONE_SLAB,
|
||||
SMOOTH_QUARTZ_SLAB,
|
||||
GRANITE_SLAB,
|
||||
ANDESITE_SLAB,
|
||||
RED_NETHER_BRICK_SLAB,
|
||||
POLISHED_ANDESITE_SLAB,
|
||||
DIORITE_SLAB,
|
||||
SCAFFOLDING,
|
||||
IRON_DOOR,
|
||||
OAK_DOOR,
|
||||
SPRUCE_DOOR,
|
||||
BIRCH_DOOR,
|
||||
JUNGLE_DOOR,
|
||||
ACACIA_DOOR,
|
||||
DARK_OAK_DOOR,
|
||||
REPEATER,
|
||||
COMPARATOR,
|
||||
STRUCTURE_BLOCK,
|
||||
JIGSAW,
|
||||
COMPOSTER,
|
||||
TURTLE_HELMET,
|
||||
SCUTE,
|
||||
IRON_SHOVEL,
|
||||
IRON_PICKAXE,
|
||||
IRON_AXE,
|
||||
FLINT_AND_STEEL,
|
||||
APPLE,
|
||||
BOW,
|
||||
ARROW,
|
||||
COAL,
|
||||
CHARCOAL,
|
||||
DIAMOND,
|
||||
IRON_INGOT,
|
||||
GOLD_INGOT,
|
||||
IRON_SWORD,
|
||||
WOODEN_SWORD,
|
||||
WOODEN_SHOVEL,
|
||||
WOODEN_PICKAXE,
|
||||
WOODEN_AXE,
|
||||
STONE_SWORD,
|
||||
STONE_SHOVEL,
|
||||
STONE_PICKAXE,
|
||||
STONE_AXE,
|
||||
DIAMOND_SWORD,
|
||||
DIAMOND_SHOVEL,
|
||||
DIAMOND_PICKAXE,
|
||||
DIAMOND_AXE,
|
||||
STICK,
|
||||
BOWL,
|
||||
MUSHROOM_STEW,
|
||||
GOLDEN_SWORD,
|
||||
GOLDEN_SHOVEL,
|
||||
GOLDEN_PICKAXE,
|
||||
GOLDEN_AXE,
|
||||
STRING,
|
||||
FEATHER,
|
||||
GUNPOWDER,
|
||||
WOODEN_HOE,
|
||||
STONE_HOE,
|
||||
IRON_HOE,
|
||||
DIAMOND_HOE,
|
||||
GOLDEN_HOE,
|
||||
WHEAT_SEEDS,
|
||||
WHEAT,
|
||||
BREAD,
|
||||
LEATHER_HELMET,
|
||||
LEATHER_CHESTPLATE,
|
||||
LEATHER_LEGGINGS,
|
||||
LEATHER_BOOTS,
|
||||
CHAINMAIL_HELMET,
|
||||
CHAINMAIL_CHESTPLATE,
|
||||
CHAINMAIL_LEGGINGS,
|
||||
CHAINMAIL_BOOTS,
|
||||
IRON_HELMET,
|
||||
IRON_CHESTPLATE,
|
||||
IRON_LEGGINGS,
|
||||
IRON_BOOTS,
|
||||
DIAMOND_HELMET,
|
||||
DIAMOND_CHESTPLATE,
|
||||
DIAMOND_LEGGINGS,
|
||||
DIAMOND_BOOTS,
|
||||
GOLDEN_HELMET,
|
||||
GOLDEN_CHESTPLATE,
|
||||
GOLDEN_LEGGINGS,
|
||||
GOLDEN_BOOTS,
|
||||
FLINT,
|
||||
PORKCHOP,
|
||||
COOKED_PORKCHOP,
|
||||
PAINTING,
|
||||
GOLDEN_APPLE,
|
||||
ENCHANTED_GOLDEN_APPLE,
|
||||
OAK_SIGN,
|
||||
SPRUCE_SIGN,
|
||||
BIRCH_SIGN,
|
||||
JUNGLE_SIGN,
|
||||
ACACIA_SIGN,
|
||||
DARK_OAK_SIGN,
|
||||
BUCKET,
|
||||
WATER_BUCKET,
|
||||
LAVA_BUCKET,
|
||||
MINECART,
|
||||
SADDLE,
|
||||
REDSTONE,
|
||||
SNOWBALL,
|
||||
OAK_BOAT,
|
||||
LEATHER,
|
||||
MILK_BUCKET,
|
||||
PUFFERFISH_BUCKET,
|
||||
SALMON_BUCKET,
|
||||
COD_BUCKET,
|
||||
TROPICAL_FISH_BUCKET,
|
||||
BRICK,
|
||||
CLAY_BALL,
|
||||
SUGAR_CANE,
|
||||
KELP,
|
||||
DRIED_KELP_BLOCK,
|
||||
BAMBOO,
|
||||
PAPER,
|
||||
BOOK,
|
||||
SLIME_BALL,
|
||||
CHEST_MINECART,
|
||||
FURNACE_MINECART,
|
||||
EGG,
|
||||
COMPASS,
|
||||
FISHING_ROD,
|
||||
CLOCK,
|
||||
GLOWSTONE_DUST,
|
||||
COD,
|
||||
SALMON,
|
||||
TROPICAL_FISH,
|
||||
PUFFERFISH,
|
||||
COOKED_COD,
|
||||
COOKED_SALMON,
|
||||
INK_SAC,
|
||||
RED_DYE,
|
||||
GREEN_DYE,
|
||||
COCOA_BEANS,
|
||||
LAPIS_LAZULI,
|
||||
PURPLE_DYE,
|
||||
CYAN_DYE,
|
||||
LIGHT_GRAY_DYE,
|
||||
GRAY_DYE,
|
||||
PINK_DYE,
|
||||
LIME_DYE,
|
||||
YELLOW_DYE,
|
||||
LIGHT_BLUE_DYE,
|
||||
MAGENTA_DYE,
|
||||
ORANGE_DYE,
|
||||
BONE_MEAL,
|
||||
BLUE_DYE,
|
||||
BROWN_DYE,
|
||||
BLACK_DYE,
|
||||
WHITE_DYE,
|
||||
BONE,
|
||||
SUGAR,
|
||||
CAKE,
|
||||
WHITE_BED,
|
||||
ORANGE_BED,
|
||||
MAGENTA_BED,
|
||||
LIGHT_BLUE_BED,
|
||||
YELLOW_BED,
|
||||
LIME_BED,
|
||||
PINK_BED,
|
||||
GRAY_BED,
|
||||
LIGHT_GRAY_BED,
|
||||
CYAN_BED,
|
||||
PURPLE_BED,
|
||||
BLUE_BED,
|
||||
BROWN_BED,
|
||||
GREEN_BED,
|
||||
RED_BED,
|
||||
BLACK_BED,
|
||||
COOKIE,
|
||||
FILLED_MAP,
|
||||
SHEARS,
|
||||
MELON_SLICE,
|
||||
DRIED_KELP,
|
||||
PUMPKIN_SEEDS,
|
||||
MELON_SEEDS,
|
||||
BEEF,
|
||||
COOKED_BEEF,
|
||||
CHICKEN,
|
||||
COOKED_CHICKEN,
|
||||
ROTTEN_FLESH,
|
||||
ENDER_PEARL,
|
||||
BLAZE_ROD,
|
||||
GHAST_TEAR,
|
||||
GOLD_NUGGET,
|
||||
NETHER_WART,
|
||||
POTION,
|
||||
GLASS_BOTTLE,
|
||||
SPIDER_EYE,
|
||||
FERMENTED_SPIDER_EYE,
|
||||
BLAZE_POWDER,
|
||||
MAGMA_CREAM,
|
||||
BREWING_STAND,
|
||||
CAULDRON,
|
||||
ENDER_EYE,
|
||||
GLISTERING_MELON_SLICE,
|
||||
BAT_SPAWN_EGG,
|
||||
BEE_SPAWN_EGG,
|
||||
BLAZE_SPAWN_EGG,
|
||||
CAT_SPAWN_EGG,
|
||||
CAVE_SPIDER_SPAWN_EGG,
|
||||
CHICKEN_SPAWN_EGG,
|
||||
COD_SPAWN_EGG,
|
||||
COW_SPAWN_EGG,
|
||||
CREEPER_SPAWN_EGG,
|
||||
DOLPHIN_SPAWN_EGG,
|
||||
DONKEY_SPAWN_EGG,
|
||||
DROWNED_SPAWN_EGG,
|
||||
ELDER_GUARDIAN_SPAWN_EGG,
|
||||
ENDERMAN_SPAWN_EGG,
|
||||
ENDERMITE_SPAWN_EGG,
|
||||
EVOKER_SPAWN_EGG,
|
||||
FOX_SPAWN_EGG,
|
||||
GHAST_SPAWN_EGG,
|
||||
GUARDIAN_SPAWN_EGG,
|
||||
HORSE_SPAWN_EGG,
|
||||
HUSK_SPAWN_EGG,
|
||||
LLAMA_SPAWN_EGG,
|
||||
MAGMA_CUBE_SPAWN_EGG,
|
||||
MOOSHROOM_SPAWN_EGG,
|
||||
MULE_SPAWN_EGG,
|
||||
OCELOT_SPAWN_EGG,
|
||||
PANDA_SPAWN_EGG,
|
||||
PARROT_SPAWN_EGG,
|
||||
PHANTOM_SPAWN_EGG,
|
||||
PIG_SPAWN_EGG,
|
||||
PILLAGER_SPAWN_EGG,
|
||||
POLAR_BEAR_SPAWN_EGG,
|
||||
PUFFERFISH_SPAWN_EGG,
|
||||
RABBIT_SPAWN_EGG,
|
||||
RAVAGER_SPAWN_EGG,
|
||||
SALMON_SPAWN_EGG,
|
||||
SHEEP_SPAWN_EGG,
|
||||
SHULKER_SPAWN_EGG,
|
||||
SILVERFISH_SPAWN_EGG,
|
||||
SKELETON_SPAWN_EGG,
|
||||
SKELETON_HORSE_SPAWN_EGG,
|
||||
SLIME_SPAWN_EGG,
|
||||
SPIDER_SPAWN_EGG,
|
||||
SQUID_SPAWN_EGG,
|
||||
STRAY_SPAWN_EGG,
|
||||
TRADER_LLAMA_SPAWN_EGG,
|
||||
TROPICAL_FISH_SPAWN_EGG,
|
||||
TURTLE_SPAWN_EGG,
|
||||
VEX_SPAWN_EGG,
|
||||
VILLAGER_SPAWN_EGG,
|
||||
VINDICATOR_SPAWN_EGG,
|
||||
WANDERING_TRADER_SPAWN_EGG,
|
||||
WITCH_SPAWN_EGG,
|
||||
WITHER_SKELETON_SPAWN_EGG,
|
||||
WOLF_SPAWN_EGG,
|
||||
ZOMBIE_SPAWN_EGG,
|
||||
ZOMBIE_HORSE_SPAWN_EGG,
|
||||
ZOMBIE_PIGMAN_SPAWN_EGG,
|
||||
ZOMBIE_VILLAGER_SPAWN_EGG,
|
||||
EXPERIENCE_BOTTLE,
|
||||
FIRE_CHARGE,
|
||||
WRITABLE_BOOK,
|
||||
WRITTEN_BOOK,
|
||||
EMERALD,
|
||||
ITEM_FRAME,
|
||||
FLOWER_POT,
|
||||
CARROT,
|
||||
POTATO,
|
||||
BAKED_POTATO,
|
||||
POISONOUS_POTATO,
|
||||
MAP,
|
||||
GOLDEN_CARROT,
|
||||
SKELETON_SKULL,
|
||||
WITHER_SKELETON_SKULL,
|
||||
PLAYER_HEAD,
|
||||
ZOMBIE_HEAD,
|
||||
CREEPER_HEAD,
|
||||
DRAGON_HEAD,
|
||||
CARROT_ON_A_STICK,
|
||||
NETHER_STAR,
|
||||
PUMPKIN_PIE,
|
||||
FIREWORK_ROCKET,
|
||||
FIREWORK_STAR,
|
||||
ENCHANTED_BOOK,
|
||||
NETHER_BRICK,
|
||||
QUARTZ,
|
||||
TNT_MINECART,
|
||||
HOPPER_MINECART,
|
||||
PRISMARINE_SHARD,
|
||||
PRISMARINE_CRYSTALS,
|
||||
RABBIT,
|
||||
COOKED_RABBIT,
|
||||
RABBIT_STEW,
|
||||
RABBIT_FOOT,
|
||||
RABBIT_HIDE,
|
||||
ARMOR_STAND,
|
||||
IRON_HORSE_ARMOR,
|
||||
GOLDEN_HORSE_ARMOR,
|
||||
DIAMOND_HORSE_ARMOR,
|
||||
LEATHER_HORSE_ARMOR,
|
||||
LEAD,
|
||||
NAME_TAG,
|
||||
COMMAND_BLOCK_MINECART,
|
||||
MUTTON,
|
||||
COOKED_MUTTON,
|
||||
WHITE_BANNER,
|
||||
ORANGE_BANNER,
|
||||
MAGENTA_BANNER,
|
||||
LIGHT_BLUE_BANNER,
|
||||
YELLOW_BANNER,
|
||||
LIME_BANNER,
|
||||
PINK_BANNER,
|
||||
GRAY_BANNER,
|
||||
LIGHT_GRAY_BANNER,
|
||||
CYAN_BANNER,
|
||||
PURPLE_BANNER,
|
||||
BLUE_BANNER,
|
||||
BROWN_BANNER,
|
||||
GREEN_BANNER,
|
||||
RED_BANNER,
|
||||
BLACK_BANNER,
|
||||
END_CRYSTAL,
|
||||
CHORUS_FRUIT,
|
||||
POPPED_CHORUS_FRUIT,
|
||||
BEETROOT,
|
||||
BEETROOT_SEEDS,
|
||||
BEETROOT_SOUP,
|
||||
DRAGON_BREATH,
|
||||
SPLASH_POTION,
|
||||
SPECTRAL_ARROW,
|
||||
TIPPED_ARROW,
|
||||
LINGERING_POTION,
|
||||
SHIELD,
|
||||
ELYTRA,
|
||||
SPRUCE_BOAT,
|
||||
BIRCH_BOAT,
|
||||
JUNGLE_BOAT,
|
||||
ACACIA_BOAT,
|
||||
DARK_OAK_BOAT,
|
||||
TOTEM_OF_UNDYING,
|
||||
SHULKER_SHELL,
|
||||
IRON_NUGGET,
|
||||
KNOWLEDGE_BOOK,
|
||||
DEBUG_STICK,
|
||||
MUSIC_DISC_13,
|
||||
MUSIC_DISC_CAT,
|
||||
MUSIC_DISC_BLOCKS,
|
||||
MUSIC_DISC_CHIRP,
|
||||
MUSIC_DISC_FAR,
|
||||
MUSIC_DISC_MALL,
|
||||
MUSIC_DISC_MELLOHI,
|
||||
MUSIC_DISC_STAL,
|
||||
MUSIC_DISC_STRAD,
|
||||
MUSIC_DISC_WARD,
|
||||
MUSIC_DISC_11,
|
||||
MUSIC_DISC_WAIT,
|
||||
TRIDENT,
|
||||
PHANTOM_MEMBRANE,
|
||||
NAUTILUS_SHELL,
|
||||
HEART_OF_THE_SEA,
|
||||
CROSSBOW,
|
||||
SUSPICIOUS_STEW,
|
||||
LOOM,
|
||||
FLOWER_BANNER_PATTERN,
|
||||
CREEPER_BANNER_PATTERN,
|
||||
SKULL_BANNER_PATTERN,
|
||||
MOJANG_BANNER_PATTERN,
|
||||
GLOBE_BANNER_PATTERN,
|
||||
BARREL,
|
||||
SMOKER,
|
||||
BLAST_FURNACE,
|
||||
CARTOGRAPHY_TABLE,
|
||||
FLETCHING_TABLE,
|
||||
GRINDSTONE,
|
||||
LECTERN,
|
||||
SMITHING_TABLE,
|
||||
STONECUTTER,
|
||||
BELL,
|
||||
LANTERN,
|
||||
SWEET_BERRIES,
|
||||
CAMPFIRE,
|
||||
HONEYCOMB,
|
||||
BEE_NEST,
|
||||
BEEHIVE,
|
||||
HONEY_BOTTLE,
|
||||
HONEY_BLOCK,
|
||||
HONEYCOMB_BLOCK;
|
||||
|
||||
private static Map<Integer, Material> idToMaterial = new HashMap<>();
|
||||
private static Short2ObjectOpenHashMap<Material> idToMaterial = new Short2ObjectOpenHashMap<>();
|
||||
|
||||
static {
|
||||
for (Material material : values()) {
|
||||
idToMaterial.put(material.id, material);
|
||||
}
|
||||
}
|
||||
private short materialId;
|
||||
private Block block;
|
||||
|
||||
private int id;
|
||||
private int blockId;
|
||||
|
||||
Material(int id, int blockId) {
|
||||
this.id = id;
|
||||
this.blockId = blockId;
|
||||
}
|
||||
|
||||
public static Material fromId(int id) {
|
||||
public static Material fromId(short id) {
|
||||
return idToMaterial.get(id);
|
||||
}
|
||||
|
||||
public void setIdentifier(short materialId, Block block) {
|
||||
this.materialId = materialId;
|
||||
this.block = block;
|
||||
|
||||
idToMaterial.put(materialId, this);
|
||||
}
|
||||
|
||||
public boolean isBlock() {
|
||||
return blockId != 0;
|
||||
return block != null;
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
return block;
|
||||
}
|
||||
|
||||
public boolean isFood() {
|
||||
return false; // TODO
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
public short getId() {
|
||||
return materialId;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import fr.themode.minestom.event.PlayerBlockInteractEvent;
|
||||
import fr.themode.minestom.event.PlayerBlockPlaceEvent;
|
||||
import fr.themode.minestom.instance.Chunk;
|
||||
import fr.themode.minestom.instance.Instance;
|
||||
import fr.themode.minestom.instance.block.Block;
|
||||
import fr.themode.minestom.instance.block.CustomBlock;
|
||||
import fr.themode.minestom.inventory.PlayerInventory;
|
||||
import fr.themode.minestom.item.ItemStack;
|
||||
@ -61,10 +60,8 @@ public class BlockPlacementListener {
|
||||
|
||||
player.callEvent(PlayerBlockPlaceEvent.class, playerBlockPlaceEvent);
|
||||
if (!playerBlockPlaceEvent.isCancelled()) {
|
||||
short id = (short) usedItem.getMaterialId();
|
||||
System.out.println("id: " + id);
|
||||
instance.setBlock(blockPosition, Block.REDSTONE_WIRE);
|
||||
//instance.setCustomBlock(blockPosition, "updatable"); // TODO set useItem's block instead
|
||||
instance.setBlock(blockPosition, material.getBlock());
|
||||
//instance.setCustomBlock(blockPosition, "updatable");
|
||||
if (playerBlockPlaceEvent.doesConsumeBlock()) {
|
||||
|
||||
StackingRule stackingRule = usedItem.getStackingRule();
|
||||
|
@ -0,0 +1,8 @@
|
||||
package fr.themode.minestom.registry;
|
||||
|
||||
public class RegistryEntityType {
|
||||
|
||||
protected String name;
|
||||
protected int entityId;
|
||||
|
||||
}
|
@ -2,7 +2,7 @@ package fr.themode.minestom.registry;
|
||||
|
||||
public class RegistryItem {
|
||||
|
||||
protected String name;
|
||||
protected short itemId;
|
||||
protected short blockId;
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,9 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import fr.themode.minestom.entity.EntityType;
|
||||
import fr.themode.minestom.instance.block.Block;
|
||||
import fr.themode.minestom.item.Material;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
@ -16,18 +18,24 @@ import java.util.Set;
|
||||
|
||||
public class RegistryMain {
|
||||
|
||||
public static final String BLOCKS_PATH = "registry/blocks.json";
|
||||
public static final String ITEMS_PATH = "registry/registries.json";
|
||||
public static final String ENTITIES_PATH = "registry/registries.json";
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<RegistryBlock> blocks = parseBlocks("registry/blocks.json");
|
||||
writeBlocksClass(blocks);
|
||||
|
||||
|
||||
List<RegistryBlock> blocks = parseBlocks(BLOCKS_PATH);
|
||||
List<RegistryItem> items = parseItems(ITEMS_PATH);
|
||||
List<RegistryEntityType> entities = parseEntities(ENTITIES_PATH);
|
||||
//writeBlocksClass(blocks);
|
||||
//writeItemsClass(items);
|
||||
writeEntitiesClass(entities);
|
||||
}
|
||||
|
||||
public static void registerBlocks() {
|
||||
List<RegistryBlock> blocks = parseBlocks("registry/blocks.json");
|
||||
List<RegistryBlock> blocks = parseBlocks(BLOCKS_PATH);
|
||||
|
||||
for (RegistryBlock registryBlock : blocks) {
|
||||
String name = registryBlock.name.toUpperCase().replace("MINECRAFT:", "");
|
||||
String name = registryBlock.name;
|
||||
Block block = Block.valueOf(name);
|
||||
block.initBlock(registryBlock.defaultId);
|
||||
|
||||
@ -40,9 +48,32 @@ public class RegistryMain {
|
||||
|
||||
}
|
||||
|
||||
private static void writeBlocksClass(List<RegistryBlock> blocks) {
|
||||
final String prefix = "public static final Blocks ";
|
||||
public static void registerItems() {
|
||||
List<RegistryItem> items = parseItems(ITEMS_PATH);
|
||||
|
||||
for (RegistryItem registryItem : items) {
|
||||
Material material = Material.valueOf(registryItem.name);
|
||||
try {
|
||||
Block block = Block.valueOf(registryItem.name);
|
||||
material.setIdentifier(registryItem.itemId, block);
|
||||
//System.out.println("REGISTERS: "+material+" : "+block);
|
||||
} catch (IllegalArgumentException e) {
|
||||
material.setIdentifier(registryItem.itemId, null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void registerEntities() {
|
||||
List<RegistryEntityType> registryEntityTypes = parseEntities(ITEMS_PATH);
|
||||
for (RegistryEntityType registryEntityType : registryEntityTypes) {
|
||||
EntityType entity = EntityType.valueOf(registryEntityType.name);
|
||||
entity.setIdentifier(registryEntityType.entityId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void writeBlocksClass(List<RegistryBlock> blocks) {
|
||||
for (RegistryBlock registryBlock : blocks) {
|
||||
String line = "";
|
||||
// Add block name as var name
|
||||
@ -55,6 +86,20 @@ public class RegistryMain {
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeItemsClass(List<RegistryItem> items) {
|
||||
for (RegistryItem registryItem : items) {
|
||||
String line = registryItem.name + ",";
|
||||
System.out.println(line);
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeEntitiesClass(List<RegistryEntityType> entities) {
|
||||
for (RegistryEntityType registryEntityType : entities) {
|
||||
String line = registryEntityType.name + ",";
|
||||
System.out.println(line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static List<RegistryBlock> parseBlocks(String path) {
|
||||
List<RegistryBlock> blocks = new ArrayList<>();
|
||||
@ -70,7 +115,7 @@ public class RegistryMain {
|
||||
|
||||
String blockName = entry.getKey();
|
||||
|
||||
registryBlock.name = blockName;
|
||||
registryBlock.name = blockName.toUpperCase().replace("MINECRAFT:", "");
|
||||
|
||||
JsonObject blockObject = entry.getValue().getAsJsonObject();
|
||||
JsonObject propertiesObject = blockObject.getAsJsonObject("properties");
|
||||
@ -125,4 +170,64 @@ public class RegistryMain {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
private static List<RegistryItem> parseItems(String path) {
|
||||
List<RegistryItem> registryItems = new ArrayList<>();
|
||||
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
bufferedReader = new BufferedReader(new FileReader(path));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Gson gson = new Gson();
|
||||
JsonObject obj = gson.fromJson(bufferedReader, JsonObject.class);
|
||||
|
||||
JsonObject itemsObject = obj.getAsJsonObject("minecraft:item");
|
||||
JsonObject entriesObject = itemsObject.getAsJsonObject("entries");
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entriesEntries = entriesObject.entrySet();//will return members of your object
|
||||
for (Map.Entry<String, JsonElement> entryEntry : entriesEntries) {
|
||||
RegistryItem registryItem = new RegistryItem();
|
||||
registryItems.add(registryItem);
|
||||
String item = entryEntry.getKey();
|
||||
String itemName = item.toUpperCase().replace("MINECRAFT:", "");
|
||||
registryItem.name = itemName;
|
||||
short id = entryEntry.getValue().getAsJsonObject().get("protocol_id").getAsShort();
|
||||
registryItem.itemId = id;
|
||||
}
|
||||
|
||||
return registryItems;
|
||||
}
|
||||
|
||||
private static List<RegistryEntityType> parseEntities(String path) {
|
||||
List<RegistryEntityType> registryEntityTypes = new ArrayList<>();
|
||||
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
bufferedReader = new BufferedReader(new FileReader(path));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Gson gson = new Gson();
|
||||
JsonObject obj = gson.fromJson(bufferedReader, JsonObject.class);
|
||||
|
||||
JsonObject itemsObject = obj.getAsJsonObject("minecraft:entity_type");
|
||||
JsonObject entriesObject = itemsObject.getAsJsonObject("entries");
|
||||
|
||||
Set<Map.Entry<String, JsonElement>> entriesEntries = entriesObject.entrySet();//will return members of your object
|
||||
for (Map.Entry<String, JsonElement> entryEntry : entriesEntries) {
|
||||
RegistryEntityType registryEntityType = new RegistryEntityType();
|
||||
registryEntityTypes.add(registryEntityType);
|
||||
String item = entryEntry.getKey();
|
||||
String itemName = item.toUpperCase().replace("MINECRAFT:", "");
|
||||
registryEntityType.name = itemName;
|
||||
short id = entryEntry.getValue().getAsJsonObject().get("protocol_id").getAsShort();
|
||||
registryEntityType.entityId = id;
|
||||
}
|
||||
|
||||
return registryEntityTypes;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import fr.themode.minestom.net.packet.PacketReader;
|
||||
import fr.themode.minestom.utils.buffer.BufferWrapper;
|
||||
import fr.themode.minestom.utils.consumer.StringConsumer;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@ -17,11 +17,7 @@ public class Utils {
|
||||
|
||||
public static void writeString(Packet packet, String value) {
|
||||
byte[] bytes = new byte[0];
|
||||
try {
|
||||
bytes = value.getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
bytes = value.getBytes(StandardCharsets.UTF_8);
|
||||
if (bytes.length > 32767) {
|
||||
System.out.println("String too big (was " + value.length() + " bytes encoded, max " + 32767 + ")");
|
||||
} else {
|
||||
@ -34,12 +30,7 @@ public class Utils {
|
||||
ConnectionUtils.readVarInt(client, length -> {
|
||||
int stringLength = Utils.lengthVarInt(length) + length;
|
||||
client.readBytes(length, bytes -> {
|
||||
try {
|
||||
consumer.accept(new String(bytes, "UTF-8"), stringLength);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
consumer.accept(null, stringLength);
|
||||
e.printStackTrace();
|
||||
}
|
||||
consumer.accept(new String(bytes, StandardCharsets.UTF_8), stringLength);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -48,12 +39,7 @@ public class Utils {
|
||||
|
||||
client.readShort(length -> {
|
||||
client.readBytes(length, bytes -> {
|
||||
try {
|
||||
consumer.accept(new String(bytes, "UTF-8"), length);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
consumer.accept(null, length);
|
||||
e.printStackTrace();
|
||||
}
|
||||
consumer.accept(new String(bytes, StandardCharsets.UTF_8), length);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -184,7 +170,7 @@ public class Utils {
|
||||
}
|
||||
|
||||
reader.readByte(count -> {
|
||||
ItemStack item = new ItemStack(id, count);
|
||||
ItemStack item = new ItemStack((short) id, count);
|
||||
reader.readByte(nbt -> { // Should be compound start (0x0A) or 0 if there isn't NBT data
|
||||
if (nbt == 0x00) {
|
||||
consumer.accept(item);
|
||||
|
Loading…
Reference in New Issue
Block a user