Jump to content

Grim1ight

Members
  • Posts

    28
  • Joined

  • Last visited

Converted

  • Gender
    Male

Grim1ight's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi! Before i modded only on 1.7.10, what minecraft version to choose now?
  2. Hello! For example I want make mana system. What better to use - NBT Tags or IExtendedEntityProperities? First is much easier, but is second better? Thanks.
  3. I don't sure that code is needed because this happens even if I use this code: public class EntityGargoyle extends EntityMob { public EntityGargoyle(World p_i1694_1_) { super(p_i1694_1_); this.setSize(0.8F, 2F); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, true)); this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, false)); } public boolean isAIEnabled() { return true; } } I copied tasks from zombie class. Mob still lagging. He can't find path to target and when he falls in hole with 1 block height he just rotating on one point.
  4. Hi! I have problem with entity's AI: if isAIEnabled() returning true my mob is "lagging" - if I higher he begins shake head in different sides, if I set block before him, he jumps only after few seconds, when I changing my direction, he changes it after few seconds and moves in old direction some time. It's not critical but annoying, and happens only if I enable AI. Thanks.
  5. Capable? I think yes. I don't know Java much but I think enought for forge and I still studying. I started to making mods recently (few month ago). I usually trying to find tutorials or see Minecraft code to make basic code and then making my own stuff. If I will learn how to do something (Inventory slots for example), I will know how to make it further. And that's why I asking tutorial (now I want learn inventory, containers, GUIs). P.S. I want slot inside player inventory.
  6. Capable? I think yes. I don't know Java much but I think enought for forge and I still studying. I started to making mods recently (few month ago). I usually trying to find tutorials or see Minecraft code to make basic code and then making my own stuff. If I will learn how to do something (Inventory slots for example), I will know how to make it further. And that's why I asking tutorial (now I want learn inventory, containers, GUIs). P.S. I want slot inside player inventory.
  7. Hi! Can someone give me tutorial how to create inventory slot for 1.7.10? I used Google but dont found anything. Thanks.
  8. Hi! Can someone give me tutorial how to create inventory slot for 1.7.10? I used Google but dont found anything. Thanks.
  9. Can I hide item name over toolbar when his NBT tag changed?
  10. Ok, my bad, i added nbt tags and now all working Thanks!
  11. Hi! I need to make delay before attack, this is my code: private int attackDelay; private int attackTimer; private Entity attackedEntity = null; public ItemGreatsword(Item.ToolMaterial par1ToolMaterial, int par2AttackDelay) { this.field_150933_b = par1ToolMaterial; this.maxStackSize = 1; this.setMaxDamage(par1ToolMaterial.getMaxUses()); this.setCreativeTab(CreativeTabs.tabCombat); this.field_150934_a = 4.0F + par1ToolMaterial.getDamageVsEntity(); //this.attackDelay = par2AttackDelay; this.attackDelay = 40; } @Override public boolean onLeftClickEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, Entity par3Entity) { if (attackedEntity == null) { this.attackTimer = (this.attackDelay + 1); this.attackedEntity = par3Entity; } return true; } @Override public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { super.onUpdate(par1ItemStack, par2World, par3Entity, par4, par5); EntityPlayer player = (EntityPlayer)par3Entity; ItemStack equippedItem = player.getCurrentEquippedItem(); if (this.attackTimer > 0) { --this.attackTimer; System.out.println("AttackTimer: " + this.attackTimer); } if (this.attackTimer == 1) { if (!par2World.isRemote) { this.attackedEntity.attackEntityFrom(DamageSource.lava, 6.0F); this.attackedEntity = null; this.attackTimer = 0; System.out.println("Test"); } } if (equippedItem == par1ItemStack) { player.addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 0, 3)); } } Part of code (System.out.println("Test")) working, entity != null too, i checked it, but entity wont die. Thanks.
  12. Hi. I made config with entity class names list. All working fine except checking: String[] mob = Config.entityList.split(","); String[] mobNames = new String[mob.length]; for(int i = 0; i < mob.length; i++) { mobNames[i] = mob[i]; } for (int i = 0; i < mobNames.length; i++) { if (event.entity.class.getSimpleName() == mobNames[i]) { // } else { System.out.println(event.entity.class.getSimpleName() + " --- "+ mobNames[i]); } } I getting it: "EntityZombie --- EntityZombie" Wt..?
  13. Hi! I made a mob model and want to make animations. Every leg have 2 pieces: upper and lower. Parts of code: convertToChild(leftleg, leftleg2); convertToChild(rightleg, rightleg2); this.leftleg.rotateAngleX = -1.3F * this.func_78172_a(f, 9.0F) * f1; this.rightleg.rotateAngleX = 1.3F * this.func_78172_a(f, 9.0F) * f1; this.leftleg.rotateAngleY = 0.0F; this.rightleg.rotateAngleY = 0.0F; protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { parChild.rotationPointX -= parParent.rotationPointX; parChild.rotationPointY -= parParent.rotationPointY; parChild.rotationPointZ -= parParent.rotationPointZ; parChild.rotateAngleX -= parParent.rotateAngleX; parChild.rotateAngleY -= parParent.rotateAngleY; parChild.rotateAngleZ -= parParent.rotateAngleZ; parParent.addChild(parChild); } Problem is that upper and lower pieces moving in other directions.
×
×
  • Create New...

Important Information

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