Jump to content

Ne0NAfr0

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Ne0NAfr0

  1. Thanks, just for testing some stuff. Where would I find the debug config?
  2. Hey, I am working with some code that required the players name to be the same. I would like to be able to test the code where the player name does not change from "playerX", ex" player293, then recompile and your name is player143 or whatever. Just a quick question, only way I found around was to compile, run another client with updated mod pack and join a LAN server. It is a bit tedious... not really a fan. Is there any easy fix, apart from changing my code to not use the players name?
  3. Hey guys! Recently I had the great idea to add in a "portable" ender chest. An item that acts like an ender chest when you use the item. I got everything to work great, the ender pack is separate from a normal ender chest, so items in an ender chest and items in the players ender bag are separate from each other. As well, each player has a separate ender pack that is their own, each player can store their own items in that pack without interference from other players. My problem is that the Items do not save in the pack after a game restart, they save after reloading the world but not an entire game close and open again. I was under the impression that the code I copied from the enderchest in minecraft saved its inventory through NBTTags, and it does. My problem is that I am unsure of how to save and load the chests to the ArrayList of enderPouchTiles I have. The chest info is being saved and stored, (I think) but everytime you load the game it creates a new array of empty tile data for the chests. I though of storing the info in the TileEntityEnderChest type, as I believe that stores what chest it is, and then loading that tile data rather than creating a new one every time. The problem is that the variables in TileEntityEnderChest do not have proper names, and some are private. I could create my own file with the same info but have the variables public, or have get/set methods but I feel as though there must be an easier way. The spacing is a bit weird on the pastebin but here is my code anyway: http://pastebin.com/mbXJj2BQ To recap, Every thing works but saving the ListArray of enderPouchTile data. I know how to store basic info in NBTTags, like ints, strings etc... but not something like this. Would that be possible? Any help is appreciated, thanks! Oh, sorry, And I am using Forge 1.8. Thanks.
  4. Hahaha, *Kry face* :'( :'( :'( This is my problem... Nothing is for 1.8 Thanks though!
  5. So far I have done: Items, blocks, armor, custom drops, world gen, tools, packets(using IMessage) and other things, all of which are working for 1.8 and I understand them. I want to move on to more advanced things like backpacks to get better, not because they are hard. You won't ever get better if you don't try. What I want, simply, is a tutorial for backpacks and all of its components that work for 1.8 forge, rather than linking to other tutorials half way through that are for a different version of Forge that do not explain how to update. It would be easiest to compare with code that I know will work and what I have now to find out what is wrong so I can understand fully. I did read the step by step instructions made by coolAlias but still, I need more help than that.
  6. I was trying to follow the tutorial for backpacks by coolAlias here: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571597-forge-1-6-4-1-8-custom-inventories-in-items-and I was getting very frustrated and eventually just copy and pasted everything into a new project to test if it worked. I had followed all the extra steps at the bottom including the "update from x to 1.8, 1.7 and 1.6 etc..." The tutorial also included another one for sending packets found here: http://www.minecraftforge.net/wiki/Packet_Handling He said it was as simple as "Copy and paste into your project" but I can't do that because the packet handling tutorial is not for 1.8. I am very flustered and confused at the vast number of of tutorials for all the versions with slightly tweaked pieces of code left and right. I am only a new modder and I am not familiar with the Forge libraries let alone the Forge libraries for the numerous versions of Minecraft. There is currently not a single file other than the ClientProxy.java file that has no errors. So, could someone PLEASE post a gitup link to a funcional project similar to what I am trying to do, so I can see what I am doing wrong. I would really appreciate it. Yes I know, I am only a baby modder, and I still need to be spoon fed. Anyway, thank you for any help you give, especially if it is from Mr. coolAlias himself.
  7. Yes, I had never actually tried the code in 1.7, I was reading from another article, so I was unintentionally lying. Sorry. To use HarvestDropsEvent I have to pass it variables, how do I give it all of its required variables? it needs: (World world, BlockPos pos, IBlockState state, int fortuneLevel, float dropChance, List<ItemStack> drops, EntityPlayer harvester, boolean isSilkTouching) This is what I have figured out so far, but I am not even sure if this is how you intended me to use it, please explain for me. Thanks for the help. http://pastebin.com/XD99K5r2
  8. Sorry, I was unclear. I want to make leaves drop sticks, the code above works for 1.7, but not 1.8. My code here: http://pastebin.com/SFe5RxZw
  9. Hey, just a quick question. How would I update the code below to work in 1.8. I can't find where in event.state to change it to, or if there is something else I need to do. Thanks. event.drops.add(new ItemStack (Items.stick, 1)); I have already changed: if (event.state == Blocks.leaves) to: if(event.state.getBlock() == Blocks.leaves || event.state.getBlock() == Blocks.leaves2) But I can not figure out the drops part.
  10. Actually, I am not sure if my last comment applies here, because I think you are handling it differently than how I had thought. So maybe just ignore that last suggestion. I had thought you were updating the position every tick rather than just sending the packets. Sorry
  11. Now, I am no genius, but even if you update it every tick would that not be fast enough? I mean, there are 20 ticks per second I think, right? That means that your ship would be suck updating at the equivalent of 20 fps...? Now if you change your Minecraft max fps to be 20, you will notice how terrible that is, so It is no doubt that it looks choppy when being updated. Keep in mind, I am a complete newb here, and I know not a lot about Forge etc, so I am sure there is some way around that.
  12. Oh my goodness! Thank you. It works now, I had't realized that "is control pressed" was client side only. Thanks! Is there any way to check if control is pressed serverside? Because that sounds like I need to use packets for that Otherwise my problem is solved! Thanks for the help.
  13. Yes, the NBT tag is stored in an itemstack. I would have thought that it would update itself, but it appears to not be doing anything. It would seem that the server is deleting the user changed itemstack data rather than the client side updating the servers version. I am not quite sure what is wrong here? I will post the full class for my teleporter here: http://pastebin.com/TjcvBNMV P.S. I have commented out any packet sending stuff for the time being. P.P.S. I am sorry, I hate to post the sort of "where's Waldo", what is wrong with my code. I am new to Minecraft modding so I really appreciate your help. Thanks for your time!
  14. Hey, I am currently trying to implement a basic Teleporter into my mod. Everything works great on single player, however I noticed that on my server running my mod players using the Teleporter item could not teleport. After further looking into things I found that the reason it did not work was because the Teleporter item information did not update on the server. How it works: Basically, there is a personal Teleporter item that when right clicked on a block stores the coords of that block in an NBT tag. When the player shift+clicks(uses item) they get teleported to the position stored in the NBT tag. I was following the tutorial by Mr. Crayfish on his 1.8 modding series on youtube, unfortunately he stopped posting videos on the series so I had to improvise how the Teleporter worked. Keep in mind, again, it works completely fine on single player, just not for people connected to a server. Now, as I said, everything works great on single player, but not on my server. It would appear as though the NBT tag is not being updated to the server. I implemented a packet sender in an attempt to update the info to the server: https://gist.github.com/CatDany/4a3df7fcb3c8270cf70b I am stuck on trying to get the packet through. In single player, on the host server it would appear that when sending a packet it goes through, but repeats endlessly. (I have a print statement for debugging when the server receives a packet). When connected through lan, when attempting to send the packet to the server it still never goes through. Here is the simplified code in my project: http://pastebin.com/aftBriwL Also, at the bottom of the pastebin I added the code that I modified from the "Packets are Easy" post. I am using Forge 1.8-11.14.3.1450 Any help including, but not limited to sending packets would be appreciated. I am not entirely sure in the end how to update the NBT tag on the server side to have the info the local player just stored on it either... I am sure I could figure that out eventually though. I apologize in advance, I am new here so if this post crosses any posting guidelines that I am unaware of just message me and I will change the post as directed or remove it. Thank you very much - Ne0n
×
×
  • Create New...

Important Information

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