Posted October 23, 201411 yr Goods days bad english advertisment im doing a mod and ineed to know what block is in certain point in the space (x,y,z) soo example i need to know if the block a just put is two spaces over a block of wood, google tell mi about this method world.getBlockId() but i dont find it in eclipse 1.7.10. soo this method is wrong, has a change name is ths version o r was replaced by something else there is a pice of mi code ################################################### public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_){ System.out.println("se ejecuto onBlockActivated"); int x1=x; int y1=y-2; int z1=z; int blockID = world.getBlockId(x1,y1,z1); //.getBlockId(x, y, z); /* //piece of the code from google if(blockID != 0) //air has no block representation { Block.blocksList[blockID].translateBlockName(); }//84 80 269 */ return true; } is this deprecated or is just malformed ??
October 23, 201411 yr There are no id's in 1.7+ use world.getBlock(x,y,z); to get the block at the given coardinates. Block block = world.getBlock(x1,y1,z1); if (block != Blocks.air) { //not sure what your trying to do here } [code] I am the author of Draconic Evolution
October 23, 201411 yr Author its something. iwass figthing whit miself and then i find the answer the answer is converthe block to string System.out.println("onNeighborBlockChange"); int x=84, y=80, z=269; if (world.getBlock(x, y, z) == Blocks.water ){ System.out.println("es agua lo que hay en el blocke"); }else{ System.out.println("no se que sera este blocke"); } String sb= world.getBlock(x, y, z).toString(); System.out.println("String sb= "+sb); ]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:52]: onNeighborBlockChange [12:55:58] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:59]: es agua lo que hay en el blocke [12:55:58] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:64]: String SB= net.minecraft.block.BlockStaticLiquid@6e4a6525 [12:56:35] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:52]: onNeighborBlockChange [12:56:35] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:61]: no se que sera este blocke [12:56:35] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:64]: String SB= mercenary00.mercenarymod.blocks.mercenaryBlock@161020ce [12:56:59] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:52]: onNeighborBlockChange [12:56:59] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:61]: no se que sera este blocke [12:56:59] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:64]: String SB= net.minecraft.block.BlockStainedGlass@26ddc9d4 [12:56:59] [server thread/INFO] [sTDOUT]: [mercenary00.mercenarymod.blocks.mercenaryBlock:onNeighborBlockChange:52]: onNeighborBlockChange i have a question more about of method but thats another treath very gratefull
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.