Jump to content

Yagoki

Members
  • Posts

    290
  • Joined

  • Last visited

Everything posted by Yagoki

  1. Thanks for the swift reply, I tested this against the achievements GUI and you can reach a point where there are no achievements shown, it was one of my thoughts before I posted here. as for the change form 0 to 26, the 26 us just the horizontal UV coordinate of the texture which is the texture corresponding to the "pointy" achievement icon: Tested it like that anyway, to see if there was any java oddness going on, but no fix. Any other ideas before i spend the next week trying to find a different way to make the code?
  2. you didn't add this to your ItemArmor class @Override public ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int armorSlot) { return null; }
  3. If it helps I do the same thing here if you want to reference something: https://github.com/Yagoki/MTech/blob/master/MTech/mtech/tileentity/TileEntityProximityDetector.java the description packet is sent from server to client by world.markBlockForUpdate(x,y,z)
  4. OK guys, once more I need help.. Been working on this for a couple of days and I'm a bit stuck with a couple of bugs that I cant tell the source of. When rendering the GUI for my alter structure There are two major bugs which I've come across. 1) There is always one element which does not render properly, from testing this normally seems to be the one which is first in the list. If this element is then moved off the screen the closest visible element to that side of the screen then renders in the same way, and so on: 2)If there are no elements being rendered on the GUI the whole GUI renders white The code for the GUI is here, it's mostly a ripoff of the achievements GUI, as I didn't want to go through the hassle of rewriting it for the same effect, so copied it, analysed it and played with it till I got to this point. Left my comments in, just to say what each part does, but if I got anything wrong please correct me, I'm still not very comfortable around lwjgl.
  5. Glad you got all that working and that I could help I'm not quite sure what the issue you're mentioning is, That has never given me a problem, and is just there to round the number to the nearest tenth. If you could clarify that would be really useful.
  6. I would suggest that you guys look through the code for modular powersuits, This adds an armor model so you should be able to find the relevant info there. You should have been able to find most of this looking through vanilla minecraft, In the Item class there is this method @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int armorSlot) { return null; } This should hint to you that you need to make a model which extends model biped, then after a bit of messing around and looking at how vanilla handles its armor figured out how to make yours work. [EDIT] also just left your post and saw this hopefully that helps
  7. haha, no. The proximity detector and such all work fine. The things that aren't working are still WIP and i'm making good progress with (multiblock structure, node based network system with over complicated gui and mechanics) Feel free ti use any of my stuff, There is a link to my mod download below and I leave all my source code open to the public on github as I prefer things to be open source as it benefits the community better. I was having trouble getting my mod to work on a server, but it could be my friend not installing it properly to the server so let me know if you get it working (He was getting a null pointer every time he tried to get a block from creative)
  8. really... you can't think of any vanilla block which does this... none at all... hmm... if only there was a block which looked different on the sides so that you could copy the code from it... maybe a furnace or pumpkin or something... damn, if only minecraft had things like that. If only other people had asked this
  9. I know how to do this with a gui, kinda the only thing which is working in my mod at the moment packetHandler guiHandler Proximity detector, emits redstone when entitys are nearby tileEntity gui radial field, repels/attracts nearby entitys tileEntity gui the important part in the gui is the action performed method, this sends the information about the button pressed to the server (via a packet), which then updates the client via world.markBlockForUpdate in the packetHandler If you don't understand something just say
  10. you tried it without the version bounds? I don't use them and i get no problems also why try to limit it to a version of minecraft like that, there's no need. If it doesn't work on that version then it will crash and they can just un-install it
  11. Whoa! this guy want's to get real crazy with his textures how about a furnace: public Icon getIcon(int par1, int par2) { return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != par2 ? this.blockIcon : this.furnaceIconFront)); } the metadata on the furnace is its rotation
  12. I think most of your code should be fine, I'm just thinking something like this in your command code public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) { if (par2ArrayOfStr.length >= 2) { try { int blockHitX = 0; int blockHitY = 0; int blockHitZ = 0; int blockHitSide = 0; if((Minecraft.getMinecraft().renderViewEntity.rayTrace(200, 1.0F) != null)){ blockHitX = Minecraft.getMinecraft().renderViewEntity.rayTrace(200, 1.0F).blockX; blockHitY = Minecraft.getMinecraft().renderViewEntity.rayTrace(200, 1.0F).blockY; blockHitZ = Minecraft.getMinecraft().renderViewEntity.rayTrace(200, 1.0F).blockZ; blockHitSide = Minecraft.getMinecraft().renderViewEntity.rayTrace(200, 1.0F).sideHit; } TriggerTileEntity test2 = (TriggerTileEntity) Minecraft.getMinecraft().theWorld.getBlockTileEntity(blockHitX, blockHitY, blockHitZ); test2.track = par2ArrayOfStr[0]; test2.radius = Integer.parseInt(par2ArrayOfStr[1]); par1ICommandSender.sendChatToPlayer("Sucess !" + test2.radius + "|" + test2.track); Minecraft.getMinecraft().theWorld.markBlockForUpdate(blockHitX, blockHitY, blockHitZ); //ADD THIS LINE TO YOUR CODE, REMEMBER TO ADD THE DATA PACKET STUFF TO THE TILE } catch(Exception e) { e.printStackTrace(); par1ICommandSender.sendChatToPlayer("A Problem occured !"); } } }
  13. Your problem, I think, is that the server side has different info to the client side. Update entity is a method called by the client and server on each game tick, you don't want to be using this to update the fields within your tile entity as it will slow down the system (your passing lots of info every tick, which is never good). There are the following methods you can put into your tile entity, which will get called by the server every time you call "world.markBlockForUpdate(x,y,z);" and will send a packet from the server tile entity to the equivalent client tile entity. (also better as you don't need packet handling). just put this in your tile entity. @Override public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { NBTTagCompound tag = pkt.customParam1; this.readFromNBT(tag); } @Override public Packet getDescriptionPacket() { NBTTagCompound tag = new NBTTagCompound(); this.writeToNBT(tag); return new Packet132TileEntityData(xCoord, yCoord, zCoord, 0, tag); } (NOTE, you need to put these into your tile entity, by default they are empty) again just to clarify, this will read the info about the server tile entity then send the info the the client tile entity. Again I'll clarify, to use this set the info on the tile using your command, make sure that this is happening on the server side (world.isRemote = false), then call world.markBlockForUpdate(x,y,z) and that will handle the info
  14. no apparently the server config is identical also it's beyond the point where i can tweak things in that release without removing loads of code, so I think i'll just leave it for now. Thanks anyway. Also there are hard coded id's (the default ids increment from 700)
  15. Yeah, I thought it was a server client disparity, wasn't too sure. As for forge we were using the latest available version. I will double check that my friend installed it properly on the server, but still a bit confused by it. I think the packet handling is vanilla, not something I've caused (as far as I can tell). I think it was because the server can't find a block/item at that ID to send to the client (client requests it from inventory then server sends as packet) Still not sure what caused it but I will bug him when he's next online
  16. Just started a test server with a friend, put my mod on it and there's a problem with the blocks and items, namely they aren't recognized by the server. Trying to pull them from the creative tabs caused the player to be booted (with this error showing on the server), Trying the "/give" command returned "no such item". I'm assuming that this is because they haven't been created on the server, or something, soooo... Help plz (all code on github, link in signature, if you need directing to any specific classes which you can't find, just ask) Thanks in advance.
  17. http://www.minecraftforum.net/topic/982336-tutorial-147-nbttagcompound-using-itemstacks-stacktagcompound-for-permanent-extra-data-storage/ That should help to explain, My suggestion was that you create an int field and increment it every so often, then shoot when it reaches a set value and reset the value.
  18. Try to solve it yourself logically then. Split the line which is causing the error across several lines, this being java you can just hit enter between the parameters and it should work. This will tell you what is causing the error more precisely as each part will have a different line number and then you can track it down better.
  19. Create a counter in the NBT data and add one onto it each tick (using onUpdate), then do if(counter >= 4) //4 game ticks = 0.2 seconds { //shoot counter=0; } else counter++;
  20. Taking a stab in the dark, I'm going to say that this might not work, Also new ItemStack(YourModItemsClass.iredantcrystal) is valid and is probably better to use. Also it is likely that ItemIds.IREDANTCRYSTAL will be itemID - 256 (because of shifted index and stuff), so lookup will fail, can't say for certain as this code isn't given Again i'm going to re-state my thought that it is the item not being initialized at this point, i.e. if you haven't called ModItems.init() or whatever you called it the variables will be null, hence the null pointer, Also this is thrown using the Id as this is used to look up the item from an array of all the items, where it will be unable to find an item with your itemID. Try calling this method later than you already are (so like this): @Init public static void init(FMLInitializationEvent evt) { ModBlocks.init(); ModItems.init(); ModBlocks.initBlockRecipies(); }
  21. ItemIds.ITEMIREDANTCRYSTAL, Is the item for this initialized?
  22. My guess would be that you're not passing it a fully initialized entity, could you put the code on here, so that we can see all the line numbers and syntax highlighting etc...
  23. Fuck didn't mean to press thankyou! was trying to get the quote button!!! If you (ThauxCraft) had any sense you would quickly realize that "Pentachron Labs" is not a serious business attempt, but a name for his dev-team. Also if you thought he was trying to make money from modding, or if you even thought that modding was a way to make any decent amount of money you are massively incorrect. Modding is allowed for by Mojang, but not the sale of mods, which would be an infringement of their copyrights (you can find all this on the Minecraft website). Also lets assume that he is a corporate CEO trying to steal your code. Do you really think that he would a) try to do this through a SUPPORT forums, on which he has a superb track record for helping people out, and b) make all his projects opensource? Also why would a corporate giant like "Pentachoron labs" even waste their time on support forums when they could be working on their own code making it better so they get more people to downloads and ergo more money? Your argument for not giving away your source is valid, it's your property to distribute, but refusing to give away a broken jar, then asking for advice on how to fix it is just stupid. Who the Fuck put the thank you button next to the quote button!!
  24. then surround world.setBlock( i + x, // this makes blocks of air go out however many numOfBlocksOnXAxis was j - y, // this makes blocks of air go out however many numOfBlocksOnYAxis was k + z, // this makes blocks of air go out however many numOfBlocksOnZAxis was 00 // the block of air ); with if(world.getBlockId(i+x, j-y, k+z) == Block.stone.blockId)//or whatever blockId you want
×
×
  • Create New...

Important Information

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