Jump to content

Recommended Posts

Posted (edited)

As part of a school project I am leading we are trying to make our own mobs, including some of the teachers as mobs.

I have followed a tutorial and it worked but any attempt to repeat it with a new mob just doesn't run.

I am very familiar with Java just not this frame work.

The error occurs when the model is being attempted to be rendered.

I have attached the necessary files below, any help is greatly appreciated.

My pupils are really looking forward to adding in their teachers to the game.

 

All the file paths are correct to the best of my knowledge and the model was built using Techne, I know the texture is a default one but the pupils can change that.

 

Any information I have missed that you need let me know.

 

Currently it compiles with no errors but when the game launches and the entity is spawned the console returns the error on line 24 of the renderMrGed file which is where the texture is called despite it being present

 

code found here

Code

 

 

MrGeddis.png

 

 

 

 

Edited by MrParker
Update with requested information
Posted

As mentioned there are several type of possible errors. Were there console errors/warnings during the loading of the mod indicating a problem with resource assets? Was there continuous console errors when the entity was trying to render? Do you mean that the model just looks different than intended? Do you mean the entity never appears but there are no errors reported?

 

Please describe which case it is and if it is an actual console error please post the logs to Gist or Pastebin as requested above.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (edited)

MrParker, Forge is free  cost and open source so upgrading shouldn't be any issue for educational purposes.

 

However, since this is a request for supporting kids getting into coding I hope the forum here will make an exception and provide support one way or another. I'm at work, but I'll certainly take a look and help if I can.

 

Note: MrParker -- this sort of thing is a really good teaching moment for your students about debugging code. I realize you may not have a lot of time to devote to the subject. But crawling through the console errors, looking at the lines of code that are errored, running the mod in debug mode and so forth are hopefully something you will discuss. Also the way to research and recruit support online.

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
14 minutes ago, jabelar said:

MrParker, Forge is free  cost and open source so upgrading shouldn't be any issue for educational purposes.

Forge is, yes, but not Minecraft.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)

Okay, the stack overflow error is a bit weird at that line of code.

 

I looked through your code and one thing that stands out is that you're double-registering your entities. You shouldn't use the global id registration. At the time of 1.7.10 they were transitioning from the global registration to per-mod id, but you should only use the mod id one. Furthermore, you don't need to set it based on the getGlobalUniqueID(0 method, but rather simply start at 0 for your mod and increment for each one.

 

For example, in my mods I had something like this:

     protected int modEntityID = -1;

     public void registerModEntity(Class parEntityClass, String parEntityName)
     {
            EntityRegistry.registerModEntity(parEntityClass, parEntityName, ++modEntityID, WildAnimals.instance, 80, 3, false);
     }

 

You'll note that I use a pre-increment ++ on the id so that if this gets called multiple times it will get the next id for next entity registered.

 

I'm not sure but potentially the double-registering of your entities could cause some problem during rendering so maybe clean that up and see if it helps.

Edited by jabelar
  • Like 1

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
16 minutes ago, jabelar said:

You'll note that I use a pre-increment ++ on the id so that if this gets called multiple times it will get the next id for next entity registered.

Postfix would made more sense: you're skipping the perfectly good ID 0. 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
5 hours ago, jabelar said:

For example, in my mods I had something like this:


     protected int modEntityID = -1;

     public void registerModEntity(Class parEntityClass, String parEntityName)
     {
            EntityRegistry.registerModEntity(parEntityClass, parEntityName, ++modEntityID, WildAnimals.instance, 80, 3, false);
     }

 

You'll note that I use a pre-increment ++ on the id so that if this gets called multiple times it will get the next id for next entity registered.

 

I'm not sure but potentially the double-registering of your entities could cause some problem during rendering so maybe clean that up and see if it helps.

Great my students and I have been trying to sort this for a week. Didn't think of the ID thought it was randomised. Will look into this and report back.

The ++increment should run the entire mod and sort out most things, I hope.

 

Thanks, will reply soon

Posted

I have tried the following to no success;

  • Changed the ID to increment, either caused a blank spawn egg that did nothing or still crashed the game when the first entity was spawned
  • Tried changing the model, encase there was an error there, still crashed when one was spawned
  • Tried redoing the texture to a solid colour encase there was an issue with the texture, still crashed

All of these with the same error as before, line 24 in the render file where it returns the texture for the entity.

Any other advice or things to try would be nice, or even a nudge in the direction of a tutorial guide my students could follow that someone knows to work, or, any files that anyone has where they have created multiple custom mobs would also be great

 

Thanks for the help so far

Posted (edited)
9 hours ago, MrParker said:

I have tried the following to no success;

  • Changed the ID to increment, either caused a blank spawn egg that did nothing or still crashed the game when the first entity was spawned
  • Tried changing the model, encase there was an error there, still crashed when one was spawned
  • Tried redoing the texture to a solid colour encase there was an issue with the texture, still crashed

All of these with the same error as before, line 24 in the render file where it returns the texture for the entity.

Any other advice or things to try would be nice, or even a nudge in the direction of a tutorial guide my students could follow that someone knows to work, or, any files that anyone has where they have created multiple custom mobs would also be great

 

Thanks for the help so far

So you got rid of the global id registration?

 

Regarding the spawn egg, in 1.7.10 you need to create a custom egg (actual class for egg is called monster placer). See my tutorial link below on how to do that.

 

I have an open source mod for 1.7.10 with multiple mobs. Feel free to adapt it to your needs here: https://github.com/jabelar/WildAnimalsPlus-1.7.10. I also have tutorials on custom entities here: http://jabelarminecraft.blogspot.com/p/creating-custom-entities.html

Edited by jabelar
  • Like 1

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

Thanks jabelar.

Had a quick read through your tutorial and will probably scrap my current setup and try this tonight or tomorrow and report back. The Github link will help a lot  hopefully this will solve it.

Posted

So had a look and changed from using extends livingAnimal to extends Biped, followed a new guide and seems to have solved the problem with the ID's by incrementing as I was previously shown on this thread but for some reason I cant spot, it worked this time. Now to just include textures which is where it erred last time but am currently able to create two different texture less mobs. Big thanks to everyone's support so far

Posted

It all works thanks for all your support for helping education. My pupils are very keen on this project. Computing and programming are not seen as popular or cool choices in the school I am in so we are trying all sorts of ways to introduce the students to programming.

 

Thanks again

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

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
  • Topics

×
×
  • Create New...

Important Information

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