/** * Retrieves a read/write structure for block fields. * <p> * This modifier will automatically marshal between Material and the * internal Minecraft Block. * @return A modifier for GameProfile fields. */ public StructureModifier<Material> getBlocks() { // Convert to and from the Bukkit wrapper return structureModifier.withType( MinecraftReflection.getBlockClass(), BukkitConverters.getBlockConverter()); }
@Override public Material getType() { Object block = GET_BLOCK.invoke(handle); return BukkitConverters.getBlockConverter().getSpecific(block); }
builder.put(MinecraftReflection.getBlockClass(), (EquivalentConverter) getBlockConverter()); builder.put(MinecraftReflection.getGameProfileClass(), (EquivalentConverter) getWrappedGameProfileConverter()); builder.put(MinecraftReflection.getIChatBaseComponentClass(), (EquivalentConverter) getWrappedChatComponentConverter());