Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.15.2] Entites Spawn as pigs


plugsmustard
 Share

Recommended Posts

You create EntityType instances for all your entities in drmdgg.marijuanacraft.init.Entities. You do so in a static initializer, which is not correct, registry entries must be created in their appropriate registry event. Apart from that, you never register these EntityType instances, so they are not valid. Regardless you use them to create your spawn egg items, which means they point to invalid entities.

 

You then register your entities using DeferredRegister in drmdgg.marijuanacraft.util.Registries. You never use these to create spawn eggs.

Link to comment
Share on other sites

17 hours ago, diesieben07 said:

You create EntityType instances for all your entities in drmdgg.marijuanacraft.init.Entities. You do so in a static initializer, which is not correct, registry entries must be created in their appropriate registry event. Apart from that, you never register these EntityType instances, so they are not valid. Regardless you use them to create your spawn egg items, which means they point to invalid entities.

 

You then register your entities using DeferredRegister in drmdgg.marijuanacraft.util.Registries. You never use these to create spawn eggs.

so I should be deleting that entire class? and just work with deferredRegister?

 

how do I do this with spawn eggs?

Link to comment
Share on other sites

3 hours ago, diesieben07 said:

DeferredRegister and vanilla spawn eggs are a bit problematic currently, because items are registered before entities.

so how should i be doing it?

 

and should i bother using the "Entities" class, which has all the world spawn and spawn eggs(that dont work)

Link to comment
Share on other sites

These two topics also describe this issue

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

7 minutes ago, diesieben07 said:

You either have to write your own spawn egg code which uses suppliers or use the traditional registry events.

Either write your own better code or use the same hack that’s been used for ages of creating your entity type in the item event that is incompatible with dynamically reloading registries. I would definitely go with the former.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

4 minutes ago, diesieben07 said:

Yeah, this is actually pretty easy to do by extending SpawnEggItem. Pass null to the constuctor and overide getType to use a supplier instead of the typeIn field.

Any reason why Forge doesn’t patch in another constructor the way it does for fluids (or maybe it’s buckets?)

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

16 minutes ago, diesieben07 said:

Probably because nobody has made  PR yet.

That sounds like it needs to be done then.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • where can i get help for 1.7? please
    • 1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • I am assuming you meant the forge installer log, not sure how to get a previous install log so I ran the installer again. Log below   Launcher Screenshot(s):     Installer Log:    
    • ---- Minecraft Crash Report ---- // Why is it breaking :( Time: 26/10/21 15:07 Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraftforge/fml/common/event/FMLInitializationEvent     at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)     at net.minecraft.client.main.Main.main(SourceFile:148)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: net/minecraftforge/fml/common/event/FMLInitializationEvent     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Unknown Source)     at java.lang.Class.getDeclaredMethods(Unknown Source)     at cpw.mods.fml.common.FMLModContainer.gatherAnnotations(FMLModContainer.java:317)     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:505)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)     ... 10 more Caused by: java.lang.ClassNotFoundException: net.minecraftforge.fml.common.event.FMLInitializationEvent     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 37 more Caused by: java.lang.NullPointerException     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)     ... 39 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.7.10     Operating System: Windows 8.1 (amd64) version 6.3     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 137040984 bytes (130 MB) / 369098752 bytes (352 MB) up to 2147483648 bytes (2048 MB)     JVM Flags: 9 total; -Xverify:none -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump     AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 Optifine OptiFine_1.7.10_HD_U_E7 11 mods loaded, 11 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     UC    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)      UC    FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614-1.7.10.jar)      UC    Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614-1.7.10.jar)      UC    perspectivemod{3.0} [Perspective Mod 3.0] (minecraft.jar)      UC    PlayerAPI{1.4} [Player API] (minecraft.jar)      UC    clearglassmod{1.0} [Clear Glass Mod] ([1.7.10] Clearglass Mod.jar)      UC    Powns' CheatbreakerHud{1.0} [Powns' CheatbreakerHud] ([1.7.10] Powns CheatbreakerHud - 1.0.jar)      UE    reachdisplaymod{1.0} [Reach Display Mod] ([1.7.10] ReachDisplayMod-1.0.jar)      UC    sidebarmod{2.0} [Sidebar Mod Revamp] ([1.7.10] Sidebar Mod Revamp.jar)      UC    timechanger{1.0} [TimeChanger] ([1.7.10] TimeChanger-1.0.jar)      UC    pownstogglesneak{3.0} [pownstogglesneak] ([1.7.10] ToggleSneak-3.0.jar)      GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics 4000'
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.