diff --git a/core/build.gradle b/core/build.gradle index 714f7568..20761f79 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -50,9 +50,6 @@ jar { archiveVersion.set("${version}") from { project(':api').sourceSets.main.output } - from { project(':nms:v1_21').sourceSets.main.output } - from { project(':nms:v1_21_4').sourceSets.main.output } - from { project(':nms:v1_21_6').sourceSets.main.output } from sourceSets.main.output duplicatesStrategy = DuplicatesStrategy.EXCLUDE exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' diff --git a/core/src/main/java/github/nighter/smartspawner/SmartSpawner.java b/core/src/main/java/github/nighter/smartspawner/SmartSpawner.java index ad413e22..c78ce701 100644 --- a/core/src/main/java/github/nighter/smartspawner/SmartSpawner.java +++ b/core/src/main/java/github/nighter/smartspawner/SmartSpawner.java @@ -10,6 +10,7 @@ import github.nighter.smartspawner.commands.list.gui.management.SpawnerManagementGUI; import github.nighter.smartspawner.commands.list.gui.adminstacker.AdminStackerHandler; import github.nighter.smartspawner.commands.prices.PricesGUI; +import github.nighter.smartspawner.config.MobHeadConfig; import github.nighter.smartspawner.logging.LoggingConfig; import github.nighter.smartspawner.logging.SpawnerActionLogger; import github.nighter.smartspawner.logging.SpawnerAuditListener; @@ -79,6 +80,7 @@ public class SmartSpawner extends JavaPlugin implements SmartSpawnerPlugin { private LanguageManager languageManager; private LanguageUpdater languageUpdater; private MessageService messageService; + private MobHeadConfig mobHeadConfig; // Factories private SpawnerItemFactory spawnerItemFactory; @@ -227,6 +229,10 @@ private void initializeServices() { this.languageUpdater = new LanguageUpdater(this); this.messageService = new MessageService(this, languageManager); + // Initialize mob head config + this.mobHeadConfig = new MobHeadConfig(this); + this.mobHeadConfig.load(); + // Initialize logging system this.loggingConfig = new LoggingConfig(this); this.spawnerActionLogger = new SpawnerActionLogger(this, loggingConfig); @@ -378,6 +384,13 @@ public void reload() { spawnerMenuAction.reload(); timeFormatter.clearCache(); + // Reload mob head config + if (mobHeadConfig != null) { + mobHeadConfig.reload(); + // Clear head cache to force regeneration with new textures + SpawnerMobHeadTexture.clearCache(); + } + // Reload logging system loggingConfig.loadConfig(); spawnerActionLogger.shutdown(); diff --git a/core/src/main/java/github/nighter/smartspawner/commands/give/GiveSubCommand.java b/core/src/main/java/github/nighter/smartspawner/commands/give/GiveSubCommand.java index 57ab9c91..53d268d3 100644 --- a/core/src/main/java/github/nighter/smartspawner/commands/give/GiveSubCommand.java +++ b/core/src/main/java/github/nighter/smartspawner/commands/give/GiveSubCommand.java @@ -7,7 +7,7 @@ import com.mojang.brigadier.suggestion.SuggestionProvider; import github.nighter.smartspawner.SmartSpawner; import github.nighter.smartspawner.commands.BaseSubCommand; -import github.nighter.smartspawner.nms.SpawnerWrapper; +import github.nighter.smartspawner.utils.DynamicEntityValidator; import github.nighter.smartspawner.spawner.item.SpawnerItemFactory; import io.papermc.paper.command.brigadier.CommandSourceStack; import io.papermc.paper.command.brigadier.Commands; @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.List; +import java.util.stream.Collectors; @NullMarked public class GiveSubCommand extends BaseSubCommand { @@ -31,7 +32,11 @@ public class GiveSubCommand extends BaseSubCommand { public GiveSubCommand(SmartSpawner plugin) { super(plugin); this.spawnerItemFactory = plugin.getSpawnerItemFactory(); - this.supportedMobs = SpawnerWrapper.SUPPORTED_MOBS; + // Generate supported mobs list from DynamicEntityValidator + this.supportedMobs = DynamicEntityValidator.getValidEntities().stream() + .map(EntityType::name) + .sorted() + .collect(Collectors.toList()); } @Override diff --git a/core/src/main/java/github/nighter/smartspawner/config/MobHeadConfig.java b/core/src/main/java/github/nighter/smartspawner/config/MobHeadConfig.java new file mode 100644 index 00000000..6466d457 --- /dev/null +++ b/core/src/main/java/github/nighter/smartspawner/config/MobHeadConfig.java @@ -0,0 +1,188 @@ +package github.nighter.smartspawner.config; + +import github.nighter.smartspawner.SmartSpawner; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.entity.EntityType; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.util.EnumMap; +import java.util.Map; +import java.util.logging.Level; + +/** + * Manages player-configurable mob head textures for spawner GUI + */ +public class MobHeadConfig { + private final SmartSpawner plugin; + private FileConfiguration config; + private final File configFile; + + private Material defaultMaterial; + private final Map mobHeadMap = new EnumMap<>(EntityType.class); + + public MobHeadConfig(SmartSpawner plugin) { + this.plugin = plugin; + this.configFile = new File(plugin.getDataFolder(), "mob_heads.yml"); + } + + /** + * Load or create the mob heads configuration + */ + public void load() { + // Create config file if it doesn't exist + if (!configFile.exists()) { + saveDefaultConfig(); + } + + // Load the configuration + config = YamlConfiguration.loadConfiguration(configFile); + + // Parse configuration + parseConfig(); + } + + /** + * Save the default configuration from resources + */ + private void saveDefaultConfig() { + try { + if (!plugin.getDataFolder().exists()) { + plugin.getDataFolder().mkdirs(); + } + + try (InputStream in = plugin.getResource("mob_heads.yml")) { + if (in != null) { + Files.copy(in, configFile.toPath()); + plugin.getLogger().info("Created default mob_heads.yml configuration"); + } else { + plugin.getLogger().warning("Could not find default mob_heads.yml in resources"); + } + } + } catch (IOException e) { + plugin.getLogger().log(Level.SEVERE, "Could not create mob_heads.yml", e); + } + } + + /** + * Parse the configuration and populate the mob head map + */ + private void parseConfig() { + mobHeadMap.clear(); + + // Get default material + String defaultMaterialName = config.getString("default_material", "SPAWNER"); + try { + defaultMaterial = Material.valueOf(defaultMaterialName.toUpperCase()); + } catch (IllegalArgumentException e) { + plugin.getLogger().warning("Invalid default_material in mob_heads.yml: " + defaultMaterialName + ", using SPAWNER"); + defaultMaterial = Material.SPAWNER; + } + + // Parse mob heads + ConfigurationSection mobHeadsSection = config.getConfigurationSection("mob_heads"); + if (mobHeadsSection == null) { + plugin.getLogger().warning("No mob_heads section found in mob_heads.yml"); + return; + } + + for (String entityTypeName : mobHeadsSection.getKeys(false)) { + try { + EntityType entityType = EntityType.valueOf(entityTypeName.toUpperCase()); + ConfigurationSection entitySection = mobHeadsSection.getConfigurationSection(entityTypeName); + + if (entitySection != null) { + String materialName = entitySection.getString("material", "SPAWNER"); + String customTexture = entitySection.getString("custom_texture"); + + // Validate material + Material material; + try { + material = Material.valueOf(materialName.toUpperCase()); + if (!material.isItem()) { + plugin.getLogger().warning("Material " + materialName + " for " + entityTypeName + " is not an item, using default"); + material = defaultMaterial; + } + } catch (IllegalArgumentException e) { + plugin.getLogger().warning("Invalid material " + materialName + " for " + entityTypeName + ", using default"); + material = defaultMaterial; + } + + // Store mob head data + mobHeadMap.put(entityType, new MobHeadData(material, customTexture)); + } + } catch (IllegalArgumentException e) { + plugin.getLogger().warning("Invalid entity type in mob_heads.yml: " + entityTypeName); + } + } + + plugin.getLogger().info("Loaded " + mobHeadMap.size() + " mob head configurations"); + } + + /** + * Get the material for a specific entity type + * + * @param entityType Entity type + * @return Material to use for the mob head + */ + public Material getMaterial(EntityType entityType) { + MobHeadData data = mobHeadMap.get(entityType); + return data != null ? data.material : defaultMaterial; + } + + /** + * Get the custom texture for a specific entity type + * + * @param entityType Entity type + * @return Custom texture Base64 string, or null if not configured + */ + public String getCustomTexture(EntityType entityType) { + MobHeadData data = mobHeadMap.get(entityType); + return data != null ? data.customTexture : null; + } + + /** + * Check if an entity type has a custom texture configured + * + * @param entityType Entity type + * @return true if custom texture is configured + */ + public boolean hasCustomTexture(EntityType entityType) { + MobHeadData data = mobHeadMap.get(entityType); + return data != null && data.customTexture != null && !data.customTexture.isEmpty(); + } + + /** + * Get the default material for mobs without custom configuration + * + * @return Default material + */ + public Material getDefaultMaterial() { + return defaultMaterial; + } + + /** + * Reload the configuration + */ + public void reload() { + load(); + } + + /** + * Internal class to store mob head data + */ + private static class MobHeadData { + final Material material; + final String customTexture; + + MobHeadData(Material material, String customTexture) { + this.material = material; + this.customTexture = customTexture; + } + } +} diff --git a/core/src/main/java/github/nighter/smartspawner/nms/MaterialWrapper.java b/core/src/main/java/github/nighter/smartspawner/nms/MaterialWrapper.java deleted file mode 100644 index e55fbaf8..00000000 --- a/core/src/main/java/github/nighter/smartspawner/nms/MaterialWrapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package github.nighter.smartspawner.nms; - -import org.bukkit.Material; -import java.util.Map; -import java.util.Set; - -public class MaterialWrapper { - public static Map SUPPORTED_MATERIALS; - public static Set AVAILABLE_MATERIAL_NAMES; - - public static Material getMaterial(String materialName) { - if (SUPPORTED_MATERIALS == null) { - return null; - } - return SUPPORTED_MATERIALS.get(materialName.toUpperCase()); - } - - public static boolean isMaterialAvailable(String materialName) { - if (AVAILABLE_MATERIAL_NAMES == null) { - return false; - } - return AVAILABLE_MATERIAL_NAMES.contains(materialName.toUpperCase()); - } -} \ No newline at end of file diff --git a/core/src/main/java/github/nighter/smartspawner/nms/ParticleWrapper.java b/core/src/main/java/github/nighter/smartspawner/nms/ParticleWrapper.java deleted file mode 100644 index b5236c65..00000000 --- a/core/src/main/java/github/nighter/smartspawner/nms/ParticleWrapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package github.nighter.smartspawner.nms; - -import org.bukkit.Particle; - -public class ParticleWrapper { - public static Particle VILLAGER_HAPPY; - public static Particle SPELL_WITCH; -} \ No newline at end of file diff --git a/core/src/main/java/github/nighter/smartspawner/nms/SpawnerWrapper.java b/core/src/main/java/github/nighter/smartspawner/nms/SpawnerWrapper.java deleted file mode 100644 index 2e3a6034..00000000 --- a/core/src/main/java/github/nighter/smartspawner/nms/SpawnerWrapper.java +++ /dev/null @@ -1,7 +0,0 @@ -package github.nighter.smartspawner.nms; - -import java.util.List; - -public class SpawnerWrapper { - public static List SUPPORTED_MOBS; -} \ No newline at end of file diff --git a/core/src/main/java/github/nighter/smartspawner/nms/TextureWrapper.java b/core/src/main/java/github/nighter/smartspawner/nms/TextureWrapper.java deleted file mode 100644 index a7491d67..00000000 --- a/core/src/main/java/github/nighter/smartspawner/nms/TextureWrapper.java +++ /dev/null @@ -1,95 +0,0 @@ -package github.nighter.smartspawner.nms; - -import org.bukkit.entity.EntityType; -import java.util.EnumMap; -import java.util.Map; - -public class TextureWrapper { - private static final Map TEXTURE_MAP = new EnumMap<>(EntityType.class); - private static final Map VERSION_SPECIFIC_TEXTURES = new EnumMap<>(EntityType.class); - - public static void initializeCommonTextures() { - TEXTURE_MAP.put(EntityType.ALLAY, "df5de940bfe499c59ee8dac9f9c3919e7535eff3a9acb16f4842bf290f4c679f"); - TEXTURE_MAP.put(EntityType.AXOLOTL, "21c3aa0d539208b47972bf8e72f0505cdcfb8d7796b2fcf85911ce94fd0193d0"); - TEXTURE_MAP.put(EntityType.BAT, "81c5cc1f40005a33124c60384a0f17a36a7b19ae90f1c32dcda17b5b56280a43"); - TEXTURE_MAP.put(EntityType.BEE, "76ded8355a5625893e8041877af65683c2fd0aa09c3d3c1c94f5f80a0f8c22cb"); - TEXTURE_MAP.put(EntityType.BLAZE, "737623f79f7eb4f3f80da65b652cc44b2148eea41f9ffe2e86a23bdf49ab77b1"); - TEXTURE_MAP.put(EntityType.CAMEL, "7eb6ad908b8d5155bc4d249271ef6084d455dd0e70a4002eb148f9e20b9deb2c"); - TEXTURE_MAP.put(EntityType.CAT, "e0eeaa869f53fa989198f5595520aec9395509aba993596a86654b3a0f6ca4a6"); - TEXTURE_MAP.put(EntityType.CAVE_SPIDER, "eccc4a32d45d74e8b14ef1ffd55cd5f381a06d4999081d52eaea12e13293e209"); - TEXTURE_MAP.put(EntityType.CHICKEN, "4e8f3ea46735ad0c106c549ccb6cd489c97a41e73d092497ee424becd9dfd29c"); - TEXTURE_MAP.put(EntityType.COD, "7892d7dd6aadf35f86da27fb63da4edda211df96d2829f691462a4fb1cab0"); - TEXTURE_MAP.put(EntityType.COW, "b667c0e107be79d7679bfe89bbc57c6bf198ecb529a3295fcfdfd2f24408dca3"); - TEXTURE_MAP.put(EntityType.DOLPHIN , "8e9688b950d880b55b7aa2cfcd76e5a0fa94aac6d16f78e833f7443ea29fed3"); - TEXTURE_MAP.put(EntityType.DONKEY, "63a976c047f412ebc5cb197131ebef30c004c0faf49d8dd4105fca1207edaff3"); - TEXTURE_MAP.put(EntityType.DROWNED, "c84df79c49104b198cdad6d99fd0d0bcf1531c92d4ab6269e40b7d3cbbb8e98c"); - TEXTURE_MAP.put(EntityType.ELDER_GUARDIAN, "8df4fec3aa34ceddb025a42c9fc435a8029b062598b325322ba3cb5e5f351c1f"); - TEXTURE_MAP.put(EntityType.ENDERMAN, "4f24767c8138b3dfec02f77bd151994d480d4e869664ce09a26b19289212162b"); - TEXTURE_MAP.put(EntityType.ENDERMITE, "5bc7b9d36fb92b6bf292be73d32c6c5b0ecc25b44323a541fae1f1e67e393a3e"); - TEXTURE_MAP.put(EntityType.EVOKER, "630ce775edb65db8c2741bdfae84f3c0d0285aba93afadc74900d55dfd9504a5"); - TEXTURE_MAP.put(EntityType.FOX, "d8954a42e69e0881ae6d24d4281459c144a0d5a968aed35d6d3d73a3c65d26a"); - TEXTURE_MAP.put(EntityType.FROG, "2ca4a8e494582c62aaa2c92474b16d69cd63baa3d3f50a4b631d6559ca0f33f5"); - TEXTURE_MAP.put(EntityType.GHAST, "64ab8a22e7687cc4c78f3b6ff5b1eb04917b51cd3cd7dbce36171160b3c77ced"); - TEXTURE_MAP.put(EntityType.GOAT, "457a0d538fa08a7affe312903468861720f9fa34e86d44b89dcec5639265f03"); - TEXTURE_MAP.put(EntityType.GLOW_SQUID, "4cb07d905888f8472252f9cfa39aa317babcad30af08cfe751adefa716b02036"); - TEXTURE_MAP.put(EntityType.GUARDIAN, "b8e725779c234c590cce854db5c10485ed8d8a33fa9b2bdc3424b68bb1380bed"); - TEXTURE_MAP.put(EntityType.HOGLIN, "7ad7b5aeb220c079e319cd70ac8800e80774a9313c22f38e77afb89999e6ec87"); - TEXTURE_MAP.put(EntityType.HORSE, "e335e31961713353a76401e00c3454b7ca885b7784d5288d3227222d9b48d393"); - TEXTURE_MAP.put(EntityType.HUSK, "d674c63c8db5f4ca628d69a3b1f8a36e29d8fd775e1a6bdb6cabb4be4db121"); - TEXTURE_MAP.put(EntityType.IRON_GOLEM, "4271913a3fc8f56bdf6b90a4b4ed6a05c562ce0076b5344d444fb2b040ae57d"); - TEXTURE_MAP.put(EntityType.LLAMA, "9f7d90b305aa64313c8d4404d8d652a96eba8a754b67f4347dcccdd5a6a63398"); - TEXTURE_MAP.put(EntityType.MAGMA_CUBE, "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429"); - TEXTURE_MAP.put(EntityType.MULE, "a0486a742e7dda0bae61ce2f55fa13527f1c3b334c57c034bb4cf132fb5f5f"); - TEXTURE_MAP.put(EntityType.OCELOT, "5657cd5c2989ff97570fec4ddcdc6926a68a3393250c1be1f0b114a1db1"); - TEXTURE_MAP.put(EntityType.PANDA, "d5c3d618a70cc062e2edfaed15173e2a32ab6d773cf6050452e1b97fc66fb388"); - TEXTURE_MAP.put(EntityType.PARROT, "5df4b3401a4d06ad66ac8b5c4d189618ae617f9c143071c8ac39a563cf4e4208"); - TEXTURE_MAP.put(EntityType.PHANTOM, "adfe51801761660ebf6dae70e9cad588b2ef5e6cb2b3194d028a40ac0eebcdf5"); - TEXTURE_MAP.put(EntityType.PIG, "9b1760e3778f8087046b86bec6a0a83a567625f30f0d6bce866d4bed95dba6c1"); - TEXTURE_MAP.put(EntityType.PILLAGER, "4aee6bb37cbfc92b0d86db5ada4790c64ff4468d68b84942fde04405e8ef5333"); - TEXTURE_MAP.put(EntityType.POLAR_BEAR, "3d3cd8548e7dceb5c2394d1b00da2c61ffc0dde46229b10509eb27a0dcb23bfb"); - TEXTURE_MAP.put(EntityType.PUFFERFISH, "292350c9f0993ed54db2c7113936325683ffc20104a9b622aa457d37e708d931"); - TEXTURE_MAP.put(EntityType.RABBIT, "cd1d2bbc3d77ab0d119c031ea74d8781c93285cf736abc422baec1eb1560e8ca"); - TEXTURE_MAP.put(EntityType.RAVAGER, "cd20bf52ec390a0799299184fc678bf84cf732bb1bd78fd1c4b441858f0235a8"); - TEXTURE_MAP.put(EntityType.SALMON, "d4d001589b86c22cf24f1618fe7efef12932aa9148b5e4fc6ff4a614b990ae12"); - TEXTURE_MAP.put(EntityType.SHEEP, "a723893df4cfb9c7240fc47b560ccf6ddeb19da9183d33083f2c71f46dad290a"); - TEXTURE_MAP.put(EntityType.SHULKER, "537a294f6b7b4ba437e5cb35fb20f46792e7ac0a490a66132a557124ec5f997a"); - TEXTURE_MAP.put(EntityType.SILVERFISH, "bfe13237e1109cab7264dc53b0aa697cf9a7c62c984a269fb0755a288912bbca"); - TEXTURE_MAP.put(EntityType.SKELETON_HORSE, "ac7d8a16d3f0f98b598df93f2c2d34e75171cd52dbf4a1211d7b84c019416a40"); - TEXTURE_MAP.put(EntityType.SLIME, "c7d29dbf3d98213ec2fb0ca25da74779e57bd0c1234268f828a3ec9869e15a9c"); - TEXTURE_MAP.put(EntityType.SNIFFER, "fe5a8341c478a134302981e6a7758ea4ecfd8d62a0df4067897e75502f9b25de"); - TEXTURE_MAP.put(EntityType.SPIDER, "35e248da2e108f09813a6b848a0fcef111300978180eda41d3d1a7a8e4dba3c3"); - TEXTURE_MAP.put(EntityType.SQUID, "d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8"); - TEXTURE_MAP.put(EntityType.STRAY, "2c5097916bc0565d30601c0eebfeb287277a34e867b4ea43c63819d53e89ede7"); - TEXTURE_MAP.put(EntityType.STRIDER, "125851a86ee1c54c94fc5bed017823dfb3ba08eddbcab2a914ef45b596c1603"); - TEXTURE_MAP.put(EntityType.TADPOLE, "987035f5352334c2cba6ac4c65c2b9059739d6d0e839c1dd98d75d2e77957847"); - TEXTURE_MAP.put(EntityType.TRADER_LLAMA, "56307f42fc88ebc211e04ea2bb4d247b7428b711df9a4e0c6d1b921589e443a1"); - TEXTURE_MAP.put(EntityType.TROPICAL_FISH, "d6dd5e6addb56acbc694ea4ba5923b1b25688178feffa72290299e2505c97281"); - TEXTURE_MAP.put(EntityType.TURTLE, "0a4050e7aacc4539202658fdc339dd182d7e322f9fbcc4d5f99b5718a"); - TEXTURE_MAP.put(EntityType.VEX, "b663134d7306bb604175d2575d686714b04412fe501143611fcf3cc19bd70abe"); - TEXTURE_MAP.put(EntityType.VILLAGER, "a36e9841794a37eb99524925668b47a62b5cb72e096a9f8f95e106804ae13e1b"); - TEXTURE_MAP.put(EntityType.VINDICATOR, "4f6fb89d1c631bd7e79fe185ba1a6705425f5c31a5ff626521e395d4a6f7e2"); - TEXTURE_MAP.put(EntityType.WANDERING_TRADER, "ee011aac817259f2b48da3e5ef266094703866608b3d7d1754432bf249cd2234"); - TEXTURE_MAP.put(EntityType.WARDEN, "f8c211d66c803aac15ab86f79c7edfd6c3b2034d23355a92f6bd42e835260be0"); - TEXTURE_MAP.put(EntityType.WITCH, "8aa986a6e1c2d88ff198ab2c3259e8d2674cb83a6d206f883bad2c8ada819"); - TEXTURE_MAP.put(EntityType.WOLF, "8f0b221786f193c06dd19a7875a903635113f84523927bb69764237fe20703de"); - TEXTURE_MAP.put(EntityType.ZOGLIN, "c19b7b5e9ffd4e22b890ab778b4795b662faff2b4978bf815574e48b0e52b301"); - TEXTURE_MAP.put(EntityType.ZOMBIE_HORSE, "171ce469cba4426c811f69be5d958a09bfb9b1b2bb649d3577a0c2161ad2f524"); - TEXTURE_MAP.put(EntityType.ZOMBIE_VILLAGER, "37e838ccc26776a217c678386f6a65791fe8cdab8ce9ca4ac6b28397a4d81c22"); - TEXTURE_MAP.put(EntityType.ZOMBIFIED_PIGLIN, "e935842af769380f78e8b8a88d1ea6ca2807c1e5693c2cf797456620833e936f"); - } - - public static String getTexture(EntityType type) { - if (VERSION_SPECIFIC_TEXTURES.containsKey(type)) { - return VERSION_SPECIFIC_TEXTURES.get(type); - } - return TEXTURE_MAP.get(type); - } - - public static void addVersionSpecificTexture(EntityType type, String texture) { - VERSION_SPECIFIC_TEXTURES.put(type, texture); - } - - public static boolean hasTexture(EntityType type) { - return TEXTURE_MAP.containsKey(type) || VERSION_SPECIFIC_TEXTURES.containsKey(type); - } -} \ No newline at end of file diff --git a/core/src/main/java/github/nighter/smartspawner/nms/VersionInitializer.java b/core/src/main/java/github/nighter/smartspawner/nms/VersionInitializer.java index 498df98d..b81aaeb2 100644 --- a/core/src/main/java/github/nighter/smartspawner/nms/VersionInitializer.java +++ b/core/src/main/java/github/nighter/smartspawner/nms/VersionInitializer.java @@ -3,124 +3,29 @@ import github.nighter.smartspawner.SmartSpawner; import org.bukkit.Bukkit; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - +/** + * VersionInitializer is kept for future compatibility if version-specific + * initialization is needed. Currently, all initialization is done dynamically + * through MobHeadConfig. + */ public class VersionInitializer { private final SmartSpawner plugin; private final String serverVersion; - private final String basePackage = "github.nighter.smartspawner"; - - private final String[][] components = { - {"Materials", "MaterialInitializer"}, - {"Particles", "ParticleInitializer"}, - {"Textures", "TextureInitializer"}, - {"Spawners", "SpawnerInitializer"} - }; - - // Supported versions in descending order (newest first) - private final List supportedVersions = Arrays.asList( - new Version(1, 21, 6, "v1_21_6"), - new Version(1, 21, 4, "v1_21_4"), - new Version(1, 21, 0, "v1_21") - ); public VersionInitializer(SmartSpawner plugin) { this.plugin = plugin; this.serverVersion = Bukkit.getServer().getBukkitVersion(); } + /** + * Initialize version-specific components. + * This method is now a no-op as all initialization is handled dynamically. + * Kept for future compatibility if version-specific logic is needed. + */ public void initialize() { - String versionPath = determineVersionPath(); - if (versionPath == null) { - throw new IllegalStateException("Unsupported server version: " + serverVersion); - } - - plugin.debug("Detected server version: " + serverVersion + ", using version path: " + versionPath); - initializeComponentsForVersion(versionPath); - } - - private String determineVersionPath() { - plugin.debug("Checking server version: " + serverVersion); - - Version currentVersion = parseVersion(serverVersion); - if (currentVersion == null) { - plugin.debug("Failed to parse version: " + serverVersion); - return null; - } - - // Find the best matching version (highest supported version that's <= current version) - for (Version supportedVersion : supportedVersions) { - if (currentVersion.isGreaterThanOrEqualTo(supportedVersion)) { - plugin.debug("Matched version " + currentVersion + " -> " + supportedVersion.packageName); - return supportedVersion.packageName; - } - } - - plugin.debug("No matching version found for: " + serverVersion); - return null; - } - - private Version parseVersion(String versionString) { - // Extract version numbers from strings like "1.21.6-R0.1-SNAPSHOT" - Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); - Matcher matcher = pattern.matcher(versionString); - - if (matcher.find()) { - int major = Integer.parseInt(matcher.group(1)); - int minor = Integer.parseInt(matcher.group(2)); - int patch = matcher.group(3) != null ? Integer.parseInt(matcher.group(3)) : 0; - return new Version(major, minor, patch, null); - } - - return null; - } - - private void initializeComponentsForVersion(String versionPath) { - for (String[] component : components) { - initializeComponent(component[0], component[1], versionPath); - } - } - - private void initializeComponent(String componentName, String initializerClass, String versionPath) { - try { - String className = String.format("%s.%s.%s", basePackage, versionPath, initializerClass); - Class clazz = Class.forName(className); - Method initMethod = clazz.getMethod("init"); - initMethod.invoke(null); - } catch (Exception e) { - plugin.getLogger().severe(String.format("Failed to initialize %s for version %s: %s", - componentName, serverVersion, e.getMessage())); - plugin.debug("Stack trace for " + componentName + " initialization failure: " + e.toString()); - throw new RuntimeException("Failed to initialize " + componentName, e); - } - } - - private static class Version { - final int major; - final int minor; - final int patch; - final String packageName; - - Version(int major, int minor, int patch, String packageName) { - this.major = major; - this.minor = minor; - this.patch = patch; - this.packageName = packageName; - } - - boolean isGreaterThanOrEqualTo(Version other) { - if (this.major != other.major) return this.major >= other.major; - if (this.minor != other.minor) return this.minor >= other.minor; - return this.patch >= other.patch; - } - - @Override - public String toString() { - return major + "." + minor + "." + patch; - } + plugin.debug("Server version: " + serverVersion); + plugin.debug("Using dynamic detection with MobHeadConfig"); + + plugin.getLogger().info("Initialized dynamic detection for version: " + serverVersion); } } \ No newline at end of file diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/gui/main/SpawnerMenuAction.java b/core/src/main/java/github/nighter/smartspawner/spawner/gui/main/SpawnerMenuAction.java index 88e22a3b..ce8dab3f 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/gui/main/SpawnerMenuAction.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/gui/main/SpawnerMenuAction.java @@ -6,14 +6,15 @@ import github.nighter.smartspawner.hooks.rpg.AuraSkillsIntegration; import github.nighter.smartspawner.language.LanguageManager; import github.nighter.smartspawner.language.MessageService; -import github.nighter.smartspawner.nms.ParticleWrapper; import github.nighter.smartspawner.spawner.gui.stacker.SpawnerStackerUI; import github.nighter.smartspawner.spawner.gui.storage.SpawnerStorageUI; import github.nighter.smartspawner.spawner.gui.synchronization.SpawnerGuiViewManager; import github.nighter.smartspawner.spawner.properties.SpawnerData; import github.nighter.smartspawner.spawner.sell.SpawnerSellManager; +import github.nighter.smartspawner.utils.DynamicMaterialDetector; import org.bukkit.Bukkit; import org.bukkit.Material; +import org.bukkit.Particle; import org.bukkit.Sound; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.EntityType; @@ -32,15 +33,8 @@ import java.util.concurrent.ConcurrentHashMap; public class SpawnerMenuAction implements Listener { - private static final Set SPAWNER_INFO_MATERIALS = EnumSet.of( - Material.PLAYER_HEAD, - Material.SPAWNER, - Material.ZOMBIE_HEAD, - Material.SKELETON_SKULL, - Material.WITHER_SKELETON_SKULL, - Material.CREEPER_HEAD, - Material.PIGLIN_HEAD - ); + private static final Set SPAWNER_INFO_MATERIALS = + DynamicMaterialDetector.getSpawnerInfoMaterials(); private final SmartSpawner plugin; private final SpawnerMenuUI spawnerMenuUI; private final SpawnerStackerUI spawnerStackerUI; @@ -395,7 +389,7 @@ private int applyMendingFromExp(Player player, int availableExp) { // Visual and sound effects for mending player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 0.5f, 1.0f); - player.spawnParticle(ParticleWrapper.VILLAGER_HAPPY, player.getLocation().add(0, 1, 0), 5); + player.spawnParticle(Particle.HAPPY_VILLAGER, player.getLocation().add(0, 1, 0), 5); } return expUsed; diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/interactions/place/SpawnerPlaceListener.java b/core/src/main/java/github/nighter/smartspawner/spawner/interactions/place/SpawnerPlaceListener.java index a520367c..de3b7878 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/interactions/place/SpawnerPlaceListener.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/interactions/place/SpawnerPlaceListener.java @@ -5,7 +5,6 @@ import github.nighter.smartspawner.extras.HopperHandler; import github.nighter.smartspawner.hooks.protections.CheckStackBlock; import github.nighter.smartspawner.language.MessageService; -import github.nighter.smartspawner.nms.ParticleWrapper; import github.nighter.smartspawner.spawner.limits.ChunkSpawnerLimiter; import github.nighter.smartspawner.spawner.properties.SpawnerData; import github.nighter.smartspawner.spawner.properties.SpawnerManager; @@ -16,6 +15,7 @@ import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; +import org.bukkit.Particle; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; @@ -302,7 +302,7 @@ private void showCreationParticles(Block block) { Location particleLocation = block.getLocation().clone().add( PARTICLE_OFFSET, PARTICLE_OFFSET, PARTICLE_OFFSET); block.getWorld().spawnParticle( - ParticleWrapper.SPELL_WITCH, + Particle.WITCH, particleLocation, 50, PARTICLE_OFFSET, PARTICLE_OFFSET, PARTICLE_OFFSET, 0 ); diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/interactions/stack/SpawnerStackHandler.java b/core/src/main/java/github/nighter/smartspawner/spawner/interactions/stack/SpawnerStackHandler.java index 580b8686..e3eefbbe 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/interactions/stack/SpawnerStackHandler.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/interactions/stack/SpawnerStackHandler.java @@ -4,7 +4,6 @@ import github.nighter.smartspawner.api.events.SpawnerStackEvent; import github.nighter.smartspawner.hooks.protections.CheckStackBlock; import github.nighter.smartspawner.language.MessageService; -import github.nighter.smartspawner.nms.ParticleWrapper; import github.nighter.smartspawner.spawner.limits.ChunkSpawnerLimiter; import github.nighter.smartspawner.spawner.properties.SpawnerData; import github.nighter.smartspawner.Scheduler; @@ -235,7 +234,7 @@ private void showStackAnimation(SpawnerData spawner, int newStack, Player player // Use location-based scheduling for particle effects Scheduler.runLocationTask(loc, () -> { world.spawnParticle( - ParticleWrapper.VILLAGER_HAPPY, + Particle.HAPPY_VILLAGER, loc.clone().add(0.5, 0.5, 0.5), 10, 0.3, 0.3, 0.3, 0 ); diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/loot/EntityLootRegistry.java b/core/src/main/java/github/nighter/smartspawner/spawner/loot/EntityLootRegistry.java index 54362b35..45d7f8b0 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/loot/EntityLootRegistry.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/loot/EntityLootRegistry.java @@ -2,7 +2,6 @@ import github.nighter.smartspawner.SmartSpawner; import github.nighter.smartspawner.hooks.economy.ItemPriceManager; -import github.nighter.smartspawner.nms.MaterialWrapper; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; @@ -68,8 +67,14 @@ public void loadConfigurations() { if (itemSection == null) continue; try { - // Use MaterialWrapper to get the material with version compatibility - Material material = MaterialWrapper.getMaterial(itemKey); + // Try to get the material by name + Material material; + try { + material = Material.valueOf(itemKey.toUpperCase()); + } catch (IllegalArgumentException e) { + material = null; + } + if (material == null) { plugin.getLogger().warning("Material '" + itemKey + "' is not available in server version " + plugin.getServer().getBukkitVersion() + " - skipping for entity " + entityName); diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/loot/LootItem.java b/core/src/main/java/github/nighter/smartspawner/spawner/loot/LootItem.java index c815b5f9..56f785b9 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/loot/LootItem.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/loot/LootItem.java @@ -1,6 +1,5 @@ package github.nighter.smartspawner.spawner.loot; -import github.nighter.smartspawner.nms.MaterialWrapper; import lombok.Getter; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/lootgen/SpawnerLootGenerator.java b/core/src/main/java/github/nighter/smartspawner/spawner/lootgen/SpawnerLootGenerator.java index fc0100c7..4e71fa8e 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/lootgen/SpawnerLootGenerator.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/lootgen/SpawnerLootGenerator.java @@ -1,7 +1,6 @@ package github.nighter.smartspawner.spawner.lootgen; import github.nighter.smartspawner.SmartSpawner; -import github.nighter.smartspawner.nms.ParticleWrapper; import github.nighter.smartspawner.spawner.gui.synchronization.SpawnerGuiViewManager; import github.nighter.smartspawner.spawner.properties.SpawnerData; import github.nighter.smartspawner.spawner.properties.SpawnerManager; @@ -354,7 +353,7 @@ private void handleGuiUpdates(SpawnerData spawner) { World world = loc.getWorld(); if (world != null) { Scheduler.runLocationTask(loc, () -> { - world.spawnParticle(ParticleWrapper.VILLAGER_HAPPY, + world.spawnParticle(Particle.HAPPY_VILLAGER, loc.clone().add(0.5, 0.5, 0.5), 10, 0.3, 0.3, 0.3, 0); }); diff --git a/core/src/main/java/github/nighter/smartspawner/spawner/utils/SpawnerMobHeadTexture.java b/core/src/main/java/github/nighter/smartspawner/spawner/utils/SpawnerMobHeadTexture.java index 2b9881fd..ed56ffcd 100644 --- a/core/src/main/java/github/nighter/smartspawner/spawner/utils/SpawnerMobHeadTexture.java +++ b/core/src/main/java/github/nighter/smartspawner/spawner/utils/SpawnerMobHeadTexture.java @@ -1,7 +1,7 @@ package github.nighter.smartspawner.spawner.utils; import github.nighter.smartspawner.SmartSpawner; -import github.nighter.smartspawner.nms.TextureWrapper; +import github.nighter.smartspawner.config.MobHeadConfig; import io.papermc.paper.datacomponent.DataComponentType; import io.papermc.paper.datacomponent.DataComponentTypes; import io.papermc.paper.datacomponent.item.TooltipDisplay; @@ -31,10 +31,6 @@ public class SpawnerMobHeadTexture { RegistryAccess.registryAccess().getRegistry(RegistryKey.DATA_COMPONENT_TYPE).get(DataComponentTypeKeys.BLOCK_ENTITY_DATA) ); - static { - TextureWrapper.initializeCommonTextures(); - } - private static boolean isBedrockPlayer(Player player) { SmartSpawner plugin = SmartSpawner.getInstance(); if (plugin == null || plugin.getIntegrationManager() == null || @@ -53,72 +49,51 @@ public static ItemStack getCustomHead(EntityType entityType, Player player) { if (entityType == null) { return createItemStack(Material.SPAWNER); } - switch (entityType) { - case ZOMBIE: - return new ItemStack(Material.ZOMBIE_HEAD); - case SKELETON: - return new ItemStack(Material.SKELETON_SKULL); - case WITHER_SKELETON: - return new ItemStack(Material.WITHER_SKELETON_SKULL); - case CREEPER: - return new ItemStack(Material.CREEPER_HEAD); - case PIGLIN, PIGLIN_BRUTE: - return new ItemStack(Material.PIGLIN_HEAD); - } + if (isBedrockPlayer(player)) { - return new ItemStack(Material.SPAWNER); - } - if (HEAD_CACHE.containsKey(entityType)) { - return HEAD_CACHE.get(entityType).clone(); - } - if (!TextureWrapper.hasTexture(entityType)) { - return new ItemStack(Material.SPAWNER); - } - ItemStack head = new ItemStack(Material.PLAYER_HEAD); - SkullMeta meta = (SkullMeta) head.getItemMeta(); - try { - String texture = TextureWrapper.getTexture(entityType); - PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID()); - PlayerTextures textures = profile.getTextures(); - URL url = new URL("http://textures.minecraft.net/texture/" + texture); - textures.setSkin(url); - profile.setTextures(textures); - meta.setOwnerProfile(profile); - head.setItemMeta(meta); - HEAD_CACHE.put(entityType, head.clone()); - return head; - } catch (Exception e) { - e.printStackTrace(); - return createItemStack(Material.SPAWNER); + return new ItemStack(getMaterialForEntity(entityType)); } + + return getCustomHead(entityType); } public static ItemStack getCustomHead(EntityType entityType) { if (entityType == null) { return createItemStack(Material.SPAWNER); } - switch (entityType) { - case ZOMBIE: - return new ItemStack(Material.ZOMBIE_HEAD); - case SKELETON: - return new ItemStack(Material.SKELETON_SKULL); - case WITHER_SKELETON: - return new ItemStack(Material.WITHER_SKELETON_SKULL); - case CREEPER: - return new ItemStack(Material.CREEPER_HEAD); - case PIGLIN, PIGLIN_BRUTE: - return new ItemStack(Material.PIGLIN_HEAD); + + SmartSpawner plugin = SmartSpawner.getInstance(); + if (plugin == null) { + return createItemStack(Material.SPAWNER); + } + + MobHeadConfig mobHeadConfig = plugin.getMobHeadConfig(); + if (mobHeadConfig == null) { + return createItemStack(Material.SPAWNER); + } + + // Get material from config + Material material = mobHeadConfig.getMaterial(entityType); + + // If it's not a player head, return the vanilla head + if (material != Material.PLAYER_HEAD) { + return new ItemStack(material); } + + // Check cache for player heads if (HEAD_CACHE.containsKey(entityType)) { return HEAD_CACHE.get(entityType).clone(); } - if (!TextureWrapper.hasTexture(entityType)) { - return new ItemStack(Material.SPAWNER); + + // Check if we have a custom texture + if (!mobHeadConfig.hasCustomTexture(entityType)) { + return new ItemStack(material); } + ItemStack head = new ItemStack(Material.PLAYER_HEAD); SkullMeta meta = (SkullMeta) head.getItemMeta(); try { - String texture = TextureWrapper.getTexture(entityType); + String texture = mobHeadConfig.getCustomTexture(entityType); PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID()); PlayerTextures textures = profile.getTextures(); URL url = new URL("http://textures.minecraft.net/texture/" + texture); @@ -130,8 +105,16 @@ public static ItemStack getCustomHead(EntityType entityType) { return head; } catch (Exception e) { e.printStackTrace(); - return createItemStack(Material.SPAWNER); + return createItemStack(material); + } + } + + private static Material getMaterialForEntity(EntityType entityType) { + SmartSpawner plugin = SmartSpawner.getInstance(); + if (plugin != null && plugin.getMobHeadConfig() != null) { + return plugin.getMobHeadConfig().getMaterial(entityType); } + return Material.SPAWNER; } public static ItemStack createItemStack(Material material) { diff --git a/core/src/main/java/github/nighter/smartspawner/utils/DynamicEntityValidator.java b/core/src/main/java/github/nighter/smartspawner/utils/DynamicEntityValidator.java new file mode 100644 index 00000000..de47fffb --- /dev/null +++ b/core/src/main/java/github/nighter/smartspawner/utils/DynamicEntityValidator.java @@ -0,0 +1,40 @@ +package github.nighter.smartspawner.utils; + +import org.bukkit.entity.EntityType; + +import java.util.Arrays; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * Validates spawnable entity types across Minecraft versions. + * Only loads available entities in the current version, not newer entities from later versions. + */ +public class DynamicEntityValidator { + private static final Set VALID_SPAWNABLE_ENTITIES; + + static { + VALID_SPAWNABLE_ENTITIES = Arrays.stream(EntityType.values()) + .filter(type -> type != EntityType.PLAYER) + .collect(Collectors.toUnmodifiableSet()); + } + + /** + * Check if an entity type is valid for spawning + * + * @param type Entity type to check + * @return true if the entity type is valid for spawning + */ + public static boolean isValidSpawnerEntity(EntityType type) { + return VALID_SPAWNABLE_ENTITIES.contains(type); + } + + /** + * Get all valid spawnable entity types + * + * @return Unmodifiable set of valid entity types + */ + public static Set getValidEntities() { + return VALID_SPAWNABLE_ENTITIES; + } +} diff --git a/core/src/main/java/github/nighter/smartspawner/utils/DynamicMaterialDetector.java b/core/src/main/java/github/nighter/smartspawner/utils/DynamicMaterialDetector.java new file mode 100644 index 00000000..b0b80d79 --- /dev/null +++ b/core/src/main/java/github/nighter/smartspawner/utils/DynamicMaterialDetector.java @@ -0,0 +1,51 @@ +package github.nighter.smartspawner.utils; + +import org.bukkit.Material; + +import java.util.Arrays; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * Dynamically detects valid materials for spawner GUI based on current Minecraft version. + * Supports automatic detection of: + * - Player heads + * - Mob skulls/heads + * - Spawner blocks + */ +public class DynamicMaterialDetector { + private static final Set SPAWNER_INFO_MATERIALS; + + static { + // Auto-detect all head/skull materials from current version + SPAWNER_INFO_MATERIALS = Arrays.stream(Material.values()) + .filter(material -> { + String name = material.name(); + return name.equals("PLAYER_HEAD") || + name.equals("SPAWNER") || + name.endsWith("_HEAD") || + name.endsWith("_SKULL"); + }) + .filter(Material::isItem) + .collect(Collectors.toUnmodifiableSet()); + } + + /** + * Get all valid spawner info materials for the current Minecraft version + * + * @return Unmodifiable set of spawner info materials + */ + public static Set getSpawnerInfoMaterials() { + return SPAWNER_INFO_MATERIALS; + } + + /** + * Check if a material is a valid spawner info material + * + * @param material Material to check + * @return true if the material is a valid spawner info material + */ + public static boolean isValidSpawnerInfoMaterial(Material material) { + return SPAWNER_INFO_MATERIALS.contains(material); + } +} diff --git a/core/src/main/resources/mob_heads.yml b/core/src/main/resources/mob_heads.yml new file mode 100644 index 00000000..71e86d89 --- /dev/null +++ b/core/src/main/resources/mob_heads.yml @@ -0,0 +1,333 @@ +# SmartSpawner - Mob Head Texture Configuration +# Players can customize mob head textures for spawner GUI +# Supports both player heads and mob skulls +# Texture values are the hash from minecraft.net/texture/ + +# Default material for unknown mobs +default_material: "SPAWNER" + +# Custom mob head configurations +mob_heads: + # Vanilla Minecraft Mobs with Skulls/Heads + ZOMBIE: + material: "ZOMBIE_HEAD" + custom_texture: null + + SKELETON: + material: "SKELETON_SKULL" + custom_texture: null + + CREEPER: + material: "CREEPER_HEAD" + custom_texture: null + + WITHER_SKELETON: + material: "WITHER_SKELETON_SKULL" + custom_texture: null + + PIGLIN: + material: "PIGLIN_HEAD" + custom_texture: null + + PIGLIN_BRUTE: + material: "PIGLIN_HEAD" + custom_texture: null + + # Custom Player Head Textures (texture hash from textures.minecraft.net) + # All mobs below use PLAYER_HEAD material with custom textures + + ALLAY: + material: "PLAYER_HEAD" + custom_texture: "df5de940bfe499c59ee8dac9f9c3919e7535eff3a9acb16f4842bf290f4c679f" + + ARMADILLO: + material: "PLAYER_HEAD" + custom_texture: "9164ed0e0ef69b0ce7815e4300b4413a4828fcb0092918543545a418a48e0c3c" + + AXOLOTL: + material: "PLAYER_HEAD" + custom_texture: "21c3aa0d539208b47972bf8e72f0505cdcfb8d7796b2fcf85911ce94fd0193d0" + + BAT: + material: "PLAYER_HEAD" + custom_texture: "81c5cc1f40005a33124c60384a0f17a36a7b19ae90f1c32dcda17b5b56280a43" + + BEE: + material: "PLAYER_HEAD" + custom_texture: "76ded8355a5625893e8041877af65683c2fd0aa09c3d3c1c94f5f80a0f8c22cb" + + BLAZE: + material: "PLAYER_HEAD" + custom_texture: "737623f79f7eb4f3f80da65b652cc44b2148eea41f9ffe2e86a23bdf49ab77b1" + + BOGGED: + material: "PLAYER_HEAD" + custom_texture: "a3b9003ba2d05562c75119b8a62185c67130e9282f7acbac4bc2824c21eb95d9" + + BREEZE: + material: "PLAYER_HEAD" + custom_texture: "a275728af7e6a29c88125b675a39d88ae9919bb61fdc200337fed6ab0c49d65c" + + CAMEL: + material: "PLAYER_HEAD" + custom_texture: "7eb6ad908b8d5155bc4d249271ef6084d455dd0e70a4002eb148f9e20b9deb2c" + + CAT: + material: "PLAYER_HEAD" + custom_texture: "e0eeaa869f53fa989198f5595520aec9395509aba993596a86654b3a0f6ca4a6" + + CAVE_SPIDER: + material: "PLAYER_HEAD" + custom_texture: "eccc4a32d45d74e8b14ef1ffd55cd5f381a06d4999081d52eaea12e13293e209" + + CHICKEN: + material: "PLAYER_HEAD" + custom_texture: "4e8f3ea46735ad0c106c549ccb6cd489c97a41e73d092497ee424becd9dfd29c" + + COD: + material: "PLAYER_HEAD" + custom_texture: "7892d7dd6aadf35f86da27fb63da4edda211df96d2829f691462a4fb1cab0" + + COW: + material: "PLAYER_HEAD" + custom_texture: "b667c0e107be79d7679bfe89bbc57c6bf198ecb529a3295fcfdfd2f24408dca3" + + CREAKING: + material: "PLAYER_HEAD" + custom_texture: "ac91c87bbe7f4c586e0f8b60f9b76d173a41daa302944531703be9ff4fd117f8" + + DOLPHIN: + material: "PLAYER_HEAD" + custom_texture: "8e9688b950d880b55b7aa2cfcd76e5a0fa94aac6d16f78e833f7443ea29fed3" + + DONKEY: + material: "PLAYER_HEAD" + custom_texture: "63a976c047f412ebc5cb197131ebef30c004c0faf49d8dd4105fca1207edaff3" + + DROWNED: + material: "PLAYER_HEAD" + custom_texture: "c84df79c49104b198cdad6d99fd0d0bcf1531c92d4ab6269e40b7d3cbbb8e98c" + + ELDER_GUARDIAN: + material: "PLAYER_HEAD" + custom_texture: "8df4fec3aa34ceddb025a42c9fc435a8029b062598b325322ba3cb5e5f351c1f" + + ENDERMAN: + material: "PLAYER_HEAD" + custom_texture: "4f24767c8138b3dfec02f77bd151994d480d4e869664ce09a26b19289212162b" + + ENDERMITE: + material: "PLAYER_HEAD" + custom_texture: "5bc7b9d36fb92b6bf292be73d32c6c5b0ecc25b44323a541fae1f1e67e393a3e" + + EVOKER: + material: "PLAYER_HEAD" + custom_texture: "630ce775edb65db8c2741bdfae84f3c0d0285aba93afadc74900d55dfd9504a5" + + FOX: + material: "PLAYER_HEAD" + custom_texture: "d8954a42e69e0881ae6d24d4281459c144a0d5a968aed35d6d3d73a3c65d26a" + + FROG: + material: "PLAYER_HEAD" + custom_texture: "2ca4a8e494582c62aaa2c92474b16d69cd63baa3d3f50a4b631d6559ca0f33f5" + + GHAST: + material: "PLAYER_HEAD" + custom_texture: "64ab8a22e7687cc4c78f3b6ff5b1eb04917b51cd3cd7dbce36171160b3c77ced" + + GLOW_SQUID: + material: "PLAYER_HEAD" + custom_texture: "4cb07d905888f8472252f9cfa39aa317babcad30af08cfe751adefa716b02036" + + GOAT: + material: "PLAYER_HEAD" + custom_texture: "457a0d538fa08a7affe312903468861720f9fa34e86d44b89dcec5639265f03" + + GUARDIAN: + material: "PLAYER_HEAD" + custom_texture: "b8e725779c234c590cce854db5c10485ed8d8a33fa9b2bdc3424b68bb1380bed" + + HAPPY_GHAST: + material: "PLAYER_HEAD" + custom_texture: "a1a36cb93d01675c4622dd5c8d872110911ec12c372e89afa8ba03862867f6fb" + + HOGLIN: + material: "PLAYER_HEAD" + custom_texture: "7ad7b5aeb220c079e319cd70ac8800e80774a9313c22f38e77afb89999e6ec87" + + HORSE: + material: "PLAYER_HEAD" + custom_texture: "e335e31961713353a76401e00c3454b7ca885b7784d5288d3227222d9b48d393" + + HUSK: + material: "PLAYER_HEAD" + custom_texture: "d674c63c8db5f4ca628d69a3b1f8a36e29d8fd775e1a6bdb6cabb4be4db121" + + IRON_GOLEM: + material: "PLAYER_HEAD" + custom_texture: "4271913a3fc8f56bdf6b90a4b4ed6a05c562ce0076b5344d444fb2b040ae57d" + + LLAMA: + material: "PLAYER_HEAD" + custom_texture: "9f7d90b305aa64313c8d4404d8d652a96eba8a754b67f4347dcccdd5a6a63398" + + MAGMA_CUBE: + material: "PLAYER_HEAD" + custom_texture: "38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429" + + MOOSHROOM: + material: "PLAYER_HEAD" + custom_texture: "45603d539f666fdf0f7a0fe20b81dfef3abe6c51da34b9525a5348432c5523b2" + + MULE: + material: "PLAYER_HEAD" + custom_texture: "a0486a742e7dda0bae61ce2f55fa13527f1c3b334c57c034bb4cf132fb5f5f" + + OCELOT: + material: "PLAYER_HEAD" + custom_texture: "5657cd5c2989ff97570fec4ddcdc6926a68a3393250c1be1f0b114a1db1" + + PANDA: + material: "PLAYER_HEAD" + custom_texture: "d5c3d618a70cc062e2edfaed15173e2a32ab6d773cf6050452e1b97fc66fb388" + + PARROT: + material: "PLAYER_HEAD" + custom_texture: "5df4b3401a4d06ad66ac8b5c4d189618ae617f9c143071c8ac39a563cf4e4208" + + PHANTOM: + material: "PLAYER_HEAD" + custom_texture: "adfe51801761660ebf6dae70e9cad588b2ef5e6cb2b3194d028a40ac0eebcdf5" + + PIG: + material: "PLAYER_HEAD" + custom_texture: "9b1760e3778f8087046b86bec6a0a83a567625f30f0d6bce866d4bed95dba6c1" + + PILLAGER: + material: "PLAYER_HEAD" + custom_texture: "4aee6bb37cbfc92b0d86db5ada4790c64ff4468d68b84942fde04405e8ef5333" + + POLAR_BEAR: + material: "PLAYER_HEAD" + custom_texture: "3d3cd8548e7dceb5c2394d1b00da2c61ffc0dde46229b10509eb27a0dcb23bfb" + + PUFFERFISH: + material: "PLAYER_HEAD" + custom_texture: "292350c9f0993ed54db2c7113936325683ffc20104a9b622aa457d37e708d931" + + RABBIT: + material: "PLAYER_HEAD" + custom_texture: "cd1d2bbc3d77ab0d119c031ea74d8781c93285cf736abc422baec1eb1560e8ca" + + RAVAGER: + material: "PLAYER_HEAD" + custom_texture: "cd20bf52ec390a0799299184fc678bf84cf732bb1bd78fd1c4b441858f0235a8" + + SALMON: + material: "PLAYER_HEAD" + custom_texture: "d4d001589b86c22cf24f1618fe7efef12932aa9148b5e4fc6ff4a614b990ae12" + + SHEEP: + material: "PLAYER_HEAD" + custom_texture: "a723893df4cfb9c7240fc47b560ccf6ddeb19da9183d33083f2c71f46dad290a" + + SHULKER: + material: "PLAYER_HEAD" + custom_texture: "537a294f6b7b4ba437e5cb35fb20f46792e7ac0a490a66132a557124ec5f997a" + + SILVERFISH: + material: "PLAYER_HEAD" + custom_texture: "bfe13237e1109cab7264dc53b0aa697cf9a7c62c984a269fb0755a288912bbca" + + SKELETON_HORSE: + material: "PLAYER_HEAD" + custom_texture: "ac7d8a16d3f0f98b598df93f2c2d34e75171cd52dbf4a1211d7b84c019416a40" + + SLIME: + material: "PLAYER_HEAD" + custom_texture: "c7d29dbf3d98213ec2fb0ca25da74779e57bd0c1234268f828a3ec9869e15a9c" + + SNIFFER: + material: "PLAYER_HEAD" + custom_texture: "fe5a8341c478a134302981e6a7758ea4ecfd8d62a0df4067897e75502f9b25de" + + SNOW_GOLEM: + material: "PLAYER_HEAD" + custom_texture: "1fdfd1f7538c040258be7a91446da89ed845cc5ef728eb5e690543378fcf4" + + SPIDER: + material: "PLAYER_HEAD" + custom_texture: "35e248da2e108f09813a6b848a0fcef111300978180eda41d3d1a7a8e4dba3c3" + + SQUID: + material: "PLAYER_HEAD" + custom_texture: "d8705624daa2956aa45956c81bab5f4fdb2c74a596051e24192039aea3a8b8" + + STRAY: + material: "PLAYER_HEAD" + custom_texture: "2c5097916bc0565d30601c0eebfeb287277a34e867b4ea43c63819d53e89ede7" + + STRIDER: + material: "PLAYER_HEAD" + custom_texture: "125851a86ee1c54c94fc5bed017823dfb3ba08eddbcab2a914ef45b596c1603" + + TADPOLE: + material: "PLAYER_HEAD" + custom_texture: "987035f5352334c2cba6ac4c65c2b9059739d6d0e839c1dd98d75d2e77957847" + + TRADER_LLAMA: + material: "PLAYER_HEAD" + custom_texture: "56307f42fc88ebc211e04ea2bb4d247b7428b711df9a4e0c6d1b921589e443a1" + + TROPICAL_FISH: + material: "PLAYER_HEAD" + custom_texture: "d6dd5e6addb56acbc694ea4ba5923b1b25688178feffa72290299e2505c97281" + + TURTLE: + material: "PLAYER_HEAD" + custom_texture: "0a4050e7aacc4539202658fdc339dd182d7e322f9fbcc4d5f99b5718a" + + VEX: + material: "PLAYER_HEAD" + custom_texture: "b663134d7306bb604175d2575d686714b04412fe501143611fcf3cc19bd70abe" + + VILLAGER: + material: "PLAYER_HEAD" + custom_texture: "a36e9841794a37eb99524925668b47a62b5cb72e096a9f8f95e106804ae13e1b" + + VINDICATOR: + material: "PLAYER_HEAD" + custom_texture: "4f6fb89d1c631bd7e79fe185ba1a6705425f5c31a5ff626521e395d4a6f7e2" + + WANDERING_TRADER: + material: "PLAYER_HEAD" + custom_texture: "ee011aac817259f2b48da3e5ef266094703866608b3d7d1754432bf249cd2234" + + WARDEN: + material: "PLAYER_HEAD" + custom_texture: "f8c211d66c803aac15ab86f79c7edfd6c3b2034d23355a92f6bd42e835260be0" + + WITCH: + material: "PLAYER_HEAD" + custom_texture: "8aa986a6e1c2d88ff198ab2c3259e8d2674cb83a6d206f883bad2c8ada819" + + WOLF: + material: "PLAYER_HEAD" + custom_texture: "8f0b221786f193c06dd19a7875a903635113f84523927bb69764237fe20703de" + + ZOGLIN: + material: "PLAYER_HEAD" + custom_texture: "c19b7b5e9ffd4e22b890ab778b4795b662faff2b4978bf815574e48b0e52b301" + + ZOMBIE_HORSE: + material: "PLAYER_HEAD" + custom_texture: "171ce469cba4426c811f69be5d958a09bfb9b1b2bb649d3577a0c2161ad2f524" + + ZOMBIE_VILLAGER: + material: "PLAYER_HEAD" + custom_texture: "37e838ccc26776a217c678386f6a65791fe8cdab8ce9ca4ac6b28397a4d81c22" + + ZOMBIFIED_PIGLIN: + material: "PLAYER_HEAD" + custom_texture: "e935842af769380f78e8b8a88d1ea6ca2807c1e5693c2cf797456620833e936f" diff --git a/nms/v1_21/build.gradle b/nms/v1_21/build.gradle deleted file mode 100644 index 6512f211..00000000 --- a/nms/v1_21/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'java-library' -} - -group 'nms:v1_21' - -dependencies { - implementation project(':core') - implementation project(':api') - compileOnly 'io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT' -} \ No newline at end of file diff --git a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/MaterialInitializer.java b/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/MaterialInitializer.java deleted file mode 100644 index 3cd97d7b..00000000 --- a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/MaterialInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package github.nighter.smartspawner.v1_21; - -import github.nighter.smartspawner.nms.MaterialWrapper; -import org.bukkit.Material; - -import java.util.Arrays; -import java.util.stream.Collectors; - -public class MaterialInitializer { - public static void init() { - MaterialWrapper.SUPPORTED_MATERIALS = Arrays.stream(Material.values()) - .collect(Collectors.toMap(Material::name, material -> material)); - - MaterialWrapper.AVAILABLE_MATERIAL_NAMES = Arrays.stream(Material.values()) - .map(Material::name) - .collect(Collectors.toSet()); - } -} \ No newline at end of file diff --git a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/ParticleInitializer.java b/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/ParticleInitializer.java deleted file mode 100644 index a8d4e467..00000000 --- a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/ParticleInitializer.java +++ /dev/null @@ -1,11 +0,0 @@ -package github.nighter.smartspawner.v1_21; - -import github.nighter.smartspawner.nms.ParticleWrapper; -import org.bukkit.Particle; - -public class ParticleInitializer { - public static void init() { - ParticleWrapper.VILLAGER_HAPPY = Particle.HAPPY_VILLAGER; - ParticleWrapper.SPELL_WITCH = Particle.WITCH; - } -} \ No newline at end of file diff --git a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/SpawnerInitializer.java b/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/SpawnerInitializer.java deleted file mode 100644 index e08c41bf..00000000 --- a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/SpawnerInitializer.java +++ /dev/null @@ -1,12 +0,0 @@ -package github.nighter.smartspawner.v1_21; -import org.bukkit.entity.EntityType; -import github.nighter.smartspawner.nms.SpawnerWrapper; -import java.util.Arrays; - -public class SpawnerInitializer { - public static void init() { - SpawnerWrapper.SUPPORTED_MOBS = Arrays.stream(EntityType.values()) - .map(EntityType::name) - .toList(); - } -} \ No newline at end of file diff --git a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/TextureInitializer.java b/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/TextureInitializer.java deleted file mode 100644 index b1b46b25..00000000 --- a/nms/v1_21/src/main/java/github/nighter/smartspawner/v1_21/TextureInitializer.java +++ /dev/null @@ -1,38 +0,0 @@ -package github.nighter.smartspawner.v1_21; - -import github.nighter.smartspawner.nms.TextureWrapper; -import org.bukkit.entity.EntityType; - -/** - * This class is responsible for initializing version-specific textures - * for various entity types in the SmartSpawner plugin. - */ -public class TextureInitializer { - - /** - * Initializes version-specific textures for various entity types. - * This method should be called during the plugin's initialization phase. - */ - public static void init() { - TextureWrapper.addVersionSpecificTexture( - EntityType.ARMADILLO, - "9164ed0e0ef69b0ce7815e4300b4413a4828fcb0092918543545a418a48e0c3c" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.BOGGED, - "a3b9003ba2d05562c75119b8a62185c67130e9282f7acbac4bc2824c21eb95d9" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.BREEZE, - "a275728af7e6a29c88125b675a39d88ae9919bb61fdc200337fed6ab0c49d65c" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.MOOSHROOM, - "45603d539f666fdf0f7a0fe20b81dfef3abe6c51da34b9525a5348432c5523b2" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.SNOW_GOLEM, - "1fdfd1f7538c040258be7a91446da89ed845cc5ef728eb5e690543378fcf4" - ); - } -} \ No newline at end of file diff --git a/nms/v1_21_4/build.gradle b/nms/v1_21_4/build.gradle deleted file mode 100644 index 3d5fec38..00000000 --- a/nms/v1_21_4/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'java-library' -} - -group 'nms:v1_21_4' - -dependencies { - implementation project(':core') - implementation project(':api') - compileOnly 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT' -} \ No newline at end of file diff --git a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/MaterialInitializer.java b/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/MaterialInitializer.java deleted file mode 100644 index 8599acdf..00000000 --- a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/MaterialInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package github.nighter.smartspawner.v1_21_4; - -import github.nighter.smartspawner.nms.MaterialWrapper; -import org.bukkit.Material; - -import java.util.Arrays; -import java.util.stream.Collectors; - -public class MaterialInitializer { - public static void init() { - MaterialWrapper.SUPPORTED_MATERIALS = Arrays.stream(Material.values()) - .collect(Collectors.toMap(Material::name, material -> material)); - - MaterialWrapper.AVAILABLE_MATERIAL_NAMES = Arrays.stream(Material.values()) - .map(Material::name) - .collect(Collectors.toSet()); - } -} \ No newline at end of file diff --git a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/ParticleInitializer.java b/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/ParticleInitializer.java deleted file mode 100644 index 94ae9492..00000000 --- a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/ParticleInitializer.java +++ /dev/null @@ -1,11 +0,0 @@ -package github.nighter.smartspawner.v1_21_4; - -import github.nighter.smartspawner.nms.ParticleWrapper; -import org.bukkit.Particle; - -public class ParticleInitializer { - public static void init() { - ParticleWrapper.VILLAGER_HAPPY = Particle.HAPPY_VILLAGER; - ParticleWrapper.SPELL_WITCH = Particle.WITCH; - } -} \ No newline at end of file diff --git a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/SpawnerInitializer.java b/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/SpawnerInitializer.java deleted file mode 100644 index fdc981e9..00000000 --- a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/SpawnerInitializer.java +++ /dev/null @@ -1,12 +0,0 @@ -package github.nighter.smartspawner.v1_21_4; -import org.bukkit.entity.EntityType; -import github.nighter.smartspawner.nms.SpawnerWrapper; -import java.util.Arrays; - -public class SpawnerInitializer { - public static void init() { - SpawnerWrapper.SUPPORTED_MOBS = Arrays.stream(EntityType.values()) - .map(EntityType::name) - .toList(); - } -} \ No newline at end of file diff --git a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/TextureInitializer.java b/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/TextureInitializer.java deleted file mode 100644 index 8fc111b1..00000000 --- a/nms/v1_21_4/src/main/java/github/nighter/smartspawner/v1_21_4/TextureInitializer.java +++ /dev/null @@ -1,42 +0,0 @@ -package github.nighter.smartspawner.v1_21_4; - -import github.nighter.smartspawner.nms.TextureWrapper; -import org.bukkit.entity.EntityType; - -/** - * This class is responsible for initializing version-specific textures - * for various entity types in the SmartSpawner plugin. - */ -public class TextureInitializer { - - /** - * Initializes version-specific textures for various entity types. - * This method should be called during the plugin's initialization phase. - */ - public static void init() { - TextureWrapper.addVersionSpecificTexture( - EntityType.ARMADILLO, - "9164ed0e0ef69b0ce7815e4300b4413a4828fcb0092918543545a418a48e0c3c" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.BOGGED, - "a3b9003ba2d05562c75119b8a62185c67130e9282f7acbac4bc2824c21eb95d9" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.BREEZE, - "a275728af7e6a29c88125b675a39d88ae9919bb61fdc200337fed6ab0c49d65c" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.MOOSHROOM, - "45603d539f666fdf0f7a0fe20b81dfef3abe6c51da34b9525a5348432c5523b2" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.SNOW_GOLEM, - "1fdfd1f7538c040258be7a91446da89ed845cc5ef728eb5e690543378fcf4" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.CREAKING, - "ac91c87bbe7f4c586e0f8b60f9b76d173a41daa302944531703be9ff4fd117f8" - ); - } -} \ No newline at end of file diff --git a/nms/v1_21_6/build.gradle b/nms/v1_21_6/build.gradle deleted file mode 100644 index 7fcf7587..00000000 --- a/nms/v1_21_6/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'java-library' -} - -group 'nms:v1_21_6' - -dependencies { - implementation project(':core') - implementation project(':api') - compileOnly 'io.papermc.paper:paper-api:1.21.6-R0.1-SNAPSHOT' -} \ No newline at end of file diff --git a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/MaterialInitializer.java b/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/MaterialInitializer.java deleted file mode 100644 index 607ee9c0..00000000 --- a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/MaterialInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package github.nighter.smartspawner.v1_21_6; - -import github.nighter.smartspawner.nms.MaterialWrapper; -import org.bukkit.Material; - -import java.util.Arrays; -import java.util.stream.Collectors; - -public class MaterialInitializer { - public static void init() { - MaterialWrapper.SUPPORTED_MATERIALS = Arrays.stream(Material.values()) - .collect(Collectors.toMap(Material::name, material -> material)); - - MaterialWrapper.AVAILABLE_MATERIAL_NAMES = Arrays.stream(Material.values()) - .map(Material::name) - .collect(Collectors.toSet()); - } -} \ No newline at end of file diff --git a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/ParticleInitializer.java b/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/ParticleInitializer.java deleted file mode 100644 index 013766f4..00000000 --- a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/ParticleInitializer.java +++ /dev/null @@ -1,11 +0,0 @@ -package github.nighter.smartspawner.v1_21_6; - -import github.nighter.smartspawner.nms.ParticleWrapper; -import org.bukkit.Particle; - -public class ParticleInitializer { - public static void init() { - ParticleWrapper.VILLAGER_HAPPY = Particle.HAPPY_VILLAGER; - ParticleWrapper.SPELL_WITCH = Particle.WITCH; - } -} \ No newline at end of file diff --git a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/SpawnerInitializer.java b/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/SpawnerInitializer.java deleted file mode 100644 index 7e5929ca..00000000 --- a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/SpawnerInitializer.java +++ /dev/null @@ -1,12 +0,0 @@ -package github.nighter.smartspawner.v1_21_6; -import org.bukkit.entity.EntityType; -import github.nighter.smartspawner.nms.SpawnerWrapper; -import java.util.Arrays; - -public class SpawnerInitializer { - public static void init() { - SpawnerWrapper.SUPPORTED_MOBS = Arrays.stream(EntityType.values()) - .map(EntityType::name) - .toList(); - } -} \ No newline at end of file diff --git a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/TextureInitializer.java b/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/TextureInitializer.java deleted file mode 100644 index 68546170..00000000 --- a/nms/v1_21_6/src/main/java/github/nighter/smartspawner/v1_21_6/TextureInitializer.java +++ /dev/null @@ -1,46 +0,0 @@ -package github.nighter.smartspawner.v1_21_6; - -import github.nighter.smartspawner.nms.TextureWrapper; -import org.bukkit.entity.EntityType; - -/** - * This class is responsible for initializing version-specific textures - * for various entity types in the SmartSpawner plugin. - */ -public class TextureInitializer { - - /** - * Initializes version-specific textures for various entity types. - * This method should be called during the plugin's initialization phase. - */ - public static void init() { - TextureWrapper.addVersionSpecificTexture( - EntityType.ARMADILLO, - "9164ed0e0ef69b0ce7815e4300b4413a4828fcb0092918543545a418a48e0c3c" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.BOGGED, - "a3b9003ba2d05562c75119b8a62185c67130e9282f7acbac4bc2824c21eb95d9" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.BREEZE, - "a275728af7e6a29c88125b675a39d88ae9919bb61fdc200337fed6ab0c49d65c" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.MOOSHROOM, - "45603d539f666fdf0f7a0fe20b81dfef3abe6c51da34b9525a5348432c5523b2" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.SNOW_GOLEM, - "1fdfd1f7538c040258be7a91446da89ed845cc5ef728eb5e690543378fcf4" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.CREAKING, - "ac91c87bbe7f4c586e0f8b60f9b76d173a41daa302944531703be9ff4fd117f8" - ); - TextureWrapper.addVersionSpecificTexture( - EntityType.HAPPY_GHAST, - "a1a36cb93d01675c4622dd5c8d872110911ec12c372e89afa8ba03862867f6fb" - ); - } -} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index daddbe00..aa39ca9a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,3 @@ rootProject.name = 'SmartSpawner' include 'core' -include 'api' -include 'nms:v1_21' -include 'nms:v1_21_4' -include 'nms:v1_21_6' \ No newline at end of file +include 'api' \ No newline at end of file