@SubscribeEvent public void missingItemMappings(RegistryEvent.MissingMappings<Item> event) { for(RegistryEvent.MissingMappings.Mapping<Item> entry : event.getAllMappings()) { @Nonnull String path = entry.key.toString(); if(path.equals(Util.resource("bucket")) || path.equals(Util.resource("glow")) || path.equals(Util.resource("blood")) || path.equals(Util.resource("milk")) || path.equals(Util.resource("purpleslime")) || path.equals(Util.resource("blueslime")) || path.contains(Util.resource("molten"))) { entry.ignore(); } // wooder hopper, moved from skyblock to tic if(entry.key.getResourceDomain().equals(TINKERS_SKYBLOCK_MODID) && entry.key.getResourcePath().equals(WOODEN_HOPPER)) { entry.remap(Item.getItemFromBlock(TinkerGadgets.woodenHopper)); } } }
@SubscribeEvent public void missingMapping(MissingMappings<EntityEntry> event) { for (MissingMappings.Mapping<EntityEntry> entry : event.getAllMappings()) { if (factionFixes.keySet().contains(entry.key.toString())) { entry.ignore(); } } } }
@SubscribeEvent public void missingMapping(MissingMappings<EntityEntry> event) { for (MissingMappings.Mapping<EntityEntry> entry : event.getAllMappings()) { if (mapping.keySet().contains(entry.key.toString())) { entry.ignore(); } } } }
/** * Fix item mappings */ static boolean fixMapping(RegistryEvent.MissingMappings.Mapping<Item> mapping) { // Removed battle Axe if ("battleaxe".equals(mapping.key.getResourcePath())) { mapping.ignore(); return true; } // Check for mappings changed for 1.11 CamelCase to lower underscore String old = mapping.key.getResourcePath(); boolean r = checkMapping(mapping, old, armor_of_swiftness_feet, armor_of_swiftness_chest, armor_of_swiftness_head, armor_of_swiftness_legs, basic_crossbow, basic_double_crossbow, basic_tech_crossbow, blood_bottle, blood_potion, crossbow_arrow, enhanced_crossbow, enhanced_double_crossbow); if (!r) r = checkMapping(mapping, old, enhanced_tech_crossbow, human_heart, weak_human_heart, hunter_axe, hunter_coat_feet, hunter_coat_chest, hunter_coat_head, hunter_coat_legs, hunter_hat0_head, hunter_hat1_head, hunter_intel, injection, item_alchemical_fire, item_coffin, item_garlic, item_med_chair); if (!r) r = checkMapping(mapping, old, item_tent, obsidian_armor_feet, obsidian_armor_chest, obsidian_armor_head, obsidian_armor_legs, pitchfork, pure_blood, tech_crossbow_ammo_package, vampire_blood_bottle, vampire_book, vampire_fang); return r; }
@SubscribeEvent public static void onMissingItemMappings(RegistryEvent.MissingMappings<Item> event) { for (RegistryEvent.MissingMappings.Mapping<Item> missingMapping : event.getMappings()) { ResourceLocation resourceLocation = missingMapping.key; String resourcePath = resourceLocation.getPath(); if (ignoredMappings.contains(resourcePath)) { missingMapping.ignore(); } else if (itemRemappings.containsKey(resourcePath)) { ResourceLocation remappedResourceLocation = new ResourceLocation(resourceLocation.getNamespace(), itemRemappings.get(resourcePath)); if (ForgeRegistries.ITEMS.containsKey(remappedResourceLocation)) { Item remappedItem = ForgeRegistries.ITEMS.getValue(remappedResourceLocation); if (remappedItem != null && remappedItem != Items.AIR) { missingMapping.remap(remappedItem); } } } } }
@SubscribeEvent public static void onMissingBlockMappings(RegistryEvent.MissingMappings<Block> event) { for (RegistryEvent.MissingMappings.Mapping<Block> missingMapping : event.getMappings()) { ResourceLocation resourceLocation = missingMapping.key; String resourcePath = resourceLocation.getPath(); if (ignoredMappings.contains(resourcePath)) { missingMapping.ignore(); } else if (blockRemappings.containsKey(resourcePath)) { ResourceLocation remappedResourceLocation = new ResourceLocation(resourceLocation.getNamespace(), blockRemappings.get(resourcePath)); if (ForgeRegistries.BLOCKS.containsKey(remappedResourceLocation)) { Block remappedBlock = ForgeRegistries.BLOCKS.getValue(remappedResourceLocation); if (remappedBlock != null && remappedBlock != Blocks.AIR) { missingMapping.remap(remappedBlock); } } } } }
@SubscribeEvent public void onMissingItems(RegistryEvent.MissingMappings<Item> e) { for (RegistryEvent.MissingMappings.Mapping<Item> m : e.getMappings()) { String old = m.key.getResourcePath(); if (ignoreItems.contains(old)) { m.ignore(); continue; } String entry = itemIDMap.get(old); if (entry == null) continue; Item value = ForgeRegistries.ITEMS.getValue(new ResourceLocation(LPConstants.LP_MOD_ID, entry)); if (value == null) continue; m.remap(value); } }
@SubscribeEvent public void missingItemMapping(RegistryEvent.MissingMappings<Item> event) { for (RegistryEvent.MissingMappings.Mapping<Item> entry : event.getAllMappings()) { if (mapping.keySet().contains(entry.key.toString())) { entry.ignore(); } } }
@SubscribeEvent public void onMissingMap(RegistryEvent.MissingMappings<SoundEvent> event) { for(RegistryEvent.MissingMappings.Mapping<SoundEvent> missing : event.getMappings()) { if(missing.key.getResourceDomain().equals(Reference.MOD_ID) && IGNORE_SOUNDS.contains(missing.key.getResourcePath())) { missing.ignore(); } } }
@SubscribeEvent public void fixItemMappings(RegistryEvent.MissingMappings<Item> e) { OneSixMigrationHelper.removalHook(); for (RegistryEvent.MissingMappings.Mapping<Item> missing : e.getMappings()) { if (missing.key.getNamespace().equals(RS.ID) && missing.key.getPath().equals("solderer")) { missing.ignore(); } } }
@SubscribeEvent public void onMissinMappingsPotion(RegistryEvent.MissingMappings<SoundEvent> event) { for (RegistryEvent.MissingMappings.Mapping<SoundEvent> m : event.getMappings()) { m.ignore(); } }
static void fixMapping(RegistryEvent.MissingMappings.Mapping<Potion> m) { if ("night_vision".equals(m.key.getResourcePath())) { m.ignore(); } }
@SubscribeEvent public void onMissingItems(RegistryEvent.MissingMappings<Item> event) { for(RegistryEvent.MissingMappings.Mapping<Item> missing : event.getMappings()) { if(missing.key.getResourceDomain().equals(Reference.MOD_ID) && IGNORE_ITEMS.contains(missing.key.getResourcePath())) { missing.ignore(); } } } }
@SubscribeEvent public void fixBlockMappings(RegistryEvent.MissingMappings<Block> e) { OneSixMigrationHelper.removalHook(); for (RegistryEvent.MissingMappings.Mapping<Block> missing : e.getMappings()) { if (missing.key.getNamespace().equals(RS.ID) && missing.key.getPath().equals("solderer")) { missing.ignore(); } } }
@SubscribeEvent public static void ignoreMissingItem(RegistryEvent.MissingMappings<Item> event) { for (RegistryEvent.MissingMappings.Mapping<Item> mapping : event.getMappings()) if (mapping.key.getResourcePath().equals(LibBlockNames.CONJURED)) mapping.ignore(); }