Monstrous_Apple
Members-
Posts
217 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Monstrous_Apple's Achievements
Creeper Killer (4/8)
0
Reputation
-
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
It's not rude, I have a personal reason as to why I can't, I did not come onto this forum and say "You all MUST help me" that is your choice if you want to use your own time to help me, I post for help and hope for help, I don't force you into helping me so if you don't want to, then don't. It's not like you was being forced into helping me anyway. Edit: Everyone who tries and has tried to help me already knows I don't know much about Java so it's their choice to give up time to help another person. There's no forcing here. -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
It's not rude, I have a personal reason as to why I can't, I did not come onto this forum and say "You all MUST help me" that is your choice if you want to use your own time to help me, I post for help and hope for help, I don't force you into helping me so if you don't want to, then don't. It's not like you was being forced into helping me anyway. Edit: Everyone who tries and has tried to help me already knows I don't know much about Java so it's their choice to give up time to help another person. There's no forcing here. -
[1.8.9] Custom Mob Drops With Chance To Drop?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Sorry but saying "If(rand < threshold) { //add drop }" to me don't help can I have an example or something using the code I currently showed, please? -
[1.8.9] Custom Mob Drops With Chance To Drop?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Sorry but saying "If(rand < threshold) { //add drop }" to me don't help can I have an example or something using the code I currently showed, please? -
[1.8.9] Custom Mob Drops With Chance To Drop?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Okay I now have this code: //Zombie Soul @SubscribeEvent public void addEntityDrop24(LivingDropsEvent event) { if (event.entity instanceof EntityZombie) { if (event.source != null && event.source.getEntity() instanceof EntityPlayer) { EntityPlayer player = ((EntityPlayer) event.source.getEntity()); if (player != null) { ItemStack holding = player.inventory.getStackInSlot(player.inventory.currentItem); if (holding != null && holding.getItem() instanceof MASoulHarvester) { ItemStack itemstack = new ItemStack(MASouls.ZombieSoul, 1); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemstack)); } } } } } What this does is makes it so when a player kills a zombie using a specific tool it will drop a soul. How would I make this soul drop have a chance to drop? Like for example a 10% chance to drop a zombie soul when using the specific tool? P.S. Massive thanks to Ernio for helping me with this current code. -
Okay I now have this code: //Zombie Soul @SubscribeEvent public void addEntityDrop24(LivingDropsEvent event) { if (event.entity instanceof EntityZombie) { if (event.source != null && event.source.getEntity() instanceof EntityPlayer) { EntityPlayer player = ((EntityPlayer) event.source.getEntity()); if (player != null) { ItemStack holding = player.inventory.getStackInSlot(player.inventory.currentItem); if (holding != null && holding.getItem() instanceof MASoulHarvester) { ItemStack itemstack = new ItemStack(MASouls.ZombieSoul, 1); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemstack)); } } } } } What this does is makes it so when a player kills a zombie using a specific tool it will drop a soul. How would I make this soul drop have a chance to drop? Like for example a 10% chance to drop a zombie soul when using the specific tool? P.S. Massive thanks to Ernio for helping me with this current code.
-
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
I understand what you're saying but not everyone has the time, I wish I did have the time to learn java, but unfortunately thanks to certain circumstances I can't do it, so instead with the little time I have I'm just doing it the faster way using tutorials on straight up modding which is working so far, honestly if I was able to learn Java I would.. anyway thanks for your help and thanks for being patient enough to stick around and help me. -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
I understand what you're saying but not everyone has the time, I wish I did have the time to learn java, but unfortunately thanks to certain circumstances I can't do it, so instead with the little time I have I'm just doing it the faster way using tutorials on straight up modding which is working so far, honestly if I was able to learn Java I would.. anyway thanks for your help and thanks for being patient enough to stick around and help me. -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Well this seems to be working, so you think this is correct, yeah? @SubscribeEvent public void addEntityDrop58(LivingDropsEvent event) { if (event.entity instanceof EntityCow) { if (event.source != null) { EntityPlayer player = ((EntityPlayer) event.source.getEntity()); if (player != null) { ItemStack holding = player.inventory.getStackInSlot(player.inventory.currentItem); if (holding != null && holding.getItem() instanceof MASoulHarvester) { ItemStack itemstack = new ItemStack(MASouls.CowSoul, 1); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemstack)); } } } } } -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Well this seems to be working, so you think this is correct, yeah? @SubscribeEvent public void addEntityDrop58(LivingDropsEvent event) { if (event.entity instanceof EntityCow) { if (event.source != null) { EntityPlayer player = ((EntityPlayer) event.source.getEntity()); if (player != null) { ItemStack holding = player.inventory.getStackInSlot(player.inventory.currentItem); if (holding != null && holding.getItem() instanceof MASoulHarvester) { ItemStack itemstack = new ItemStack(MASouls.CowSoul, 1); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemstack)); } } } } } -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Never mind I figured it out thanks -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Never mind I figured it out thanks -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
By the way why did you give me that code if it wasn't complete/ doesn't work? -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
By the way why did you give me that code if it wasn't complete/ doesn't work? -
[1.8.9] Custom Mob Drops Only With Specific Item?
Monstrous_Apple replied to Monstrous_Apple's topic in Modder Support
Anyway what do I do then?