Jump to content

AFlyingGrayson

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by AFlyingGrayson

  1. That depends, what do you want to change it to? Your own custom model? A different one that already exists? What are you trying to accomplish?
  2. Yeah, that fixed the problem that I had been having, I still don't have it right, but I'll get it eventually, thanks for your help.
  3. This is a really good tutorial sirgingalot, just one thing that I'm having trouble with(this is a bit over my head, I had just figured out the old packet system) I attempted to send the packet, but I'm 95% sure that I'm doing it incorrectly, and I am probably way off, as well as probably incorrect about how to read/write variables in the packet itself. So if I could get some help, that would be awesome. Packet: When I send it:
  4. Attempting to update my mod, wondering if anyone has figured out the mappings for getTagList in NBTTagCompound or tagAt in NBTTagList, or if there is a new way of accomplishing the same thing.
  5. To be honest I was going off techne, I figured decimals weren't allowed in the argument, oh well
  6. Yeah but this way has a minimum value now, for instance: public class ChemRack extends Block { public ChemRack (int id, Material material) { super(id, material); } @Override public void onBlockAdded(World world, int x, int y, int z) { world.scheduleBlockUpdate(x, y, z, this.blockID, this.tickRate(world)); } @Override public int tickRate(World par1World) { Random random = new Random(); return 4000+random.nextInt(2000); } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { par1World.setBlock(par2, par3, par4, Block.dirt.blockID); } } has a minimum tick value of 4000, and a maximum of 6000, you can adjust to what you'd like. I was under the assumption that the tick value of 6000 worked fine, and adding the random integer made it go haywire, which is why I had you try the other way. this is much more reliable.
  7. is your block class extending Block? This code is working perfect for me: public class ExampleBlock extends Block { public ExampleBlock (int id, Material material) { super(id, material); } @Override public void onBlockAdded(World world, int x, int y, int z) { world.scheduleBlockUpdate(x, y, z, this.blockID, this.tickRate(world)); } @Override public int tickRate(World par1World) { return 6000; } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { par1World.setBlock(par2, par3, par4, Block.dirt.blockID); } }
  8. Although it's extremely unlikely, it is possible, if you want an absolute minimum value you should try the scheduled ticks again. add an @Override annotation above the tick rate, and see if that does anything.
  9. Just change the value of 50 to way lower, every number will give you on average 47 seconds, so setting 5 instead of 50 will change the block in roughly 4 minutes, but it could be way less or way more than that, depending on when the random ticks get assigned to the blocks. I'm pretty tired, don't know why I put 50 there, that would take something like an hour to change.
  10. //declare this: public int tickcount //in the constructor: this.setTickRandomly(true); //and then add: public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if(tickcount < 50) //Or a different value, you'll have to play around with it. { tickcount++ } else{ par1World.setBlock(par2, par3, par4, Mod.Block.blockID); } } That should be a lot more random than you have, still not sure if it's what you're looking for. It's essentially the same as the code that farmland uses to decide if it is going to go back to being dirt, but with a counter in order to make it last longer.
  11. I believe that every time you are placing a block, it is updating the tick rate for every block of that id in the world, which is why they are all the same, I could be wrong, but that's what it looks like to me, i'm thinking about how it could be fixed.
  12. where is this code at? is it individual for each block?
  13. Yeah I didn't look very closely at your full code, sorry about that. You are changing the block into a different block that doesn't update back or anything, just stays, correct?
  14. public int tickRate(World par1World, Random random) { return 6000 + random.nextInt(100); } You want something like that?
  15. Make sure that the same capitalization is used in both cases, the code and folder path. It's case sensitive, and I know I accidentally have messed it up before, it could be something else but it never hurts to check.
  16. So basically, I'd like to make my armor render the same size as the player model, to create the effect of actual clothing instead of the "puffed out" armor, and I achieved this by basically making the armor render as an EntityBiped. However the player's actual model pokes through this, so I was wondering if it was possible to stop the render of only specific body parts, seeing as I can't turn the entire player invisible, or that would look pretty weird with only one piece of the armor on. I could easily add this by editing RenderPlayer, but I would rather not.
  17. Because that isn't the complete method, but that's unrelated to the topic.
  18. Which is working in something like an item, but does absolutely nothing here. https://gist.github.com/anonymous/8bc0bcd4cace491ac452
  19. So basically, I want to make it so that when my keybinding is pressed, the player punches, without overriding the default punch on left click, but I've been searching the code and can't find where the action is referenced at all, any help is appreciated.
  20. Duh, it was my bad, zipping up the folder was making another folder inside of it, so the directory was wrong, thanks for making me double check lol
  21. Alright so this worked before, I changed a few things in the code and recompiled it, and now it's having problems finding my main class or something? this is the crash log, any help would be appreciated, let me know if you need any code.
  22. Nothing, it was my bad, I was using it incorrectly, sorry for the trouble.
  23. Is there a better way to do a check if the player is on the ground? .onGround doesn't seem to be working very well.
×
×
  • Create New...

Important Information

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