Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Darki

Members
  • Content Count

    161
  • Joined

  • Last visited

Community Reputation

-5 Poor

About Darki

  • Rank
    Creeper Killer

Converted

  • Gender
    Male
  • URL
    http://dasdarki.de/
  • Location
    Cologne
  • Personal Text
    I am working on something interesting

Recent Profile Visitors

1530 profile views
  1. Anyone? What I tried so far: - Using the Entity#move Method - Using the EntityCreature#getNavigator#tryMoveToXYZ Nothing of it works. Do I have to write an own Pathfinder or Method?
  2. What....Oh ok. I am completely new in coding mods....I can code plugins....and java it selfs....But coding mods is so much diffrent to coding plugins. So does that mean as long as I do nothing completely wrong with the proxies....it should work? Or are there any other things I need to watch out for?
  3. Ok. For now I'll leave it like this because its working on the Client....Server-Side I did not test anything in my Mod....Maybe I have to re code some code so that my mod can be played in MP. But for now its just find. And at the moment my mod has other "problems"
  4. Its a simple and dumb answer: Because Mojang does it in the same Way. @Nullable public EntityLivingBase getOwner() { try { UUID uuid = this.getOwnerId(); return uuid == null ? null : this.world.getPlayerEntityByUUID(uuid); } catch (IllegalArgumentException var2) { return null; } } This is the Code of EntityTameable#getOwner
  5. And this would be the Problem^^ I am storing the UUID of the User in the NBT Tags of an Entity. To explain a little bit more: I have a custom Entity which is not tamable but kind of....The Owner gets set by the mod itsselfs....
  6. Hi, I'd like to know if there is a Method or something else to force a Entity (Living) and / or other Players to move to a specified Location. I don't want to teleport the Entities I want to move them...like when the would be controlled by a Player. Thanks in advanced.
  7. Would this work? public static EntityPlayer findPlayer(World world, UUID uuid) { return !DeathNote.getInstance().getProxy().isServer() ? world.getPlayerEntityByUUID(uuid) : FMLServerHandler.instance().getServer().getPlayerList().getPlayerByUUID(uuid); }
  8. Hi, I have a simple Question but I cant figure out how to solve it. I want to get the Player by the given UUID when the Mod is running on the Client not on the Server. To show you what I want here my current code: public static EntityPlayer findPlayer(World world, UUID uuid) { return !world.isRemote ? Minecraft.getMinecraft().player : // The Getter when the Player is on a Server } I have a Static Method which returns an EntityPlayer Object. I check via world.IsRemote if the Player is on the Server or not, when not it returns the Minecraft Player because there is only on
  9. Hey, Its really simple but i am too dumb to solve it. I have a ClientConnectedToServerEvent and I ask how can I get the UUID in this Event from the current Player. When I use Minecraft#player I get a NP Exception. So how^^.
  10. Thanks. Cause of your tips I could improve it. But that wasnt the probleme. I figured it out and honestly i am an idiot . I forgot to call markDirty() after generating my data^^
  11. Or is there another way to save data which is associated to a world?
  12. I debugged a little bit. Everytime i load the data, its null so that its creating a new data. And i find out that when i save the world an exception will thrown. But not in my code i think: [16:46:14] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.MapStorage:saveData:142]: java.lang.IllegalArgumentException: Name and ID cannot both be blank [16:46:14] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.MapStorage:saveData:142]: at com.mojang.authlib.GameProfile.<init>(GameProfile.java:25) [16:46:14] [Server thread/INFO] [STDERR]: [net.minecraft.world.storage.Map
  13. Nope still not working: public static class CombinationData extends WorldSavedData { private static final String DATA_NAME = Diseases.MOD_ID + "_combinationData"; private List<Combination> combinations; public CombinationData() { super(DATA_NAME); } public CombinationData(String name) { super(name); } public static CombinationData get(World world) { MapStorage storage = world.getMapStorage(); CombinationData data = (CombinationData)storage.getOrLoadData(CombinationData.class, DATA_NAME); if (data == null) { generate(); data = new Combination
  14. Hi, I am just working on my mod. I made an algorithm that generates random recipes for something. I want save this recipes in the world data. I searched for it and found WorldSavedData. I tried it with it but every time the world gets loaded the recipes aren't the same. Here my Code: public static List<Combination> combinations; private boolean loaded; public CombinationManager() { combinations = new ArrayList<CombinationManager.Combination>(); loaded = false; } private static void generate() { List<CacheCombination> cacheCombinations = new Arra
  15. Thank you very much. Its working^^ Normally i code spigot plugins its in some points alot easier
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.