Everything posted by jewell012
-
[HELP]Increase Random Mob Drops
yes
-
[HELP]Increase Random Mob Drops
Fair enough and perhaps though an answer would be nice too.
-
[HELP]Increase Random Mob Drops
yes but when I try to add on to this for (int k = 0; k < random; ++k) { if(k == 2){ this.dropItem(PhantasyRealmsItems.blade, 1); } else if (k == 1){ this.dropItem(PhantasyRealmsItems.brand, 1); } else if (k == 3){ this.dropItem(PhantasyRealmsItems.brand, 1); } and so on it just makes killing the mob drop both items after the first else.. I dont know Im at a loss for what to do after setting Random.nextInt(n) to a higher number.
-
[HELP]Increase Random Mob Drops
I understand how to make the mob drops 0-2 dropping only 1 out of 2 and sometimes nothing, but how would I increase that number to say 10? 1-10 and only 1 out of 10 items? This is what I have now. protected void dropFewItems(boolean par1, int par2) { int random = this.rand.nextInt(4) + this.rand.nextInt(1 + par2); for (int k = 0; k < random; ++k) { if(k == 2){ this.dropItem(PhantasyRealmsItems.blade, 1); } else if (k == 1){ this.dropItem(PhantasyRealmsItems.brand, 1); }
-
Custom Mob model Causes Crash on Startup
Ahhh Thank you!
-
Custom Mob model Causes Crash on Startup
So basically its as the title says, When I use the custom model i created it crashes the game on startup, yet when I use a vanilla mob model like ModelCreeper or ModelBiped it works just fine. So the issue is obviously with the Model Java class but I have no clue on how to fix it. Here is my Model Class. package com.phantasyrealms.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelBoomaMob extends ModelBase { //fields ModelRenderer head; ModelRenderer body; ModelRenderer leg1; ModelRenderer leg2; ModelRenderer leg3; ModelRenderer leg4; ModelRenderer horn1; ModelRenderer horn2; ModelRenderer bottompiece; public ModelBoomaMob() { textureWidth = 64; textureHeight = 32; head = new ModelRenderer(this, 0, 0); head.addBox(-4F, -4F, -6F, 8, 8, 6); head.setRotationPoint(0F, -3F, -5F); head.setTextureSize(64, 32); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 18, 4); body.addBox(-6F, -10F, -7F, 12, 18, 10); body.setRotationPoint(0F, 5F, 2F); body.setTextureSize(64, 32); body.mirror = true; setRotation(body, 0.0092947F, 0F, 0F); leg1 = new ModelRenderer(this, 0, 16); leg1.addBox(-3F, 0F, -2F, 4, 12, 4); leg1.setRotationPoint(-5F, 12F, 0F); leg1.setTextureSize(64, 32); leg1.mirror = true; setRotation(leg1, 0F, 0F, 0F); leg2 = new ModelRenderer(this, 0, 16); leg2.addBox(-1F, 0F, -2F, 4, 12, 4); leg2.setRotationPoint(5F, 12F, 0F); leg2.setTextureSize(64, 32); leg2.mirror = true; setRotation(leg2, 0F, 0F, 0F); leg3.mirror = true; leg3 = new ModelRenderer(this, 0, 16); leg3.addBox(-3F, 0F, -3F, 4, 12, 4); leg3.setRotationPoint(-6F, 1F, -3F); leg3.setTextureSize(64, 32); leg3.mirror = true; setRotation(leg3, 0F, 0F, 0F); leg3.mirror = false; leg4 = new ModelRenderer(this, 0, 16); leg4.addBox(-1F, 0F, -3F, 4, 12, 4); leg4.setRotationPoint(6F, 1F, -3F); leg4.setTextureSize(64, 32); leg4.mirror = true; setRotation(leg4, 0F, 0F, 0F); horn1 = new ModelRenderer(this, 22, 0); horn1.addBox(-4F, -5F, -4F, 1, 3, 1); horn1.setRotationPoint(0F, -4F, -5F); horn1.setTextureSize(64, 32); horn1.mirror = true; setRotation(horn1, 0F, 0F, 0F); horn2 = new ModelRenderer(this, 22, 0); horn2.addBox(3F, -5F, -4F, 1, 3, 1); horn2.setRotationPoint(0F, -4F, -5F); horn2.setTextureSize(64, 32); horn2.mirror = true; setRotation(horn2, 0F, 0F, 0F); bottompiece = new ModelRenderer(this, 52, 0); bottompiece.addBox(-2F, -3F, 0F, 4, 6, 2); bottompiece.setRotationPoint(0F, 14F, 1F); bottompiece.setTextureSize(64, 32); bottompiece.mirror = true; setRotation(bottompiece, 1.570796F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); head.render(f5); body.render(f5); leg1.render(f5); leg2.render(f5); leg3.render(f5); leg4.render(f5); horn1.render(f5); horn2.render(f5); bottompiece.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } }
-
setting a damage range
is there anyway to set a damage range like a min. damage and a max damage for a weapon? or a way to set a damage range for a group like Basic Range 25-40 and having weapons assigned to Basic Range randomly get a damage value from in that?
-
Anvil Event cancelation
So I'm working on a mod and it is a RPG based so there are a ton of weapons and as such they need a repairable item so i added on in, however the problem I'm facing is that i don't want people to just go and rename the weapon or items whenever. what line do i need in order to prevent this? while while the weapon is being repaired and not repaired, so just in general to not allow it to specifically get its name changed? package com.phantasyrealms.item; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; public class Brand extends ItemSword{ public Brand(ToolMaterial p_i45356_1_) { super(p_i45356_1_); // TODO Auto-generated constructor stub } public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add("§oBasic"); } @Override public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack){ return PhantasyRealmsItems.photondrop == par2ItemStack.getItem() ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); } }
IPS spam blocked by CleanTalk.