mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 18:45:34 +01:00
add spawn egg lookup
This commit is contained in:
parent
1bd5010471
commit
58ddb600b6
@ -6,6 +6,7 @@ import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
@ -932,7 +933,7 @@ public enum LegacyMaterials {
|
||||
TNT_MINECART("EXPLOSIVE_MINECART"),
|
||||
TORCH,
|
||||
TOTEM_OF_UNDYING("TOTEM"),
|
||||
TRADER_LLAMA_SPAWN_EGG(ServerVersion.V1_14, "LLAMA_SPAWN_EGG"),
|
||||
TRADER_LLAMA_SPAWN_EGG(),
|
||||
TRAPPED_CHEST,
|
||||
TRIDENT,
|
||||
TRIPWIRE,
|
||||
@ -2026,6 +2027,13 @@ public enum LegacyMaterials {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static LegacyMaterials getSpawnEgg(EntityType type) {
|
||||
if(type == EntityType.MUSHROOM_COW) {
|
||||
return MOOSHROOM_SPAWN_EGG;
|
||||
}
|
||||
return lookupMap.get(type.name() + "_SPAWN_EGG");
|
||||
}
|
||||
|
||||
public static LegacyMaterials getGlassPaneColor(int color) {
|
||||
switch (color) {
|
||||
case 0:
|
||||
|
Loading…
Reference in New Issue
Block a user