Jump to content

thomassu

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by thomassu

  1. hello, i am creating a mod with a mob, I want the mob does not floats if he is on the water. i thought lets look in the EntityLiving class i found this part of code boolean flag1 = this.isInWater(); boolean flag = this.handleLavaMovement(); if (flag1 || flag) { this.isJumping = this.rand.nextFloat() < 0.8F; } i tried to use this for my code: protected void updateEntityActionState() { boolean flag1 = this.isInWater(); boolean flag = this.handleLavaMovement(); if (flag1 || flag) { this.isJumping = false; } } but it doesnt work, does anyone know how to do this?? thanks for reading
  2. whatever fixed it
  3. hello, i am trying to mount a entity, its just a very simple code: entityplayer.mountEntity(this); it works nice, but when the entity goes underwater, you'll dismount, does anyone know how to change this?
  4. hello, i am trying to create a custom biome inside another biome, just like forest and forestHills. i need help !
  5. Thanks man, i needed that code!
  6. hello i am trying with a fuction to destroy a block but the world.destroyBlock isnt there anymore public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) { if (par1World.getBlock(par2, par3 + 1, par4) == Blocks.dirt) { par1World.destroyBlock(par2, par3 + 1, par4, true); } super.breakBlock(par1World, par2, par3, par4, par5, par6); } i tried par1World.removeTileEntity but that doesnt work as well
  7. Thanks guys, it works
  8. i thought that as well, but it doesnt work, and yea flipper are boots
  9. hey, i updated my mod to 1.7.2, it had a armor effect function but it doesnt work anymore public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { ItemStack flipper = player.getCurrentArmor(1); if (flipper != null ) { if (flipper.getItem() == armorMod.Flippers) { if (player.isInWater()) { player.motionX *= 1.2; player.motionZ *= 1.2; player.jumpMovementFactor *= 1.2; } else { player.motionX *= 0.2; player.motionZ *= 0.2; } } } }
  10. thanks it works :DD
  11. i am creating a turtle and when you right click with a block there happens something so i tried this: public boolean interact(EntityPlayer par1EntityPlayer) { ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); if (itemstack != null && itemstack.getItem() == Blocks.chest && !par1EntityPlayer.capabilities.isCreativeMode) { } return true; } but it doesnt work because it is itemstack.getItem does anyone know how to do a interact function with a block
  12. ok, i tried this in my code: EntityList.addMapping(EntityCrocodile.class, "Crocodile", 5, 113213, 3523523); the egg himself is working, but the name isnt, this was the egg: you can see the name is: entity.Crocodile.name so i thought lets make a .lang file and this is the text in my lang file: entity.Crocodile.name = Crocodile
  13. does anyone know how to create spawn eggs with a correct name in minecraft forge 1.7.2? in 1.6.4 i used this code //Eggs public static int getUniqueEntityId() { do { startEntityId++; } while(EntityList.getStringFromID(startEntityId) !=null); return startEntityId; } public static void registerEntityEggs(Class<? extends Entity> entity, int primaryColor, int secundaryColor) { int id = getUniqueEntityId(); EntityList.IDtoClassMapping.put(id, entity); EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secundaryColor)); } but the class: EntityEggInfo is no longer used, so help me !!
  14. you may have to download the latest version of eclipse
  15. thank you boy! you helped me so much, but the last step with the start_client and start_server didnt work for me, but i took that from another tutorial. but the rest was realy helpfull for me!
  16. is it always gonna be forgegradle or will it soon change to the old forgesetup
×
×
  • Create New...

Important Information

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