Jump to content

Recommended Posts

Posted

Can someone help me figure out if this is a memory allocation or mod error?

 

 

2014-05-10 20:53:05 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from POSTINITIALIZATION to AVAILABLE. Loading cannot continue

2014-05-10 20:53:05 [sEVERE] [ForgeModLoader]

mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

AppliedEnergistics-Core{rv14.finale3} [AppliedEnergistics Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

CodeChickenCore{0.9.0.9} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Evoc{1.0.0} [Evoc] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

InfiniBows{1.2.0 build 14} [infinity Bow Fix] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MobiusCore{1.1.1} [MobiusCore] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NotEnoughItems{1.6.1.9} [Not Enough Items] (NotEnoughItems 1.6.1.9.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored

OpenModsCore{0.4} [OpenModsCore] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

PowerCrystalsCore{1.1.8} [PowerCrystals Core] (PowerCrystalsCore-1.1.8-9.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

TConstruct-Preloader{0.0.1} [Tinkers Corestruct] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

AppliedEnergistics{rv14.finale3} [Applied Energistics] (appeng-rv14-finale3-mc16x.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

bdlib{1.2.0.38} [bD Lib] (bdlib-mc164-1.2.0.38.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

BiblioCraft{1.5.5} [biblioCraft] (BiblioCraft[v1.5.5].zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded{1.6.4R2.7.8} [MineFactory Reloaded] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

CoFHCore{2.0.0.5} [CoFH Core] (CoFHCore-2.0.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NetherOres{1.6.2R2.2.2} [Nether Ores] (NetherOres-2.2.2-55.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ForgeMultipart{1.0.0.244} [Forge Multipart] (ForgeMultipart-universal-1.6.4-1.0.0.244.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ThermalExpansion{3.0.0.5} [Thermal Expansion] (ThermalExpansion-3.0.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

BigReactors{0.3.0A} [big Reactors] (BigReactors-0.3.0A.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatForestryPre{1.6.4R2.7.8} [MFR Compat: Forestry (part 2)] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Forestry{2.3.1.2-agskies} [Forestry for Minecraft] (forestry-A-2.3.1.2-agskies.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

BinnieCore{1.8.0} [binnie Core] (binnie-mods-1.8.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ExtraBees{1.8.0} [Extra Bees] (binnie-mods-1.8.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ExtraTrees{1.8.0} [Extra Trees] (binnie-mods-1.8.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

AWWayofTime{v1.0.1} [blood Magic: Alchemical Wizardry] (Blood Magic v1.0.1b-JadedWay.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ChickenChunks{1.3.3.4} [ChickenChunks] (ChickenChunks 1.3.3.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

CoFHLoot{2.0.0.5} [CoFH Loot] (CoFHCore-2.0.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

CoFHMasquerade{2.0.0.5} [CoFH Masquerade] (CoFHCore-2.0.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

CoFHSocial{2.0.0.5} [CoFH Social] (CoFHCore-2.0.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

CoFHWorld{2.0.0.5} [CoFH World] (CoFHCore-2.0.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

crowley.skyblock{1.29b} [Ex Nihilo] (crowley-skyblock-v1.29b.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Enchiridion{1.1} [Enchiridion] (Enchiridion-1.6.4-1.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Waila{1.5.2a} [Waila] (Waila_1.5.2a.zip) Unloaded->Constructed->Pre-initialized->Initialized->Errored

TConstruct{1.6.X_1.5.5.2} [Tinkers' Construct] (TConstruct_mc1.6.4_1.5.5.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Thaumcraft{4.1.0g} [Thaumcraft] (Thaumcraft4.1.0g.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Mariculture{1.2.1e} [Mariculture] (Mariculture-1.6.4-1.2.1e.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Natura{2.1.14} [Natura] (Natura_mc1.6.X_2.1.14.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4 v1.1.4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

exaliquo{0.10.5} [Ex Aliquo] (exaliquo_0.10.5.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

extracells{1.6.8f} [ExtraCells] (ExtraCells-1.6.8f.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ExtraUtilities{1.0.3c} [Extra Utilities] (extrautils-1.0.3c.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

flatsigns{1.4.0} [Flat Signs] (Flatsigns-1.6.2-universal-1.4.0.15.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

gendustry{1.1.0.61} [GenDustry] (gendustry-mc164-1.1.0.61.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

HungerOverhaul{1.6.X-2l} [Hunger Overhaul] (hungeroverhaul-1.6.X-2l-build4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

HarvestCraftWaila{1.0.2} [HarvestCraft Waila Fixes] (HarvestCraftWaila-mc1.6.4-1.0.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

HardcoreQuesting{Party Hard (3.3.1)} [Hardcore Questing Mode] (HQM_-_Party_Hard__3.3.1_.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

InfernalMobs{1.4.3} [infernal Mobs] (InfernalMobs_1.6.4.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

inventorytweaks{1.56} [inventory Tweaks] (InventoryTweaks-MC1.6.2-1.56-b77.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

IronChest{5.4.1.702} [iron Chest] (ironchest-universal-1.6.4-5.4.1.702.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

islandbuilder{Island Builder (1.2.0)} [island Builder] (Island_Builder__1.2.0_.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

JABBA{1.1.3} [JABBA] (JABBA_1.1.3.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

jadedspawn{1.0} [JadedSpawn] (jadedspawn-1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MagicBees{2.1.11} [Magic Bees] (magicbees-2.1.11.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MFR Compat Forestry Trees{1.0} [MFR Compat Forestry Trees] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MFR Compat Extra Trees{1.0} [MFR Compat Extra Trees] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatAppliedEnergistics{1.6.4R2.7.8} [MFR Compat: Applied Energistics] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatAtum{1.6.4R2.7.8} [MFR Compat: Atum] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatBackTools{1.6.4R2.7.8} [MFR Compat: BackTools] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatBuildCraft{1.6.4R2.7.8} [MFR Compat: BuildCraft] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatChococraft{1.6.4R2.7.8} [MFR Compat: Chococraft] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatExtraBiomes{1.6.4R2.7.8} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatForestry{1.6.4R2.7.8} [MFR Compat: Forestry] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatForgeMicroblock{1.6.4R2.7.8} [MFR Compat: ForgeMicroblock] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatIC2{1.6.4R2.7.8} [MFR Compat: IC2] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatMystcraft{1.6.4R2.7.8} [MFR Compat: Mystcraft] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatPams{1.6.4R2.7.8} [MFR Compat: Pam's Mods] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatProjRed{1.6.4R2.7.8} [MFR Compat ProjectRed] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatRailcraft{1.6.4R2.7.8} [MFR Compat: Railcraft] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatRP2{1.6.4R2.7.8} [MFR Compat: RP2] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatSufficientBiomes{1.6.4R2.7.8} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatThaumcraft{1.6.4R2.7.8} [MFR Compat: Thaumcraft] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatThermalExpansion{1.6.4R2.7.8} [MFR Compat: Thermal Expansion] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatTwilightForest{1.6.4R2.7.8} [MFR Compat: TwilightForest] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatVanilla{1.6.4R2.7.8} [MFR Compat: Vanilla] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineFactoryReloaded|CompatXyCraft{1.6.4R2.7.8} [MFR Compat: XyCraft] (MineFactoryReloaded-2.7.8-482.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Morpheus{1.2} [Morpheus] (Morpheus-1.6.4-1.2.32.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIAddons{1.10.4.64} [NEI Addons] (neiaddons-mc164-1.10.4.64.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIAddons|AE{1.10.4.64} [NEI Addons: Applied Energistics] (neiaddons-mc164-1.10.4.64.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIAddons|MiscPeripherals{1.10.4.64} [NEI Addons: Misc Peripherals] (neiaddons-mc164-1.10.4.64.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIAddons|ExtraBees{1.10.4.64} [NEI Addons: Extra Bees] (neiaddons-mc164-1.10.4.64.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIAddons|Forestry{1.10.4.64} [NEI Addons: Forestry] (neiaddons-mc164-1.10.4.64.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIAddons|CraftingTables{1.10.4.64} [NEI Addons: Crafting Tables] (neiaddons-mc164-1.10.4.64.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

NEIPlugins{1.1.0.6} [NEI Plugins] (NEIPlugins-1.1.0.6.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored

notenoughkeys{0.0.4} [Not Enough Keys] (NotEnoughKeys-1.6.4-0.0.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

ObsidiPlates{2.0.0} [Obsidian Pressure Plates] (obsidiplates-1.6.2-universal-2.0.0.15.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

OpenMods{0.4} [OpenMods] (OpenModsLib-0.4b.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

OpenBlocks{1.2.7} [OpenBlocks] (OpenBlocks-1.2.7.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

Opis{1.2.1} [Opis] (Opis_1.2.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Errored

MapWriter{2.0.1} [MapWriter] (Opis_1.2.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Errored

Redstone Arsenal{1.0.0.0} [Redstone Arsenal] (RedstoneArsenal-1.0.0.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

TSteelworks{1.6.4-0.0.3} [Tinkers' Steelworks] (TSteelworks-mc1.6.4_0.0.3.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored

TiCTooltips{1.1.5} [TiC Tooltips] (TiCTooltips-mc1.6.4-1.1.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored

TMechworks{33.c001660} [Tinkers' Mechworks] (TMechworks_mc1.6.4_0.1.6.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

warpbook{0.0.177} [Warp Book] (Warp-Book-1.6.4-0.0.177.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

MineTweaker{1.6.4-2.1.2} [MineTweaker] (zMineTweaker-1.6.4-2.3.0.zip) Unloaded->Constructed->Pre-initialized->Initialized->Errored

McMultipart{1.0.0.244} [Minecraft Multipart Plugin] (ForgeMultipart-universal-1.6.4-1.0.0.244.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

IguanaTweaksTConstruct{1.6.X-1p} [iguana Tweaks for Tinkers Construct] (IguanaTweaks-1.6.4-prog7.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored

ForgeMicroblock{1.0.0.244} [Forge Microblocks] (ForgeMultipart-universal-1.6.4-1.0.0.244.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored

2014-05-10 20:53:05 [sEVERE] [ForgeModLoader] The following problems were captured during this phase

2014-05-10 20:53:07 [iNFO] [sTDERR] Exception in thread "Thread-1" java.lang.OutOfMemoryError: PermGen space

2014-05-10 20:53:09 [iNFO] [sTDERR] Exception in thread "Minecraft main thread" java.lang.OutOfMemoryError: PermGen space

 

 

Posted

Add -XX:MaxPermSize=128m to your java arguments in the launcher.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Thanks LexManos for the speedy reply, sorry I could not get back as fast and let you know the results but that worked.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
    • Hi here is an update. I was able to fix the code so my mod does not crash Minecraft. Please understand that I am new to modding but I honestly am having a hard time understanding how anyone can get this to work without having extensive programming and debugging experience as well as searching across the Internet, multiple gen AI bots (claude, grok, openai), and examining source code hidden in the gradle directory and in various github repositories. I guess I am wrong because clearly there are thousands of mods so maybe I am just a newbie. Ok, rant over, here is a step by step summary so others can save the 3 days it took me to figure this out.   1. First, I am using forge 54.1.0 and Minecraft 1.21.4 2. I am creating a mod to add a shotgun to Minecraft 3. After creating the mod and compiling it, I installed the .jar file to the proper directory in Minecraft and used 1.21.4-forge-54.1.0 4. The mod immediately crashed with the error: Caused by: java.lang.NullPointerException: Item id not set 5. Using the stack trace, I determined that the Exception was being thrown from the net.minecraft.world.item.Item.Properties class 6. It seems that there are no javadocs for this class, so I used IntelliJ which was able to provide a decompiled version of the class, which I then examined to see the source of the error. Side question: Are there javadocs? 7. This method, specifically, was the culprit: protected String effectiveDescriptionId() {      return this.descriptionId.get(Objects.requireNonNull(this.id, "Item id not set"));  } 8. Now my quest was to determine how to set this.id. Looking at the same source file, I determined there was another method:  public Item.Properties setId(ResourceKey<Item> pId) {             this.id = pId;             return this;   } 9. So now, I need to figure out how to call setId(). This required working backwards a bit. Starting from the constructor, I stubbed out the variable p which is of type Item.Properties public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); Rather than putting this all on one line, I split it up for readability like this: private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); Here is was the missing function, setId(), which takes a type of ResourceKey<Item>. My next problem is that due to the apparent lack of documentation (I tried searching the docs on this site) I could not determine the full import path to ResourceKey. I did some random searching on the Internet and stumbled across a Github repository which gave two clues: import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; Then I created the rk variable like this: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); And now putting it all together in order: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); This compiled and the mod no longer crashes. I still have more to do on it, but hopefully this will save someone hours. I welcome any feedback and if I missed some obvious modding resource or tutorial that has this information. If not, I might suggest we add it somewhere for people trying to write a mod that doesn't crash. Thank you !!!  
    • I will keep adding to this thread with more information in case anyone can help, or at the very least I can keep my troubleshooting organized. I decided to downgrade to 54.1.0 in the hopes that this would fix the issue but it didn't. At least now I am on a "recommended" version. The crash report did confirm my earlier post that the Exception is coming from effectiveDescriptionId(). I'll continue to see if I can find a way to set the ID manually.   Caused by: java.lang.NullPointerException: Item id not set         at java.base/java.util.Objects.requireNonNull(Objects.java:259) ~[?:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item$Properties.effectiveDescriptionId(Item.java:465) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item.<init>(Item.java:111) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ShotgunItem.<init>(ShotgunItem.java:19) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ModItems.lambda$static$0(ModItems.java:15) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/net.minecraftforge.registries.DeferredRegister$EventDispatcher.lambda$handleEvent      
    • It just randomly stop working after a rebooted my dedicated server PLEASE HELP!   com.google.gson   Failed to start the minecraft server com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive; at path $  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.