Osuology Posted August 3, 2016 Share Posted August 3, 2016 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? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 3, 2016 Share Posted August 3, 2016 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? 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. Link to comment Share on other sites More sharing options...
Osuology Posted August 3, 2016 Author Share Posted August 3, 2016 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? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 3, 2016 Share Posted August 3, 2016 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 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. Link to comment Share on other sites More sharing options...
Osuology Posted August 3, 2016 Author Share Posted August 3, 2016 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) Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 3, 2016 Share Posted August 3, 2016 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. 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. Link to comment Share on other sites More sharing options...
Osuology Posted August 3, 2016 Author Share Posted August 3, 2016 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) Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 3, 2016 Share Posted August 3, 2016 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. 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. Link to comment Share on other sites More sharing options...
Draco18s Posted August 3, 2016 Share Posted August 3, 2016 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. Quote 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 More sharing options...
Animefan8888 Posted August 3, 2016 Share Posted August 3, 2016 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). 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. Link to comment Share on other sites More sharing options...
Osuology Posted August 3, 2016 Author Share Posted August 3, 2016 Ok, thanks guys. I'll look through some forge events and see how to do it tomorrow. Thanks! Quote Link to comment Share on other sites More sharing options...
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.