Jump to content

Bydon873

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Bydon873's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Well, getEntityData doesn't seem to be saving the changes I made to it for some reason. I don't want to add new data to the player, but rather change the values of the fields that it already has, such as inventory, health, etc. Could I do this with IExtendedEntityProperties?
  2. I'm trying to save player NBT in an external file and be able to load it later when the player logs in. In a PlayerLoggedInEvent listener I put the code: NBTInputStream inputStream = new NBTInputStream(new GZIPInputStream(new FileInputStream(savedFile))); CompoundTag savedCompound = (CompoundTag) inputStream.readTag(); for(Map.Entry<String, ITag> entry : savedCompound.getTags().entrySet()){ ITag tag = entry.getValue(); event.player.getEntityData().setTag(tag.getName(), getType(tag)); } I implemented an NBT reader to parse through the data in the file, as you can't get the value or name of tags with the minecraft classes, so that's what ITag and CompoundTag are. getType(tag) just returns a new NBTBase of the correct type (NBTTagByte, NBTTagInt, etc) with the value in the ITag. The NBT file is read just fine, however the player's NBT remains the same after this, as displayed by their inventory remaining empty rather than filling up with the saved inventory. How can I make it update with the new data?
  3. I'm wondering what could be done in a mod that is placed in the server only, not the client, and what couldn't? I know that GUIs are a no for server-side, but what else? And for example, let's say I have other mods the server and client (let's use thaumcraft as an example) and I were to hook into the thaumcraft API on the server, could I change the behavior of a block? Say, make a node with infinite aspects?
  4. Got it, worked now. Had to delete the classes folder in the build folder and re-build. Thanks to everyone for the support!
  5. I think I found the problem. While searching the .jar to reply to I noticed that the cryptography package is called "Cryptography" instead of "cryptography" so when it looks for cryptography.KeyGen, or RSARead, it can't find it It's strange, since the package name is cryptography, and the package of the classes is set to com.direnode.forgevotifier.cryptography
  6. Main class (ForgeVotifier): http://pastebin.com/tK6qEZ6v RSARead: http://pastebin.com/7aFB8cCB KeyGenerator: http://pastebin.com/VhdLc1tL
  7. Don't have any @SideOnly tags, it's supposed to be server-only, so I just set acceptableRemoteVersions = "*" in the @Mod The KeyPair and RSARead classes are mostly just encrypting and decrypting stuff, using java.security
  8. I'm building a votifier that runs on forge to use on my own server, since I'm going pure forge and no cauldron. While testing in IDEA, the mod compiled and ran successfully, however, when I build it (with /gradlew build) and run it on a server, I get a ClassDefNotFoundException. My project structure is: src -main --java ---com.direnode.forgevotifier ----cryptography -----KeyGenerator -----RSA -----RSARead ----handler -----ConfigurationHandler -----PlayerHandler ----reference and some other stuff, follows that same order Latest forge log: http://pastebin.com/MB1Cwp0S Crash log: http://pastebin.com/Ua9zmXZu At first it also happened with the KeyGen class, but I generated them in the IDEA server and just transferred it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.