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

Well, I made some modifications to the default files, by using the same package names in my mod as the default packages. It works fine when I launch MC through eclipse, but when I build my mod and put it in a normal minecraft environment, it doesn't work. Everything that isn't a net.minecraft package is loaded, and MC doesn't crash or fail. Any ideas?

Forge doesn't support modifing base classes. Plus the way you did it wouldn't work anyway. To do so you would need to decompile minecraft code edit it and then recompile it and use that as your jar file to launch minecraft, which wouldn't be compatible, what is it that you are trying to change?

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.

  • Author

Well it was my whole idea to modify the default minecraft experience. Essentially, it's adding a fourth difficulty to minecraft: Insane. And of course, I need to change attributes of mobs and AI etc. If forge doesn't support it, why does it work when I launch through eclipse?

Because that is the way java works. If forge supported it you would be able to modify the forge source directly leading to incompatibility between mods. You can change the AI of mobs in the way I suggested here

http://www.minecraftforge.net/forum/index.php/topic,40955.0.html

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.

  • Author

So how would I go about replacing the default mobs with replacements that have have what I want? I'm fairly new to modding (but not coding)

Well first you need to Subscribe to an event called LivingSpawnEvent here is a good tutorial on EventHandlers. You'll want to take the entity given by the event parameter and scroll through the tasks field and change the AI to it's corresponding alternative.

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.

  • Author

Well, the problem is that I am not only changing AI. I'm also changing their attributes and AI that can't be changed. (Such as the skeleton burning in daylight)

It is possible to change attributes as well

AttributeModifier modifierHealth = new AttributeModifier(((EntityMob)event.entity).getPersistentID(), ((EntityMob)event.entity).getPersistentID().toString() + "_Health", level * 4, 0);
		((EntityMob)event.entity).getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(modifierHealth);
		((EntityMob)event.entity).setHealth(((EntityMob)event.entity).getMaxHealth());

The reason that Skeletons and Zombies burn is because they are an instance of Undead, has nothing to do with AI. Though there is an AI that makes skeletons flee from the sunlight.

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.

If you don't want skeletons to burn during daylight, you need to subscribe to the right event and replace the entity spawned with your own custom one.

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.

What Draco18s said is the best way to do that. Although you could probably use LivingUpdateEvent to extinguish all entities with the EnumCreatureType UNDEAD if they are on fire (Note this is very lag intensive).

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.

  • Author

Ok, thanks guys. I'll look through some forge events and see how to do it tomorrow. Thanks! ;)

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.