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.

dragonz12345

Members
  • Joined

  • Last visited

  1. Hello, I have just created a Fish Mob, And when It is swimming, it keeps bobbing up and down in the water... Can anyone help me please? Here is my EntityFish code: public class EntityFish extends EntityWaterMob { private int randomMotionVecX; private int randomMotionSpeed; private int randomMotionVecY; private int randomMotionVecZ; public EntityFish(World par1World) { super(par1World); tasks.addTask(0, new EntityAIMoveToWater(this, this.worldObj)); tasks.addTask(1, new EntityAISwimmingFish(this)); tasks.addTask(2, new EntityAIPanic(this, 0.38F)); tasks.addTask(3, new EntityAIWander(this, 0.3F)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); } public boolean isAIEnabled() { return true; } public boolean canBreatheUnderwater() { return true; } protected boolean canDespawn() { return true; } protected Item func_146068_u() { return Items.fish; } public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { super.writeEntityToNBT(par1NBTTagCompound); } public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { super.readEntityFromNBT(par1NBTTagCompound); } public boolean getCanSpawnHere() { return worldObj.checkNoEntityCollision(boundingBox); } public boolean isInWater() { return this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.6000000238418579D, 0.0D), Material.water, this); }{ if (!this.worldObj.isRemote) { this.motionX = (double)(this.randomMotionVecX * this.randomMotionSpeed); this.motionY = (double)(this.randomMotionVecY * this.randomMotionSpeed); this.motionZ = (double)(this.randomMotionVecZ * this.randomMotionSpeed); } } }
  2. Hello, I have been looking around at different tutorials on how to make a Mob for Forge 1.7.2, But I am just getting confused... I really want to add this Fish to my mod (I already have the Model and texturemap). If you know of any good tutorials that would help a noob out, please post them down below Thank you! -Dragonz12345

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.