Solved [NMS] protected void aD()

Discussion in 'Plugin Help/Development/Requests' started by DemKazoo, Apr 4, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Hey guys, so I was working on a custom entity recently, and everything worked fine in the 1.7/1.6 versions of Minecraft/NMS. Untill I started working with 1.8,
    For some particular reason, the protected void aD() { doesn't seem to work and my IDE tells me to change it to a boolean, I'm pretty sure that won't work, but I still tried it and it messed up the entire NMS code.

    Here is the custom entity class:

        public Tarek(World world) {
            try {
                Field bField = PathfinderGoalSelector.class.getDeclaredField("b");
                Field cField = PathfinderGoalSelector.class.getDeclaredField("c");
                bField.set(goalSelector, new UnsafeList<PathfinderGoalSelector>());
                bField.set(targetSelector, new UnsafeList<PathfinderGoalSelector>());
                cField.set(goalSelector, new UnsafeList<PathfinderGoalSelector>());
                cField.set(targetSelector, new UnsafeList<PathfinderGoalSelector>());
            } catch (Exception exc) {
            this.goalSelector.a(0, new PathfinderGoalFloat(this));
        protected void aD() { //Here is the error
    The class is extending EntityVillager, if that was necessary to know :p
    Anyway, I need this fixed soon doe, it's frustrating me.

    I checked every single github source of spigot/bukkit Entity<>.java, for 1.8, and it still says I need to use protected void aD() {, all though I'm not sure if the github is actually 1.8..
  2. Offline


    Moved to Alternatives Section.
  3. Offline


  4. Offline


    @DemKazoo In every version Mojang obfuscates his code.
    This means that "protected void bD()" in 1.7.5 is "protected void pR()" in 1.8 <- Just an example
    So you will need to find it manually. But its not hard. The method in 1.7.5 is almost everytime at the same place for 1.8 (for example line 10).
    Last edited: Apr 4, 2015
  5. Offline


    Thanks for your reply, I tried my best on finding it out, I've like tried almost every combination I can imagine so far.
    After that, I again tried to find it online but the issue is, Spigot is not open source on bukkit, and the bukkit repository is not updated because, ya know.. ;-;
  6. Offline


    @DemKazoo Haha. You can decompile it in JD-GUI or use IntelliJ's automatically installed decompiler.
    DemKazoo likes this.
  7. Offline


    Didn't know we were allowed to, anyway it helped thanks!
Thread Status:
Not open for further replies.

Share This Page