Thutmose / Pokecube

Primary Development has moved to: https://github.com/Pokecube-Development
https://github.com/Pokecube-Development
19 stars 7 forks source link

Unable to edit gym leaders (and likely all trainers) with the 'Leader Editor' item #16

Closed kayila closed 8 years ago

kayila commented 8 years ago

Issue Description:

When trying to edit a leader in a SMP game, the settings don't seem to actually save when I click the 'save' button. Looking at the server, I find that it displays the following error:

https://gist.github.com/kayila/b75e928848562b6d2468

What happens:

Message is displayed on the client stating that the update has been saved, leader remains unaffected and unchanged. If I leave the GUI and reenter it, the trainer's original data is displayed once more.

What you expected to happen:

Leader is updated to display the data set in the edit gui

Steps to reproduce:

  1. As an on in creative mode on a SMP server, spawn in an Leader Editor item
  2. Sneak-right click the ground, a random leader will spawn
  3. Sneak-right click the leader, the edit trainer GUI will display
  4. Change any data in the GUI
  5. Click Save - Saved Trainer will be displayed
  6. Leave the edit trainer GUI, your data will not be saved.
  7. Check the server output for the reported exception

Affected Versions:

I did try to get the source to build so I could try and narrow down what was going wrong, perhaps fix it and submit a pull request for you, but got a NoClassDefFound error for EntityPokemob (See https://gist.github.com/kayila/b611ea09bdbf7072a712 if you're curious) If you have any suggestions on how to get this running, I'd happily try to run down this bug and fix it for you.

Thutmose commented 8 years ago

On the source building:

For getting it running in development environment, you need to include the addons source into the build path for the core workspace, that is a forge problem, I mentioned it on #Minecraftforge, and the reply was "Interesting", then not much else.

Here is what my project looks like:

image

You don't need the thutcore stuff, I have those in for development reasons. I have compat excluded from the build path mainly to remove the errors from the view (core doesn't include the libraries for it) but with it, it still runs fine, as none of the classes with errors will ever get called.

I setup by setting up development enviroment for core, then adding the source folders for addons to the list.

Then to build it, you just run the gradle stuff in the addons directory, building/setup works fine for it, the only thing that doesn't is actually running in eclipse.

Mobs then uses a resource pack to get it's resources in game.

Now, as for the leader related bug, seems I forgot to set their ID.

The trainer edit gui is in need of a complete re-write, it is currently rather badly done.

I have fixed that particular error in commit 4343b62ebfa1e086298660d7ec679d27729560fb

if you would be willing to re-do the trainer-edit gui, that would be wonderful :D

Thutmose commented 8 years ago

Oh, you can also use /nbtedit for editing the trainer, the gui is useful for adding/removing pokemobs, but /nbtedit can do more things like mob movesets, etc.

a version of ingame nbtedit is included in pokecube.

kayila commented 8 years ago

Thanks for the quick turnaround time! I tried to get the build working but no joy yet. I'll continue messing with it and rerun through what you posted above to make sure I'm doing it right.

In relation to your last comment though.... /nbtedit works in single player, but not in SMP. The server registers the command in the NBTEditpqb.log file, but no gui ever appears on the client. If you'd like, I can open another issue for that.. I'm not sure how heavily or not you modified their code to get it working in 1.8.9 so I'm not sure if this would classify as a bug in their original or just your variant. I did have NBTEdit workin in 1.7.10 (their mod, not this one) so it suggests that it's in the ported version.

Thutmose commented 8 years ago

Ya, open an issue about the nbtedit thing, I will see about fixing it.