Jump to content

GameSlayar

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by GameSlayar

  1. The problem with this is - I don't know whether I should feel guilty etc., since I'm basically copying Crayfish's code. It seems well written, and I couldn't have done it better myself. In terms of the modder community, would it be bad to copy a class or fragments of code from a class?
  2. Okay, so maybe I'm just being a complete derp, but I'd like to add a tooltip to my block: @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { tooltip.add("§oIs §othat.. §ocoal §odust?"); } And I can't override this method because it belongs to #Item and my class is currently extending #Block . Do I have to create a special class in [mod].items and somehow use that?
  3. I was afraid of that. -le sigh- I'll try to make it, and I'll put my results back here - whether I'm successful or not.
  4. Okay - so I would have an intro of how I tried to make a sittable block but I got nothing. Could someone please guide me into making something like this - for a chair, for example.
  5. Awesome - thanks again for your help
  6. Last request. Promise. I'm now stuck on the World#setBlockState bit, simply because I don't know what to put for the state argument. worldIn.setBlockState(pos, /* I have no idea what goes here */); Should I have named the states in #getStateFromMeta ? Could you check through, maybe give me a hint as to what I'm doing wrong? @Override public IBlockState getStateFromMeta(int meta) { return getDefaultState().withProperty(LIT, meta == 0 ? false : true); } EDIT: Is this okay? worldIn.setBlockState(pos, getStateFromMeta(0)); DOUBLE EDIT: Awesome, everything works - thanks!
  7. Thanks, my code has been corrected! Ah, and were you able to simplify this for me?
  8. PS - EDIT: I think I've got it. Is this how it works? @Override public int getMetaFromState(IBlockState state) { Boolean type = (Boolean) state.getValue(LIT); if(type) { return(1); } else { return(0); } }
  9. Thank you, but while your reply is probably well explained to most people, I can't help but have a little trouble understanding. In short, your last bullet point confuses me. Would you mind explaining it in terms a less skilled modder would understand? PS - In this method I'm confused about what I'm supposed to return exactly. @Override public int getMetaFromState(IBlockState state) { Boolean type = (Boolean) state.getValue(LIT); return type //Not sure how to return the metadata here } PPS - Sorry to be a pain in the ass
  10. Well, here's my code for my block. It seems (as usual) that I forgot to put @Override before the method. But now it seems to work. Almost. Now the problem is that whenever I try to right click the block, it triggers #onBlockActivated twice. I end up with something like this in the console: //Me trying to right-click the block true false //Trying to click again true false Anyways, here's the actual block code:
  11. In short, I want to create a campfire block that can be lit and extinguished by right clicking. I wasn't sure how to use #onBlockActivated since I couldn't actually right click the block in-game. So I assumed that to be right-clicked, a block must be/have a TileEntity . I hope I'm right in that regard. If not, please correct me.
  12. Forgive me if this isn't the right place to post this, but.. Can anyone teach me or point me towards a good tutorial for making TileEntities ? All of my Googling has proven fruitless and I want to play around with making said TileEntites .
  13. Aha! I was missing IBlockState state, ! Thanks so much, I was stressing so much over those silly particles EDIT: For anyone else having a similar problem, the code should have been:
  14. I remember creating a bit of code before that worked for my campfire block - I tried to recreate that code from memory and it seems to not work. Am I missing something? PS - The console shows no sign of the [i]System.out[/i] messages I put in, it's like randomDisplayTick isn't being run at all
  15. Nevermind, I figured out how without making drastic changes. Instead of rotating the blocks a bit, I moved some of them by 0.1 on some axes, to make sure none of them were on the same plane. Thanks for the suggestions though
  16. The thing with that is, I only have a choice of rotating by -45, -22.5, 0, 22.5, 45 Those are my only options for rotation, otherwise the block becomes unmodeled (pink and black checkerboard) If I did have more options, I would change all the laying-down logs to have a rotation of 1 each, but I can't
  17. I tried looking up some posts on z-fighting, but it proved unsuccessful. Could you perhaps tell me how I could solve this issue? I don't know how to make this model look like a campfire without the model blocks crossing over
  18. So, moving from one problem to the next, I found out that my custom campfire model had a few glitches where the logs crossed over each other. The textures would keep clipping through each other, making the entire thing look buggy. Hopefully someone can help?
  19. Because I'm kinda new to modelling in MC, could you tell me how I would override Block#isOpaqueCube ? Would it be in any of the .JSON files or somewhere in the code itself? EDIT: Actually, I figured it out. It was in the code, under the block class. Thanks for your help! //For rendering of block underneath @Override public boolean isOpaqueCube() { return false; } //For correct lighting around the block @Override public boolean isFullCube() { return false; }
  20. So, I was playing around with models and it occured to me that making normal blocks was easy, so I decided to make a custom model. My problem is that the ground underneath the model is transparent, and I don't know why..?
×
×
  • Create New...

Important Information

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