Posted June 19, 201312 yr Could I make an entity that either powers the block it's on or the block underneath it with a red stone signal? I know that computercraft turtles can emit redstone signals and I'm pretty sure they are entities.
June 19, 201312 yr Computer craft turtles are entities only when moving. When still they are a block + tile entity, which can emit signals. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
June 19, 201312 yr Author Alright. Well currently the way I'm doing it is adding a transparent non-solid block to the world wherever I want the entity to emit a red stone signal. However it still has the black line around it when I hover my mouse over it and it still acts like a block. Is there a way to make it behave like air so players don't have to break it before placing another block and don't have to see the black border? Also what would be the onupdate for blocks? I'd like it to disappear it to air after x amount of ticks. edit: I got the border to disappear with. public MovingObjectPosition collisionRayTrace(World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3) { float f = 0.15F; this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F); return super.collisionRayTrace(par1World, par2, par3, par4, par5Vec3, par6Vec3); } However I'm not sure this is the best way to do it because now there is no way to break it...
June 19, 201312 yr Alright. Well currently the way I'm doing it is adding a transparent non-solid block to the world wherever I want the entity to emit a red stone signal. However it still has the black line around it when I hover my mouse over it and it still acts like a block. Is there a way to make it behave like air so players don't have to break it before placing another block and don't have to see the black border? Also what would be the onupdate for blocks? I'd like it to disappear it to air after x amount of ticks. Black line: public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } Block (re)placement: public boolean isBlockReplaceable(World world, int x, int y, int z) { return true; } On update (you could have found this one yourself by searching Block.java): public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {} Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
June 19, 201312 yr Author I already had the first and the last one, thanks for the isBlockReplaceable though! =D My problem with updateTick though is that it does not update as much as I'd like it, is there a way to speed it up? I have tried tick handlers but I'm not sure how to get the block's coordinates.
June 19, 201312 yr I already had the first and the last one, thanks for the isBlockReplaceable though! =D My problem with updateTick though is that it does not update as much as I'd like it, is there a way to speed it up? I have tried tick handlers but I'm not sure how to get the block's coordinates. Don't use random ticks onBlockAdded(...) { world.scheduleBlockUpdate(x,y,z,how_many_ticks); } Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
June 19, 201312 yr Author Like this? public void onBlockAdded(World par1World, int par2, int par3, int par4) { par1World.scheduleBlockUpdate(par2, par3, par4, 5, 5); } There was an extra parameter I needed to add and I wasn't sure what it did. I set it really small so I could see it happening but it doesn't disappear.
June 19, 201312 yr Like this? public void onBlockAdded(World par1World, int par2, int par3, int par4) { par1World.scheduleBlockUpdate(par2, par3, par4, 5, 5); } There was an extra parameter I needed to add and I wasn't sure what it did. I set it really small so I could see it happening but it doesn't disappear. The extra param is the one after par4, its the block ID of the block making the update call (you can set it to this.blockID). You still need an updateTick(...) function to deal with it. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.