mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Item Registry Test is now functional
This commit is contained in:
@ -923,7 +923,6 @@ public final class BlockTypes {
|
||||
{ // Register new blocks
|
||||
int internalId = 1;
|
||||
for (Map.Entry<String, String> entry : blockMap.entrySet()) {
|
||||
String id = entry.getKey();
|
||||
String defaultState = entry.getValue();
|
||||
// Skip already registered ids
|
||||
for (; values[internalId] != null; internalId++);
|
||||
@ -994,7 +993,7 @@ public final class BlockTypes {
|
||||
|
||||
throw new SuggestInputParseException("Does not match a valid block type: " + inputLower, inputLower, () -> Stream.of(BlockTypes.values)
|
||||
.filter(b -> StringMan.blockStateMatches(inputLower, b.getId()))
|
||||
.map(e1 -> e1.getId())
|
||||
.map(BlockType::getId)
|
||||
.sorted(StringMan.blockStateComparator(inputLower))
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
@ -1004,12 +1003,14 @@ public final class BlockTypes {
|
||||
return $NAMESPACES;
|
||||
}
|
||||
|
||||
public static @Nullable BlockType get(final String id) {
|
||||
return BlockType.REGISTRY.getMap().get(id);
|
||||
@Nullable
|
||||
public static BlockType get(final String id) {
|
||||
return BlockType.REGISTRY.get(id);
|
||||
}
|
||||
|
||||
public static @Nullable BlockType get(final CharSequence id) {
|
||||
return BlockType.REGISTRY.getMap().get(id);
|
||||
@Nullable
|
||||
public static BlockType get(final CharSequence id) {
|
||||
return BlockType.REGISTRY.get(id.toString());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
@ -232,7 +232,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 = Optional.ofNullable(get("minecraft:dandelion_yellow")).orElseGet(() -> (get("minecraft:yellow_dye")));
|
||||
@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");
|
||||
@ -730,7 +730,7 @@ public final class ItemTypes {
|
||||
@Nullable public static final ItemType REPEATER = get("minecraft:repeater");
|
||||
@Nullable public static final ItemType REPEATING_COMMAND_BLOCK = get("minecraft:repeating_command_block");
|
||||
@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 = Optional.ofNullable(get("minecraft:rose_red")).orElseGet(() -> (get("minecraft:red_dye")));
|
||||
@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");
|
||||
@ -752,7 +752,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 = Optional.ofNullable(get("minecraft:sign")).orElseGet(() -> (get("minecraft:oak_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");
|
||||
@ -929,7 +929,7 @@ public final class ItemTypes {
|
||||
return get(input);
|
||||
}
|
||||
|
||||
public static @Nullable ItemType get(String id) {
|
||||
public static @Nullable ItemType get(final String id) {
|
||||
return ItemType.REGISTRY.get(id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user