Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moveForward crashes server #13

Closed
Kneesnap opened this issue Aug 1, 2016 · 3 comments
Closed

moveForward crashes server #13

Kneesnap opened this issue Aug 1, 2016 · 3 comments

Comments

@Kneesnap
Copy link

Kneesnap commented Aug 1, 2016

What steps will reproduce the problem?

  1. Create an NPCPlayer
  2. Run #moveForward(3.0F, 1.0F);

What were you expecting to happen? What happened instead?

I expected the entity to move forward, instead the entire server crashed

What version of the plugin are you using? Type /version <Plugin Name>

Version 2.2.1

What Spigot version are you using? Type /version

This server is running Paper version git-Paper-808 (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)

What plugins are you using? Type /plugins

Plugins (4): PacketListenerApi, NickNamer, NPCLib, GravelSlash

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

http://pastebin.com/ix0AKTHX

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

No

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

@InventivetalentDev
Copy link
Owner

Can you please try the same plugin on a default Spigot server? I'll guess this is caused by PaperSpigot.

@Kneesnap
Copy link
Author

Kneesnap commented Aug 2, 2016

Confirmed on Spigot 1.10.2.

This server is running CraftBukkit version git-Spigot-90f61bc-83a9dbd (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)
Checking version, please wait...
You are running the latest version

Here's the class, for reference

public class AISneakLookout extends AICustom{

    private boolean lookDir;

    public AISneakLookout (NPCPlayer player) {
        super(player);
        this.getPlayer().setSneaking(true);
        this.setYaw(180);
    }

    @Override
    public void tick(){
        super.tick();
        this.getNpc().moveForward(0.5F, 0.1F);
        if(!this.hasTimePassed(2000)){
            return;
        }
        this.lookDir = !this.lookDir;
        if(this.lookDir){
            this.setYaw(135);
        }else{
            this.setYaw(-135);
        }
    }
}

@InventivetalentDev
Copy link
Owner

Should be fixed in v2.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants