Jump to content

[1.10.2] Modifying default Minecraft files...


Osuology

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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

×
×
  • Create New...

Important Information

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