mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-03-07 13:48:00 +08:00
Regenerate list classes from MCUtils
This commit is contained in:
parent
5f9f10599e
commit
da4d70fab5
@ -22,10 +22,12 @@
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Stores a list of common Biome String IDs.
|
||||
* Stores a list of common {@link BiomeType BiomeTypes}.
|
||||
*
|
||||
* @see BiomeType
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class BiomeTypes {
|
||||
|
||||
@Nullable public static final BiomeType BADLANDS = get("minecraft:badlands");
|
||||
@Nullable public static final BiomeType BADLANDS_PLATEAU = get("minecraft:badlands_plateau");
|
||||
@Nullable public static final BiomeType BAMBOO_JUNGLE = get("minecraft:bamboo_jungle");
|
||||
@ -110,15 +112,10 @@ public final class BiomeTypes {
|
||||
private BiomeTypes() {
|
||||
}
|
||||
|
||||
private static BiomeType register(final String id) {
|
||||
return register(new BiomeType(id));
|
||||
}
|
||||
|
||||
public static BiomeType register(final BiomeType biome) {
|
||||
return BiomeType.REGISTRY.register(biome.getId(), biome);
|
||||
}
|
||||
|
||||
public static @Nullable BiomeType get(final String id) {
|
||||
/**
|
||||
* Gets the {@link BiomeType} associated with the given id.
|
||||
*/
|
||||
public static @Nullable BiomeType get(String id) {
|
||||
return BiomeType.REGISTRY.get(id);
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,12 @@
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
/**
|
||||
* Stores a list of categories of Block Types.
|
||||
* Stores a list of common {@link BlockCategory BlockCategories}.
|
||||
*
|
||||
* @see BlockCategory
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class BlockCategories {
|
||||
|
||||
public static final BlockCategory ACACIA_LOGS = get("minecraft:acacia_logs");
|
||||
public static final BlockCategory ANVIL = get("minecraft:anvil");
|
||||
public static final BlockCategory BAMBOO_PLANTABLE_ON = get("minecraft:bamboo_plantable_on");
|
||||
@ -112,11 +114,14 @@ public final class BlockCategories {
|
||||
private BlockCategories() {
|
||||
}
|
||||
|
||||
private static BlockCategory get(final String id) {
|
||||
BlockCategory blockCategory = BlockCategory.REGISTRY.get(id);
|
||||
if (blockCategory == null) {
|
||||
/**
|
||||
* Gets the {@link BlockCategory} associated with the given id.
|
||||
*/
|
||||
public static BlockCategory get(String id) {
|
||||
BlockCategory entry = BlockCategory.REGISTRY.get(id);
|
||||
if (entry == null) {
|
||||
return new BlockCategory(id);
|
||||
}
|
||||
return blockCategory;
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
@ -19,15 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Stores a list of common Block String IDs.
|
||||
* Stores a list of common {@link BlockType BlockTypes}.
|
||||
*
|
||||
* @see BlockType
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class BlockTypes {
|
||||
|
||||
@Nullable public static final BlockType ACACIA_BUTTON = get("minecraft:acacia_button");
|
||||
@Nullable public static final BlockType ACACIA_DOOR = get("minecraft:acacia_door");
|
||||
@Nullable public static final BlockType ACACIA_FENCE = get("minecraft:acacia_fence");
|
||||
@ -646,7 +646,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType SEAGRASS = get("minecraft:seagrass");
|
||||
@Nullable public static final BlockType SHROOMLIGHT = get("minecraft:shroomlight");
|
||||
@Nullable public static final BlockType SHULKER_BOX = get("minecraft:shulker_box");
|
||||
@Deprecated @Nullable public static final BlockType SIGN = Optional.ofNullable(get("minecraft:sign")).orElse(get("minecraft:oak_sign"));
|
||||
@Deprecated @Nullable public static final BlockType SIGN = get("minecraft:sign");
|
||||
@Nullable public static final BlockType SKELETON_SKULL = get("minecraft:skeleton_skull");
|
||||
@Nullable public static final BlockType SKELETON_WALL_SKULL = get("minecraft:skeleton_wall_skull");
|
||||
@Nullable public static final BlockType SLIME_BLOCK = get("minecraft:slime_block");
|
||||
@ -739,7 +739,7 @@ public final class BlockTypes {
|
||||
@Nullable public static final BlockType TWISTING_VINES_PLANT = get("minecraft:twisting_vines_plant");
|
||||
@Nullable public static final BlockType VINE = get("minecraft:vine");
|
||||
@Nullable public static final BlockType VOID_AIR = get("minecraft:void_air");
|
||||
@Deprecated @Nullable public static final BlockType WALL_SIGN = Optional.ofNullable(get("minecraft:wall_sign")).orElse(get("minecraft:oak_wall_sign"));
|
||||
@Deprecated @Nullable public static final BlockType WALL_SIGN = get("minecraft:wall_sign");
|
||||
@Nullable public static final BlockType WALL_TORCH = get("minecraft:wall_torch");
|
||||
@Nullable public static final BlockType WARPED_BUTTON = get("minecraft:warped_button");
|
||||
@Nullable public static final BlockType WARPED_DOOR = get("minecraft:warped_door");
|
||||
@ -797,8 +797,10 @@ public final class BlockTypes {
|
||||
private BlockTypes() {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static BlockType get(final String id) {
|
||||
/**
|
||||
* Gets the {@link BlockType} associated with the given id.
|
||||
*/
|
||||
public static @Nullable BlockType get(String id) {
|
||||
return BlockType.REGISTRY.get(id);
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,13 @@
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class EntityTypes {
|
||||
|
||||
/**
|
||||
* Stores a list of common {@link EntityType EntityTypes}.
|
||||
*
|
||||
* @see EntityType
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class EntityTypes {
|
||||
@Nullable public static final EntityType AREA_EFFECT_CLOUD = get("minecraft:area_effect_cloud");
|
||||
@Nullable public static final EntityType ARMOR_STAND = get("minecraft:armor_stand");
|
||||
@Nullable public static final EntityType ARROW = get("minecraft:arrow");
|
||||
@ -128,15 +133,17 @@ public class EntityTypes {
|
||||
@Nullable public static final EntityType ZOGLIN = get("minecraft:zoglin");
|
||||
@Nullable public static final EntityType ZOMBIE = get("minecraft:zombie");
|
||||
@Nullable public static final EntityType ZOMBIE_HORSE = get("minecraft:zombie_horse");
|
||||
@Nullable @Deprecated public static final EntityType ZOMBIE_PIGMAN = get("minecraft:zombie_pigman");
|
||||
@Deprecated @Nullable public static final EntityType ZOMBIE_PIGMAN = get("minecraft:zombie_pigman");
|
||||
@Nullable public static final EntityType ZOMBIE_VILLAGER = get("minecraft:zombie_villager");
|
||||
@Nullable public static final EntityType ZOMBIFIED_PIGLIN = get("minecraft:zombified_piglin");
|
||||
|
||||
private EntityTypes() {
|
||||
}
|
||||
|
||||
public static @Nullable EntityType get(final String id) {
|
||||
/**
|
||||
* Gets the {@link EntityType} associated with the given id.
|
||||
*/
|
||||
public static @Nullable EntityType get(String id) {
|
||||
return EntityType.REGISTRY.get(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,10 +20,12 @@
|
||||
package com.sk89q.worldedit.world.item;
|
||||
|
||||
/**
|
||||
* Stores a list of categories of Item Types.
|
||||
* Stores a list of common {@link ItemCategory ItemCategories}.
|
||||
*
|
||||
* @see ItemCategory
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class ItemCategories {
|
||||
|
||||
public static final ItemCategory ACACIA_LOGS = get("minecraft:acacia_logs");
|
||||
public static final ItemCategory ANVIL = get("minecraft:anvil");
|
||||
public static final ItemCategory ARROWS = get("minecraft:arrows");
|
||||
@ -82,11 +84,14 @@ public final class ItemCategories {
|
||||
private ItemCategories() {
|
||||
}
|
||||
|
||||
private static ItemCategory get(final String id) {
|
||||
ItemCategory itemCategory = ItemCategory.REGISTRY.get(id);
|
||||
if (itemCategory == null) {
|
||||
/**
|
||||
* Gets the {@link ItemCategory} associated with the given id.
|
||||
*/
|
||||
public static ItemCategory get(String id) {
|
||||
ItemCategory entry = ItemCategory.REGISTRY.get(id);
|
||||
if (entry == null) {
|
||||
return new ItemCategory(id);
|
||||
}
|
||||
return itemCategory;
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
@ -19,11 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.world.item;
|
||||
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Stores a list of common {@link ItemType ItemTypes}.
|
||||
*
|
||||
* @see ItemType
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class ItemTypes {
|
||||
|
||||
@Nullable public static final ItemType ACACIA_BOAT = get("minecraft:acacia_boat");
|
||||
@Nullable public static final ItemType ACACIA_BUTTON = get("minecraft:acacia_button");
|
||||
@Nullable public static final ItemType ACACIA_DOOR = get("minecraft:acacia_door");
|
||||
@ -153,7 +157,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType BUBBLE_CORAL_FAN = get("minecraft:bubble_coral_fan");
|
||||
@Nullable public static final ItemType BUCKET = get("minecraft:bucket");
|
||||
@Nullable public static final ItemType CACTUS = get("minecraft:cactus");
|
||||
@Deprecated @Nullable public static final ItemType CACTUS_GREEN = Optional.ofNullable(get("minecraft:cactus_green")).orElseGet(() -> get("minecraft:green_dye"));
|
||||
@Deprecated @Nullable public static final ItemType CACTUS_GREEN = get("minecraft:cactus_green");
|
||||
@Nullable public static final ItemType CAKE = get("minecraft:cake");
|
||||
@Nullable public static final ItemType CAMPFIRE = get("minecraft:campfire");
|
||||
@Nullable public static final ItemType CARROT = get("minecraft:carrot");
|
||||
@ -258,7 +262,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType CYAN_WOOL = get("minecraft:cyan_wool");
|
||||
@Nullable public static final ItemType DAMAGED_ANVIL = get("minecraft:damaged_anvil");
|
||||
@Nullable public static final ItemType DANDELION = get("minecraft:dandelion");
|
||||
@Deprecated @Nullable public static final ItemType DANDELION_YELLOW = Optional.ofNullable(get("minecraft:dandelion_yellow")).orElseGet(() -> (get("minecraft:yellow_dye")));
|
||||
@Deprecated @Nullable public static final ItemType DANDELION_YELLOW = get("minecraft:dandelion_yellow");
|
||||
@Nullable public static final ItemType DARK_OAK_BOAT = get("minecraft:dark_oak_boat");
|
||||
@Nullable public static final ItemType DARK_OAK_BUTTON = get("minecraft:dark_oak_button");
|
||||
@Nullable public static final ItemType DARK_OAK_DOOR = get("minecraft:dark_oak_door");
|
||||
@ -793,7 +797,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType REPEATING_COMMAND_BLOCK = get("minecraft:repeating_command_block");
|
||||
@Nullable public static final ItemType RESPAWN_ANCHOR = get("minecraft:respawn_anchor");
|
||||
@Nullable public static final ItemType ROSE_BUSH = get("minecraft:rose_bush");
|
||||
@Deprecated @Nullable public static final ItemType ROSE_RED = Optional.ofNullable(get("minecraft:rose_red")).orElseGet(() -> (get("minecraft:red_dye")));
|
||||
@Deprecated @Nullable public static final ItemType ROSE_RED = get("minecraft:rose_red");
|
||||
@Nullable public static final ItemType ROTTEN_FLESH = get("minecraft:rotten_flesh");
|
||||
@Nullable public static final ItemType SADDLE = get("minecraft:saddle");
|
||||
@Nullable public static final ItemType SALMON = get("minecraft:salmon");
|
||||
@ -816,7 +820,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType SHULKER_BOX = get("minecraft:shulker_box");
|
||||
@Nullable public static final ItemType SHULKER_SHELL = get("minecraft:shulker_shell");
|
||||
@Nullable public static final ItemType SHULKER_SPAWN_EGG = get("minecraft:shulker_spawn_egg");
|
||||
@Deprecated @Nullable public static final ItemType SIGN = Optional.ofNullable(get("minecraft:sign")).orElseGet(() -> (get("minecraft:oak_sign")));
|
||||
@Deprecated @Nullable public static final ItemType SIGN = get("minecraft:sign");
|
||||
@Nullable public static final ItemType SILVERFISH_SPAWN_EGG = get("minecraft:silverfish_spawn_egg");
|
||||
@Nullable public static final ItemType SKELETON_HORSE_SPAWN_EGG = get("minecraft:skeleton_horse_spawn_egg");
|
||||
@Nullable public static final ItemType SKELETON_SKULL = get("minecraft:skeleton_skull");
|
||||
@ -1000,7 +1004,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType ZOGLIN_SPAWN_EGG = get("minecraft:zoglin_spawn_egg");
|
||||
@Nullable public static final ItemType ZOMBIE_HEAD = get("minecraft:zombie_head");
|
||||
@Nullable public static final ItemType ZOMBIE_HORSE_SPAWN_EGG = get("minecraft:zombie_horse_spawn_egg");
|
||||
@Nullable @Deprecated public static final ItemType ZOMBIE_PIGMAN_SPAWN_EGG = get("minecraft:zombie_pigman_spawn_egg");
|
||||
@Deprecated @Nullable public static final ItemType ZOMBIE_PIGMAN_SPAWN_EGG = get("minecraft:zombie_pigman_spawn_egg");
|
||||
@Nullable public static final ItemType ZOMBIE_SPAWN_EGG = get("minecraft:zombie_spawn_egg");
|
||||
@Nullable public static final ItemType ZOMBIE_VILLAGER_SPAWN_EGG = get("minecraft:zombie_villager_spawn_egg");
|
||||
@Nullable public static final ItemType ZOMBIFIED_PIGLIN_SPAWN_EGG = get("minecraft:zombified_piglin_spawn_egg");
|
||||
@ -1008,7 +1012,10 @@ public final class ItemTypes {
|
||||
private ItemTypes() {
|
||||
}
|
||||
|
||||
public static @Nullable ItemType get(final String id) {
|
||||
/**
|
||||
* Gets the {@link ItemType} associated with the given id.
|
||||
*/
|
||||
public static @Nullable ItemType get(String id) {
|
||||
return ItemType.REGISTRY.get(id);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user