Jump to content

dude22072

Members
  • Posts

    185
  • Joined

  • Last visited

Everything posted by dude22072

  1. Added and not working, sound is not playing at all! Did you change the return to where your ogg file is located?
  2. Put this in ItemHappyDaysMusicDisk public String getSoundFile() { return "/resources/mod/streaming/FILENAME.ogg"; }
  3. Nope. They don't. How is that possible? every time you place a folder with a same name as one already in another folder(or archive) it replace it or do not copy umm.... what? Attempting to make sense of that, here is an example:
  4. People need to see the code to know whats wrong...
  5. Try looking at EntityBoat in net.minecraft.entity.item
  6. Could this be the error? I haven't used an mcmod.info withing eclipse but shouldn't it be outside of everthing? (like in when you release the zip you put the mcmod.info in the root of the zip file)
  7. Your issues is within this line, lets see if you can find it. I have a working mcmod.info file open in front of me, just to compare, because I couldn't see an issue with that line. And I still can't. "authors": [ "XCompWiz" ], Sorry, sorry. My mind had escaped me.
  8. Your issues is within this line, lets see if you can find it.
  9. Fixed - forgot to use worldObj.removeEntity(this); -~*Locked*~-
  10. In your first set of code, what do u put in the (texture name, without .png) part Are you freaking kidding. it says what to put, The name of the texture. It's really self explanatory. Ok so it says ("[texture name, without .png]"); What does the "without .png" represent after the comma? My texture name is oreJuli, so do I do ("[oreJuli, *SOMETHING*]")? and what is the Something no, he was just using proper grammar.
  11. In your first set of code, what do u put in the (texture name, without .png) part Are you freaking kidding. it says what to put, The name of the texture. It's really self explanatory.
  12. I finally made a throw-able explosion, but i have 2 issues: 1.when it explodes it will explode again 1 second later 2.The entity visually stays in the world and you can't get rid of it, not even exiting and reloading the world works. EntityBomb.class: ackage dudesmods.lozmod; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class EntityBomb extends EntityItem { public EntityBomb(World world) { super(world); setSize(0.5F, 0.5F); yOffset = height / 2.0F; bounceFactor = 0.6; exploded = false; stopped = false; fuse = 100; } public EntityBomb(World world, double x, double y, double z, float yaw, float pitch, double force, int fuseLength) { this(world); setRotation(yaw, 0); double xHeading = -MathHelper.sin((yaw * 3.141593F) / 180F); double zHeading = MathHelper.cos((yaw * 3.141593F) / 180F); motionX = force*xHeading*MathHelper.cos((pitch / 180F) * 3.141593F); motionY = -force*MathHelper.sin((pitch / 180F) * 3.141593F); motionZ = force*zHeading*MathHelper.cos((pitch / 180F) * 3.141593F); setPosition(x+xHeading*0.8, y, z+zHeading*0.; prevPosX = posX; prevPosY = posY; prevPosZ = posZ; fuse = fuseLength; } public EntityBomb(World world, Entity entity) { this(world, entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch, 0.5, 50); } protected boolean canTriggerWalking() { return false; } public void onUpdate() { if(fuse-- <= 0) { explode(); } if(!(stopped) && !(exploded)) { double prevVelX = motionX; double prevVelY = motionY; double prevVelZ = motionZ; prevPosX = posX; prevPosY = posY; prevPosZ = posZ; moveEntity(motionX, motionY, motionZ); boolean collided = false; if(motionX!=prevVelX) { motionX = -prevVelX; collided = true; } if(motionZ!=prevVelZ) { motionZ = -prevVelZ; } if(motionY!=prevVelY) { motionY = -prevVelY; collided = true; } else { motionY -= 0.04; } if(collided) { motionX *= bounceFactor; motionY *= bounceFactor; motionZ *= bounceFactor; } motionX *= 0.99; motionY *= 0.99; motionZ *= 0.99; if(onGround && (motionX*motionX+motionY*motionY+motionZ*motionZ)<0.02) { stopped = true; motionX = 0; motionY = 0; motionZ = 0; } } } public void onCollideWithPlayer(EntityPlayer entityplayer) { } protected void explode() { if(!exploded) { exploded = true; worldObj.createExplosion(this, posX, posY, posZ, 5F, true); } } public boolean attackEntity(Entity entity, int i) { super.attackEntityFrom(DamageSource.causeThrownDamage(entity, entity), i); explode(); return false; } public void writeEntityToNBT(NBTTagCompound nbttagcompound) { super.writeEntityToNBT(nbttagcompound); nbttagcompound.setByte("Fuse", (byte)fuse); } public void readEntityFromNBT(NBTTagCompound nbttagcompound) { super.readEntityFromNBT(nbttagcompound); fuse = nbttagcompound.getByte("Fuse"); } double bounceFactor; int fuse; boolean exploded; boolean collided; boolean stopped; public ItemStack getEntityItem() { return new ItemStack(LOZmod.bomb); } } ItemBomb.class: package dudesmods.lozmod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class ItemBomb extends Item { public ItemBomb(int par1) { super(par1); setMaxStackSize(32); setCreativeTab(LOZmod.tabLozMod); } public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) { if(!entityplayer.capabilities.isCreativeMode) { --itemstack.stackSize; } if (!world.isRemote) { world.spawnEntityInWorld(new EntityBomb(world, entityplayer)); } return itemstack; } }
  13. Why is the folder the american spelling yet the file the British spelling? did you write the code/folder names accordingly?
  14. Armour doesn't protect against Harming potions. and a potion is a damage source so you could have an enchantment to protect against potions.
  15. For an instant death potion you can make a enhanced version of the Potion of Harming which does instant damage.
  16. You if code says creative mode AND !isPlayerWearingSpaceSuit You most likely need it to be an or (|| instead of &&)
  17. This is gonna be quite a project for OP. even after importing things and doing simple fixes their are still 149 errors.
  18. That just might be the problem. Where would I find the FMLVersion.properties file? ./MCP/eclipse/Minecraft/bin
  19. Look in your errors in ECLIPSE. If their is a bit about not being able to delete a file (like FMLVersion.properties) then delete that file and it should be back to normal. This has happened to me some times and the crash report doesn't point to it at all.
  20. For Custom Villagers you can just use a trade handler. Here is one of mine: package dudesmods.lozmod; import java.util.Random; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.village.MerchantRecipe; import net.minecraft.village.MerchantRecipeList; import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; public class villagerBeedleTradeHandler implements IVillageTradeHandler { @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { //30 rupees for 1 potion recipeList.add(new MerchantRecipe(new ItemStack(LOZmod.ruppe, 3, 2), new ItemStack(Item.potion, 1, 8229))); //30 bombs = 100 rupees recipeList.add(new MerchantRecipe(new ItemStack(LOZmod.ruppe, 1, 5), new ItemStack(LOZmod.bomb, 30))); } } How it's used: recipeList.add(new MerchantRecipe(new ItemStack(Input), new ItemStack(Output))); recipeList.add(new MerchantRecipe(new ItemStack(Input 1),new ItemStack(Input 2), new ItemStack(Output))); Bit from main mod class: VillagerRegistry.instance().registerVillagerType(7, "/dudesmods/lozmod/villagerBeedle.png"); //id must be greater than 6 villagerBeedleTradeHandler newBeedleTradeHandler = new villagerBeedleTradeHandler(); VillagerRegistry.instance().registerVillageTradeHandler(7, newBeedleTradeHandler); VillagerRegistry.instance().getRegisteredVillagers();
  21. Will this be for Vanilla Villagers or Custom Villagers?
×
×
  • Create New...

Important Information

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