Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • Author

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 by Military Police15

5 minutes ago, Military Police15 said:

are they different

The are different. But they do both use the Registry events.

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.

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.

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

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 by Lea9ue

  • Author

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");
		
	}
	
}

 

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:

 

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.

  • Author

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 by Military Police15

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.