Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ZaphielArchangel

Members
  • Joined

  • Last visited

  1. I'm trying to make a my custom peaceful mob attack my custom mob. Heres the code for the mob: [spoiler=Code]package ZaphielArchangel.World.Mobs; import ZaphielArchangel.TotalCorruption.BaseClass; import ZaphielArchangel.TotalCorruption.Other.Sound; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.ai.EntityAIDefendVillage; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookAtVillager; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIMoveThroughVillage; import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; import net.minecraft.entity.ai.EntityAIMoveTowardsTarget; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.monster.EntityGolem; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.world.World; public class Tyrael extends EntityGolem{ public Tyrael(World par1World) { super(par1World); this.experienceValue = 10; this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F)); this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true)); this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(6, new EntityAIWander(this, 0.6D)); this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector)); } public int getTotalArmorValue() { int i = super.getTotalArmorValue() + 2; if (i > 20) { i = 20; } return i; } protected int getDropItemId() { return BaseClass.DivineFragment.itemID; } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(100.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.25D); } protected void collideWithEntity(Entity par1Entity) { if (par1Entity instanceof IMob && this.getRNG().nextInt(20) == 0) { this.setAttackTarget((EntityLivingBase)par1Entity); } super.collideWithEntity(par1Entity); } public boolean canAttackClass(Class par1Class) { return super.canAttackClass(par1Class); } } HELP PLEASE
  2. Are these file sizes to big for minecraft to play : 27 KB 29 KB 39 KB 30 KB 32 KB 40 KB
  3. I'm testing a mod I'm creating and I get this error :

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.