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.

andr4826

Members
  • Joined

  • Last visited

  1. Hello everyone! I have the following code snippet that's supposed to make a "robot" called _scriptedEntity in-game turn to face a given Entity called "entity" and attack the entity if the _scriptedEntity is within range.. I can not for the life of me how ever understand what .swingarm is supposed to do? my thought was that I could use the method to achieve the swinging arm animation of _scriptedEntity.. how ever I don't understand what actual parameters .swingarm is supposed to have and why? _scriptedEntity extends entityCreature tl:dr; How do I animate _scriptedEntity to swing his arm? @Override public void attack(Entity entity){ //turn and face entity this._scriptedEntity.faceEntity(entity,360.0f,360.0f); //attack target if (this.getDistanceTo(entity) <3.0) { //swing animation.... wait wat? this._scriptedEntity.swingArm(); //give damage entity.getWrappedEntity().attackEntityFrom(DamageSource.GENERIC, 1.0f); } }

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.