Search the Community
Showing results for tags 'registries'.
-
Figured it out, nothing was wrong with the code, the file that contains the bus registry needed to have the same name as the directory it was in. Whoops. ================================================ Hey there! I'm trying to create a simple mod for 1.20.1 that adds a few custom banner patterns that don't require any banner pattern items. To be completely honest, this is my first time modding for Minecraft, so after setting up the project in Intellij, I copied the parts of the source code from this mod on CurseForge that dealt with adding and registering banner patterns, including the asset_id and translation_key registry .json files. From what I understand, to add a banner pattern that doesn't require a banner pattern item, I only needed to create the registries for each pattern like in here and then register it in the main java class like here on Line 54. Additionally, in the lang/en_us.json file, add in the names for each respective banner color, and in the data/minecraft/tags/banner_pattern/no_items_required.json file, add each banner pattern that does not require a banner pattern item to make a banner. The project is able to compile when loading in Forge which makes me assume that the file structure I have is correct, and checking the docs, I believe I did everything correctly. However, on loading a Minecraft world, this error appears in console and the loom is subsequently blank. [Worker-Main-1/ERROR] [minecraft/TagLoader]: Couldn't load tag minecraft:no_item_required as it is missing following references: *lists every added entry in no_item_required.json* The message clearly states something went wrong regarding when trying to load in the registries from the mod, but I have no clue what could be wrong with the code I have. Attached below are screenshots of what I currently have. Java Main Class Banner Registry Class File Structure Error in Console upon loading a Minecraft world What the loom shows without minecraft:no_item_required The original mod I copied still functions completely, so if anyone can figure out why the registries for the mod I'm making isn't working, that would be greatly appreciated!
-
public class BlockEntitiesManager { public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, Main.MODID); public static final RegistryObject<BlockEntityType<CreativeBlockE>> CREATIVE_BLOCK_E = BLOCK_ENTITIES.register("creative_blocke", () -> BlockEntityType.Builder.of()); public static void register(IEventBus eventBus) { BLOCK_ENTITIES.register(eventBus); } } Builder cannot be resolved or is not a field
-
Every time I attempt to play my modpacks it's stops responding at a specific part. Occasionally it does load past it, but as soon as it gets to around 99% it stops responding again. Reference : https://imgur.com/a/jM3gxVw Log : https://mclo.gs/JT1ljQY
-
As the title says, I can't find a proper way to register a block entity type in 1.21.3 as BlockEntityType.Builder class has been made private. I have scoured the internet and even the docs tell me to use this class I don't have access to. What is the preferred way of doing registering the block entity type? For context, I'm in the process of updating my mod from 1.19 to the 1.21.3.
-
Hello! I'm having a problem generating data from registered blocks, I've looked through everything and haven't found anything that could be causing this problem, so I come to the Forge community as a last resort. The log information is in a gist with the file data debug.log. This is the project link on GitHub: GitHub: https://github.com/eterium-network/quantum-praeda Solved, the problem was in the structure of the LootTables file generation class. Thank you in advance for the community's help! Original Text:
-
Getting back into modding, the last time I seriously modded was almost 6 years ago. I'm pretty rusty and a lot has changed. What I'm trying to do right now is right a method that can remove an item's recipe using only said item's ResourceLocation as an input. From what I've gathered from older examples online it seems like the preferred method to do this involves using a DummyRecipe as that breaks the least amount of stuff (such as achievements related to a given item). The problem I'm having is that most of these examples are quite dated, usually being for 1.12. It seems that enough of the methods have changed for 1.18.2 forge that the implementation will be quite different, and that is what I'm struggling with so right now. The basic concepts are still the same, but some of the classes I need to reference and what methods are where on said classes has been swapped around, and its giving me trouble. I'm sure I could figure it out after a few days, but I figured it would make sense to ask for help as that may expedite the process. Thanks in advance.
-
I'm updating my mod from 1.19.2 to 1.20.X, going to 1.19.3 as an intermediate step so that I can ensure my data generators work correctly before updating the rest. I have many lines to create configured features that look like this: ALPINE_ROCK = new ConfiguredFeature<>(ModGeneration.OUTCROP.get(), new BlockStateConfiguration(Blocks.STONE.defaultBlockState())); Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new ResourceLocation(Main.MOD_ID, "alpine_rock"), ALPINE_ROCK); Now I am on 1.19.3, BuiltinRegistries.CONFIGURED_FEATURE no longer exists. What is the proper way to register configured features in this version? Can this even still be done in code, or is this one of the "dynamic registries" affected by the registry overhaul? If it can no longer be done in code, what is necessary to do it using JSON?
-
Hello, I got some code that won't register in Forge (MC=1.20.4), (FML=49.0.30) (It basically iterates through an array all supported Minecraft languages and picks at random one and reloads ResourceManager with it: List<String> languageCountryCodes = new ArrayList<>(); Collections.addAll(languageCountryCodes, "af_za", "ara_sa", "ast_es", "aze_az", "bak_ru", "bar_de", "bel_by", "bul_bg", "bre_fr", "qbr_nl", "bos_ba", "cat_es", "ces_cz", "cym_gb", "dan_dk", "bar_at", "gsw_ch", "deu_de", "ell_gr", "eng_au", "eng_ca", "eng_gb", "eng_nz", "qpe", "eng_qabs_gb", "en_ud", "epo", "spa_ar", "spa_cl", "spa_ec", "spa_es", "spa_mx", "spa_uy", "spa_ve", "spa_es_an", "est_ee", "eus_es", "fas_ir", "fin_fi", "fil_ph", "fao_fo", "fra_ca", "fra_fr", "fra_de", "fur_it", "fry_nl", "gle_ie", "gla_gb", "glg_es", "haw_us", "heb_il", "hin_in", "hrv_hr", "hun_hu", "hye_am", "id_id", "ibo_ng", "is_is", "qis", "ita_it", "jpn_jp", "jbo", "kat_ge", "kaz_kz", "kan_in", "kor_kr", "ksh_de", "kw_gb", "lat_va", "ltz_lu", "lim_nl", "lmo_it", "lao_la", "qll", "lit_lt", "lav_lv", "lzh", "mkd_mk", "mon_mn", "zlm_my", "mlt_mt", "nhe_mx", "vmf_de", "msa_my", "mlg_mg", "mar_in", "nld_be", "nld_nl", "nno_no", "nob_no", "quc_latn_gt", "pol_pl", "por_br", "por_pt", "qya", "ro_ro", "qpr", "rus_ru", "srp_latn_rs", "srp_cyrl_rs", "swe_se", "slk_sk", "slv_si", "som_so", "sqi_al", "ckb_ir", "sr_sp", "swa_ke", "swh_tz", "tam_in", "tha_th", "tgk_tj", "uig_cn", "ukr_ua", "urd_pk", "uzb_uz", "ven_za", "cymr", "xho_za", "yor_ng", "yue_hk", "zho_hans_cn", "zho_hant_hk", "zho_hant_tw"); // Shuffle the list Collections.shuffle(languageCountryCodes); // Print one code at a time for (String code : languageCountryCodes) { LanguageManager languageManager = new LanguageManager(code); languageManager.onResourceManagerReload(TroubleshootingMod.getResourceManager()); System.out.println(Minecraft.getInstance().getLocale()); System.out.println(code); break; // Exit the loop after printing one code } Minecraft.getInstance().getLanguageManager().setSelected("bar_de"); also does not appear to be functional.. Kind regards, Ensamisten
-
Hello. I am trying to read the value (durability) from a config file for an Shield Item. I cant get the code to work and i need some help. So I just need help on how to call the value from the config file. The code from the Config file works absolutely fine. Here is the code of my Shield Item getting registered and getting the Properties. public static final DeferredItem<Item> LEATHER_SHIELD = ITEMS.register("leather_shield", () -> new ShieldItem(new Item.Properties().durability(MoreVanillaShieldsConfig.LEATHER_SHIELD_DURABILITY.get())){ @Override public int getMaxDamage(ItemStack stack) { return MoreVanillaShieldsConfig.LEATHER_SHIELD_DURABILITY.get(); } });
-
Topic for making tags
-
- 1.10.2
- 1.11.2
-
(and 81 more)
Tagged with:
- 1.10.2
- 1.11.2
- 1.12.2
- 1.13.2
- 1.14.4
- 1.15.2
- 1.16.5
- 1.17.1
- 1.18.2
- 1.19.0
- 1.19.1
- 1.19.2
- 1.19.3
- 1.19.4
- 1.2.5
- 1.20.0
- 1.3.2
- 1.4.7
- 1.5.2
- 1.6.4
- 1.7.10
- 1.8.9
- 1.9.4
- armour
- bad jvm args
- biomes
- blocks
- broken mod
- bug
- capabilities
- client
- client-only mods on server
- codecs
- commands
- dimensions
- effects
- enchantments
- entities
- events
- feature request
- fluids
- food
- gradle
- groovy
- guis
- ide
- installer
- items
- java
- kotlin
- launcher
- libraries
- loot
- metadata
- missing jar association
- missing java
- missing mods
- mixin
- needs more info
- networking
- news
- optifine
- ores
- out of memory
- outdated drivers
- particles
- performance
- porting
- potions
- recipes
- registries
- rendering
- scala
- server
- solved
- sounds
- textures
- tools
- tutorial
- weapons
- worldgen
- wrong java version
- wrong mod version