Military Police15 Posted August 28, 2019 Posted August 28, 2019 I followed one of Harry talk's videos to create my own entity, and i have the entity itself setup and ready to go, but I'm not sure how to register it within the game as the forge/gradle file 'EntityRegistry' doesn't appear within my files, and despite several attempts to update, refresh the dependencies, and move the files manually I have had no success. I'm assuming that I have to find a new way to register the entities, whether in the entity's class itself or by using a different line of code, but i'm at a loss as to how to go about that as i'm rather new to the modding scene. Quote
Military Police15 Posted August 28, 2019 Author Posted August 28, 2019 (edited) I would use different tutorials, but there aren't very many others out there, at least i haven't really been able to find any (edit) I feel dumb, i meant I need to register a mob entity, not a block entity, are they different or would they register the same way? Edited August 28, 2019 by Military Police15 Quote
Animefan8888 Posted August 28, 2019 Posted August 28, 2019 5 minutes ago, Military Police15 said: are they different The are different. But they do both use the Registry events. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Military Police15 Posted August 28, 2019 Author Posted August 28, 2019 That's what I figured, but I wanted to make sure. Thank you guys so much for all the help! Quote
SerpentDagger Posted August 28, 2019 Posted August 28, 2019 Quote I would use different tutorials, but there aren't very many others out there, at least i haven't really been able to find any Here are a few sources that I find useful: Forge Documentation: https://mcforge.readthedocs.io/en/latest/ Jabelar's Tutorials: http://jabelarminecraft.blogspot.com/ GreyMinecraftCoder's Tutorials: https://greyminecraftcoder.blogspot.com/ ShadowFacts' Tutorials: http://shadowfacts.net/tutorials/ TheGreyGhost's Example Mod: https://github.com/TheGreyGhost/MinecraftByExample Some of them are for earlier versions, so keep an eye out for that, but they still contain some useful information nonetheless. There are also more sites recommended on the Jabelar's Tutorials page. I haven't looked at them all personally, but a couple that I did check seemed promising. McJty SupperGerrie2 EMX Dark TheGreyGhost CoolAlias TheXFactor117 Quote Fancy 3D Graphing Calculator mod, with many different coordinate systems. Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.
Military Police15 Posted August 29, 2019 Author Posted August 29, 2019 I've made some decent headway, but i'm at a loss as to how i set the entity's spawn egg Quote
Lea9ue Posted August 29, 2019 Posted August 29, 2019 (edited) RegMob(Class<? extends EntityLiving> EntityClass, String entityNameIn, int solidColorIn, int spotColorIn, int prob, int min, int max, Biome... biomes) you should probably post your code if you want help. Edited August 29, 2019 by Lea9ue Quote
Military Police15 Posted August 29, 2019 Author Posted August 29, 2019 This is what i've got for my entitylist class. I'm having trouble with 'public static final EntityType jeff = new EntityType(Jeff.class, reference.MOD_ID + "jeff");' it gives the error of: 'The constructor EntityType(Class<Jeff>, String) is undefined' I also, like i said don't know how to add the spawn egg for my entity. the code I went off of used 'setEgg' to set the spawn egg, but I think it's out of date because auto complete didn't make it show up public class EntityList { public static final EntityType jeff = new EntityType(Jeff.class, reference.MOD_ID + "jeff"); public static final EntityType[] ENTITIES = new EntityType[] { jeff }; static { jeff.setRegistryName(reference.MOD_ID, "jeff"); } } Quote
TheMikeste1 Posted August 29, 2019 Posted August 29, 2019 1 hour ago, Military Police15 said: I've made some decent headway, but i'm at a loss as to how i set the entity's spawn egg Are you using MC 1.14.4? Take a look at these two posts: Quote
Lea9ue Posted August 29, 2019 Posted August 29, 2019 1 hour ago, Military Police15 said: This is what i've got for my entitylist class. I'm having trouble with 'public static final EntityType jeff = new EntityType(Jeff.class, reference.MOD_ID + "jeff");' it gives the error of: 'The constructor EntityType(Class<Jeff>, String) is undefined' I also, like i said don't know how to add the spawn egg for my entity. the code I went off of used 'setEgg' to set the spawn egg, but I think it's out of date because auto complete didn't make it show up public class EntityList { public static final EntityType jeff = new EntityType(Jeff.class, reference.MOD_ID + "jeff"); public static final EntityType[] ENTITIES = new EntityType[] { jeff }; static { jeff.setRegistryName(reference.MOD_ID, "jeff"); } } Can you verify what version you are programming for. It looks like 1.14. All I have done is in 1.12. I'm guessing though things havent changed to the point that that's not the only code you have. You should have a main class, a entity register class, an entity class, a render class, a model class. You should post all other then model. Quote
Military Police15 Posted August 29, 2019 Author Posted August 29, 2019 (edited) ah, apologies, i'm modding for 1.14 also I'm working on the registry right now, i have yet to work on the render class or plug my mob into the main class Edited August 29, 2019 by Military Police15 Quote
Recommended Posts
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.