
Jacky2611
Members-
Posts
499 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Jacky2611
-
We do, actually. Take a look at PlayerUseItemEvent. I think i looked at that event, but it fired before i finished eating --> player could stop eating, get the effect and still keep the item. Maybe he wants to create multiple items that use this code. Then it could be faster to use this instead of adding this to every single one of his items.
-
I am using the latest java 8 version on my mac and although everyone always told me that minecraft is not compatible with java 8 it works better than 7 or 6. EDIT: ok, i am not using the latest version. Java just popped up and told me to update. NOW i am using the latest version. Still works great.
-
What? We have a hoe event but no ItemEaten event? What exactly does not work? Do you get an error or does the event simply never work?
-
[1.7.10] Custom Crafting Recipe Problem
Jacky2611 replied to ExtendedHorizons's topic in Modder Support
Ok, this post kind of confused me. You want to use different woodtypes in your crafting, right? If i remember correctly this code here should allow you to use get a specific kind of wood. ItemStack stack = new ItemStack(Block.wood, 1, intWoodType); GameRegistry.addShapedRecipe(new ItemStack(OakPillar, 3),"O" ,"O", 'O', stack); Maybe you should look at this: http://www.minecraftforge.net/wiki/Metadata_Based_Subblocks Using subblocks you only need 1 Block for all your pillars. Kinda like wool. You could also use OreDictionary.WILDCARD_VALUE instead of intWoodType. This would make it possible to craft your item/block with all different wood types. But then you would need a crafting event that sets the log type for you. I used this and nbttags to make it possible to add potions to all food that has been added by vanilla or other mods. -
Yeah, thats why i use an int to decrease the chance for new rooms. But i doubt that the user will really notice how your structure was generated if its underground and dark enough. Btw, did you generate the rooms and the hallways at the same time or did you first generate the rooms and once they were all generated the hallways?
-
I would forget any premade stuff and create my structure using IWorldGenerator. Here is an example of what my code would look like. However, its 01 am here in Austria right now, don't expect that this actually works.
-
well, s**t Thats going to be funny! Yeahhhh...(not) I want to limit the time every player can spend on the server a day. Now i am adding a command to extend the time that a player has left even if he is not online. (And i also have to reset the time for every player at midnight...) Do you have a better idea to do this? EDIT2: Ok, found a solution. I save my data in an extra file when my players are offline and sync it with their data when they join.
-
Ok, maybe its faster if i store all my information in a json file instead of using ExtendedEntityProperties or nbt data. I believe i heared a while ago that there are some built in features for this. Can someone send me a link for this?
-
I don't want to force my users to enter the players uuid. (As already said, i need it to edit offline users nbt for a chat command) So does this mean that i have to loop through all players until i find one with the right name? (Btw, where exactly is the playername stored?) And i tested it by using the uuid as a string and it still returned null.
-
Why not? player Name is just a string? And the player file shouldn't be deleted if the player disconnects... EDIT: Apparently everything is not in a player folder but in a playerdata folder and uuids are used instead of names. So how can i convert a a player name to an uuid? EDIT2: Tried to use the uuid in my command instead. Still returns null. Any ideas why?
-
This is manually:
-
I just found this piece of code: SaveHandlerMP saveHandler = (SaveHandlerMP)DimensionManager.getWorld(0).getSaveHandler(); NBTTagCompound playerNbt = saveHandler.getPlayerData(playerName); InventoryPlayer inventory = new InventoryPlayer(null); inventory.readFromNBT(playerNbt.getTagList("Inventory")); inventory.armorInventory = armor; inventory.mainInventory = contents; playerNbt.setTag("Inventory", inventory.writeToNBT(new NBTTagList())); try { File playersDirectory = new File(saveHandler.getSaveDirectory(), "players"); File temp = new File(playersDirectory, username + ".dat.tmp"); File playerFile = new File(playersDirectory, username + ".dat"); CompressedStreamTools.writeCompressed(playerNbt, new FileOutputStream(temp)); if (playerFile.exists()) { playerFile.delete(); } temp.renameTo(playerFile); } catch (Exception e) { logger.warning("Data failed to save for " + username); } The main problem is that .getPlayerDatadoesn't Exist on MP and for all alternatives i have to use EntityPlayer.(kinda hard without a player) Any ideas on how to get this working? EDIT: Oh, can someone tell me how to get the save folder on mp? I want to try to get this line working without a saveHandler... playersDirectory = new File(saveHandler.getSaveDirectory(), "players"); WorldDirectory....
-
I just changed my my system to something like this: Same question, how do i access this data if the player is offline?
-
I want to edit an offline Players NBT Data. I really need this asap, i would greatly appreciate any ideas or examples. Jacky
-
[1.8][SOLVED] A few questions regarding server modding with 1.8
Jacky2611 replied to Jacky2611's topic in Modder Support
I already did nearly everything expect more advanced threads and advanced reflection(already tried it a few times in other projects). I have been using java for over a year and spend most of my weekends coding. And how can i use newer mcp mappings? -
[1.8][SOLVED] A few questions regarding server modding with 1.8
Jacky2611 replied to Jacky2611's topic in Modder Support
Nah, I will just try it. The one major reason why i started modding was to improve my coding skills. CHALLANGE ACCEPTED! Btw, this is solved. Maybe i will post some experiment results here but my questions have all been answered. Thx diesieben07, you helped me a lot. -
[1.8][SOLVED] A few questions regarding server modding with 1.8
Jacky2611 replied to Jacky2611's topic in Modder Support
Just wondering. How much do dimensions require client stuff? Nah, i don't really want to use threads. The last time i used them i got an extrem performance boost and an awesome matrix like time freeze effect. But this time i won't have to sync anything so i could give it a try. Will they be shut down together with my server? (As already said, i never really used them) -
[1.8][SOLVED] A few questions regarding server modding with 1.8
Jacky2611 replied to Jacky2611's topic in Modder Support
Whoa, thx! That was fast! 6. Unban my players 7. Yeah i guessed so. Anything else? -
I KNOW THAT MOST LIKELY SOME OF THIS QUESTIONS HAVE ALREADY BEEN ANSWERED BEFORE, BUT TO MY SURPRISE THE SEARCH FUNCTION COULDN'T FIND ANYTHING RELATED TO 1.8 MP. I AM SORRY IF THIS IS A REPOST: Hi! We (=22 friends + me) recently started a HUGE hunger games/survival sort of thing in minecraft 1.8 on a private server. However, it turned out that some player have a way too big advantage cause they are able too stay online longer than others. Now i had the (not really) brilliant idea to write a server only (thats possible in 1.8, right?) mod to kick players if they are online for more than 1 hour a day. But bevor i can start such a project there are a few questions: 1. Can I use Events on a server only mod (and are forge events already possible?) 2. How far is the deobfuscating process?(just for basic stuff, i hate strange names in my code) 3. Do the clients really need no forge? 4. I would use a living updated event and player nbt data to save the online time and to check wether a player should be kicked. However, i believe that this could turn out to be really resource intensive. Any better idea? 5. Should i kick them whenever they try to join or should i ban them once they used up their time and then tell the server to unban everyone at midnight? 6. Whats the best way to execute a class at a specific (real) time even if there are no players online? 7. Anything else i should know about server only modding? Whoa, thats a lot of text. A quick answer would really be awesome, we want to reset our server asap. =D And would such a mod be useful for other servers too? Not sure if i should add stuff like a config file or not. Thank you very much for spending some of your time to read my post, have a nice weekend, Jacky (I am NOT asking for updates, pls just tell me whats already possible)
-
Best birthday present ever! thx for the link!
-
Wait! How? Is there already forge for 1.8? I only found fml, which is pretty useless for me. I always get lost creating awesome complicated stuff (everything expect guis...They are plotting to kill me. I am sure!) before i even add the first block.
-
This is definitely not the best solution, if you want your potion to be available via the vanilla brewing-stand or if you want to have a nice icon for your effect in the inventory you should just ignore this post!
-
Hi! For a new mod project i am working on with a few friends i created a 5x5 crafting table(+1 furnace slot). I created my own recipes, crafting manager, container, te, gui... it works...somehow. I ran into the following problems: 1.: When i click an item in my hotbar it is sometimes dropped (right-click-->whole stack is dropped) 2.: When i change the size of my window every slot is moved 1 px upwards. 3.: I want to use "shapes" in my crafting recipes. This means that the user has to fill all empty slots with either sand or bricks. I had the idea to simply switch null with sand/bricks in my findMatchingRecipe() function in my custom crafting manager. However, this somehow created an infinite loop. Any other ideas how to do this? Source Code: Design: TE: Container: GUI: CraftingManager And CraftingFurnace, this is where i keep all my recipes:
-
[SOLVED] 1.7.10 and 1.8 problems uploading my project to github
Jacky2611 replied to Jacky2611's topic in Modder Support
Thx! I just realized that i have been in the wrong folder all the time. I already tried really crazy stuff to get things working. -
[SOLVED] 1.7.10 and 1.8 problems uploading my project to github
Jacky2611 replied to Jacky2611's topic in Modder Support
@diesieben07 i know, thats what i tried. But it didn't work until i refreshed dependencies... I already had this problem 1 year ago Ok, i tried around a lot with Github today and apparently my approach to get it online is completely wrong. It always adds the gradle folders to the index so that whenever someone commits changes everyone else has to reinstall gradle.... So now i came up with a new idea: what if i create a project with only a .project file, a src/main/java, src/main/resources and a .gitignore file that looks like this: * !/src !/build.gradle !/eula.txt !/.gitignore !/.project I uploaded my project to github, deleted it locally, redownloaded it, copied forge in the downloaded folder, installed it and opened eclipse. Perfect, everything in place and only my code is synced. BUT i am missing the classpath file. (Its used for arranging packets and managing Libraries) Can someone please tell me where i can find it or how i can tell eclipse to generate one? EDIT: Ah, forgot the link: https://github.com/Jacky2611/AlchemisticArts sry, i am really tired. btw, can someone suggest a better name? its a mod about magic, crafting, brewing i am creating with a few friends.