-
change player model
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?
-
[1.7.2]Sending a packet to the server with the new netty system
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.
-
[1.7.2]Sending a packet to the server with the new netty system
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:
-
[1.7.2] NBTTagCompound mappings
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.
-
[1.6.4] Stopping the rendering of certain body parts without editing base class?
To be honest I was going off techne, I figured decimals weren't allowed in the argument, oh well
-
[1.6.4]Random tickRate?
No problem.
-
[1.6.4]Random tickRate?
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.
-
[1.6.4]Random tickRate?
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); } }
-
[1.6.4]Random tickRate?
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.
-
[1.6.4]Random tickRate?
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.
-
[1.6.4]Random tickRate?
//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.
-
[1.6.4]Random tickRate?
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.
-
[1.6.4]Random tickRate?
where is this code at? is it individual for each block?
-
[1.6.4]Random tickRate?
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?
-
[1.6.4]Random tickRate?
public int tickRate(World par1World, Random random) { return 6000 + random.nextInt(100); } You want something like that?
IPS spam blocked by CleanTalk.