Everything posted by dragon3025
-
[1.7.10]How do I change what equipment Vanilla Mobs can spawn with?
Okay I got it working. I used a new Zombie Mob and replaced the old mob with the new using "EntityRegistry.removeSpawn" I just need to remove the old spawn egg now. Here's the new zombie mob A.I.:
-
[1.7.10][Solved]Mob's horn tips are a little off
Okay, I think I get it now. There were minor offsets, maybe they added up in the end. I'll pay attention to that the next time I make a model.
-
[1.7.10]How do I change what equipment Vanilla Mobs can spawn with?
I'm not sure what you mean. If I open the declaration "worldObj" it leads me to Entity.class, but I want to change the way "addRandomArmor()" works in EntityLiving.class without editing base files. All that needs to be changed is this: for (int j = 3; j >= 0; --j) //and if (j < 3 && this.rand.nextFloat() < f) to this: for (int j = 9; j >= 6; --j) //and if (j < 9 && this.rand.nextFloat() < f) EDIT: Am I only able to use @SubscribeEvent on classes found in packages that start with "net.minecraftforge"? EDIT: Do I make an event that runs after it spawns, that removes it's equipment and gives it new ones? EDIT: Okay I just found this: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/1429778-1-4-7-forge-how-to-override-entity-help maybe what I need to do is make a new version of zombie, and make the changes there, and make it so zombies wont spawn, but the new zombie will.
-
[1.7.10]How do I change what equipment Vanilla Mobs can spawn with?
I changed it @SubscribeEvent and made it public and that fixed it some. Now "addRandomArmor() event" is underlined in red. I tried changing it to EntityJoinWorldEvent and imported using Ctrl+Shift+O and it caused a lot of things to underlined.
-
[1.7.10]How do I change what equipment Vanilla Mobs can spawn with?
I'm now trying this: post 5 I found this Tutorial, but it's for 1.6.2, so I don't know if it's outdated: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571568-tutorial-1-6-2-changing-vanilla-without-editing and I found this in EntityLiving: I have a main class that has: @EventHandler public void load(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new EntityLivingHandler()); } and I have a class called "EntityLivingHandler": package com.multiverse.entity; public class EntityLivingHandler { @ForgeSubscribe protected void onAddRandomArmor(addRandomArmor() event) { if (this.rand.nextFloat() < 0.15F * this.worldObj.func_147462_b(this.posX, this.posY, this.posZ)){ int i = this.rand.nextInt(2); float f = this.worldObj.difficultySetting == EnumDifficulty.HARD ? 0.1F : 0.25F; if (this.rand.nextFloat() < 0.095F){ ++i; } if (this.rand.nextFloat() < 0.095F){ ++i; } if (this.rand.nextFloat() < 0.095F){ ++i; } for (int j = 9; j >= 6; --j){ ItemStack itemstack = this.func_130225_q(j); if (j < 9 && this.rand.nextFloat() < f){ break; } if (itemstack == null){ Item item = getArmorItemForSlot(j + 1, i); if (item != null){ this.setCurrentItemOrArmor(j + 1, new ItemStack(item)); } } } } } } "@ForgeSubscribe" and "(addRandomArmor() event)" is underlined in read. This is the first time doing this, am I going about this all wrong? How do I change what armors mobs can spawn with?
-
[1.7.10][Solved]Mob's horn tips are a little off
Doesn't this part make it relative though? parChild.rotationPointX -= parParent.rotationPointX; parChild.rotationPointY -= parParent.rotationPointY; parChild.rotationPointZ -= parParent.rotationPointZ; // make rotations relative to parent parChild.rotateAngleX -= parParent.rotateAngleX; parChild.rotateAngleY -= parParent.rotateAngleY; parChild.rotateAngleZ -= parParent.rotateAngleZ; In Techne I paid attention to the difference between offsets and rotation points. I could see that the blue sphere is the rotation point. When I first tried it, the bottom horn's blue sphere is connected to the head and the horn tip's blue sphere is connected to the horn, but horn tips were way off in Minecraft. When I moved their rotation points (the blue spheres) in Techne so they were more inward and barley touching the horns, that fixed it. I don't know why their tips are moved outward unless the code I posted above isn't setting the relative position right. I got the tutorial from here: http://jabelarminecraft.blogspot.com/p/converting-techne-models-into.html , I did a search (Ctrl+F) and can't find the word "spin" on that page. Where's this spin function?
-
[1.7.10][Solved]Question about weightedProb when using addSpawn
Oh, okay. I went is far as the EntityRegistry.addSpawn, then started looking in SpawnListEntry instead. Thanks for you help.
-
[1.7.10][Solved]Mob's horn tips are a little off
I was pretty sure what I did would would of gave the same results as this, but just to make sure I tried this anyway. I removed the whole convertToChild part, deleted setting rotation points for the child objects, then used addChild to attach the horn tips to the horn bottoms then used addChild to attach the horn bottoms to the head. The bull still had horns on the back of it's head pointing into the head.
-
[1.7.10][Solved]Question about weightedProb when using addSpawn
I know when you set weightedProb in addSpawn higher for a high chance of spawns. I've searched Eclipse and online for the weightedProb for vanilla mobs but can't find it; they have this right? What's the usual amount for a mobs weightedProb? Do I have to use trial and error when setting custom mob's weightedProb to get it to spawn not too common and not too rare or is there somewhere in Eclipse or online that I can find each Mob's weightedProb for addSpawn?
-
[1.7.10][Solved]Mob's horn tips are a little off
I just tried that out right now. I used "//" to cancel changing rotation points when using convertToChild and then used "//" to cancel out setting rotation points in the constructor, but it didn't work the Bulls horn's were in the back of it's head. I then used "//" to cancel changing the rotation angles when using convertToChild, but it still looked messed up.
-
[1.7.10][Solved]Mob's horn tips are a little off
But I'm using this: protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { // move child rotation point to be relative to parent parChild.rotationPointX -= parParent.rotationPointX; parChild.rotationPointY -= parParent.rotationPointY; parChild.rotationPointZ -= parParent.rotationPointZ; // make rotations relative to parent parChild.rotateAngleX -= parParent.rotateAngleX; parChild.rotateAngleY -= parParent.rotateAngleY; parChild.rotateAngleZ -= parParent.rotateAngleZ; // create relationship parParent.addChild(parChild); } It shouldn't do it with that code right?
-
[1.7.10][Solved]Mob's horn tips are a little off
Thanks for the reply. I discovered that I copied the wrong model file when I made changes to rotation points, and removed the setRotationAngle parts so it's moving correctly now, the tips are still wrong though. Well the horns are angled correctly, it's just for some reason the tips are shifted away from the head, so the left horn tip is a little more left than it is in the Techne and the right horn tip is a little more right than it is in Techne. I suppose if I move the horns in more in Techne it'll fix it, but I don't understand why its like this. EDIT: I fixed it in Techne by pulling the tips in, I don't understand why it spread out in Minecraft. Thanks for your help. Here's what it looks like now: In Minecraft In Techne
-
[1.7.10][Solved]Mob's horn tips are a little off
This is my mob's rendering code: I posted images of what it looks like in Minecraft and what it looks like in Techne. The red dots in the Techne picture is where I set the rotation points. I also made sure to use addChild() in reverse order (I attached the tip or the horn to the bottom, and then attached the bottom to the head). How can I fix this? Bull: Bull in Techne:
IPS spam blocked by CleanTalk.