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.

Featured Replies

Posted

I am really working in waters a lot of modders tend to ignore or avoid.  Might as well get to the point, I am trying to get my mob to convert into a different mob.  Yes it is a zombie like creature.

zombie = (new EntityNuclearZombie(ModLoader.getMinecraftInstance().theWorld));
zombie.setLocationAndAngles(this.posX, this.posY, this.posZ, ModLoader.getMinecraftInstance().theWorld.rand.nextFloat() * 360.0F, 0.0F);
ModLoader.getMinecraftInstance().theWorld.spawnEntityInWorld(zombie);

This is the code that spawns the new entity and is surrounded by a if statement that check if the entity is dead.  The if statement is in the onUpdate method.  I have a boolean variable that determines if the creature converted.  That makes sure the mob doesn't spawn a huge group of other mobs.  What can/would I need to add to have it so it check the mob that attacked it?  I know of the getLastAttackEntity method but I can't seem to get it to work.  It either spawns a "zombie" all the time or never.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Try checking out the creeper/skeleton code. They've got stuff that uses that.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Already fixed it with what atrain99 said.  All is good.  The infection can spread :D

I actually fixed somebody else's problem?!?!

8)

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.