Jump to content

joaopms

Members
  • Posts

    36
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Developer Apprentice

joaopms's Achievements

Tree Puncher

Tree Puncher (2/8)

5

Reputation

  1. Try something like this (didn't tested it): @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { if (entity instanceof EntityPlayer) { ((EntityPlayer) entity).addPotionEffect(new PotionEffect(yourArgumentsHere)); } }
  2. I have a block and I need to color it based on the biome he is in, like a block of grass. I'm currently using the grass' methods, but it colors all sides.
  3. Yes, yes it is! Thank you very much!
  4. I have a block that set's it's textures when someone right clicks it with a block on theur wand. I'm saving it's ID and metadata to the block's tile entity's NBT data. Now I need a way to get a block's metadata and sided textures. I'm already doing it using "getBlockTexture" and "Block.blocksList[tile.blockCamouflageID].getBlockTexture(block, x, y, z, side);", but now, how can I do it with metadata? Thank you!
  5. That worked! Thank you very much!
  6. I have a block that let's you change it's texture by right clicking it with a block in your wand. I'm saving a boolean called "isPersonalized" (if the block was a custom texture, then is true) and an integer called "blockCamouflageID" (if the block was a custum texture, then is the block's ID you chosed) on the block's tile entity's NBT data. Everything is getting saved, but when I call the tile entity and get the data from it, on my "getBlockTexture()" method, it returns "false" for the "isPersonalized" variable and "0" for the "blockCamouflageID" variable (I'm invoking the entity using "TileEntityIluminator tile = (TileEntityIluminator) world.getBlockTileEntity(x, y, z)" and getting the variables by using "tile.isPersonalized" and "tile.blockCamouflageID"). Now, if I output the "this.isPersonalized" and "this.blockCamouflageID" from the tile entity's "readFromNBT()" method, it is correct. Resuming: it is correct on the tile entity but not on the block. I'm not sure if I need to use a packet, they are confusing to me.
  7. First of all, what are you trying to do? Second, what is at the line 68 at BetterMinecraftMod.java?
  8. Wow, I'm so stupid! -.- Thank you very much, you just saved me from a huge rage.
  9. Eval() is evil. Do not use. So, do you have any idea on what I can do?
  10. Yes I know, it returns an Icon. And I want to like build a string and the run the string like it was an argument.
  11. Yes, but I want to use the "tile.blockName" like I'm building a string, so it should be like this (I know this isn't going to work): Block. + tile.blockName + .getBlockTextureFromSide(0); I don't know if it is possible, but still.
  12. Look at GuiSelectWorld.java, it may help you
  13. On my onBlockActivated I have this method to have access to my tile entity: TileEntityIluminator tile = (TileEntityIluminator) world.getBlockTileEntity(x, y, z); Then I have a string variable on my tile entity called blockName. I can read/write to it by doing "tile.blockName = "[blockName]". Now I want to replace the "stone" part with my variable, "tile.blockName".
  14. I'm trying to get a texture from a block when you right click my block with a block in your wand. That works and it is writing the block name to my block's Tile Entity's NBT Data. Now I want to get the texture from the block from the NBT Data, and for that I'm using this piece of code: Block.blocksList[stone.itemID].getBlockTextureFromSide(0); Now I want to replace the "stone" with the block name from my NBT Data. Is that possible? Is there a easiest way to do it? Thanks!
  15. Since Mac OS is based on Linux, it should be "bash install.sh" or "sh install.sh"
×
×
  • Create New...

Important Information

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