-
[1.8] Sittable/mountable blocks?
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?
-
[1.8] Using Item methods on blocks?
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?
-
[1.8] Sittable/mountable blocks?
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.
-
[1.8] Sittable/mountable blocks?
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.
-
[1.8] [SOLVED] Help with right-clickable blocks
Awesome - thanks again for your help
-
[1.8] [SOLVED] Help with right-clickable blocks
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!
-
[1.8] [SOLVED] Help with right-clickable blocks
Thanks, my code has been corrected! Ah, and were you able to simplify this for me?
-
[1.8] [SOLVED] Help with right-clickable blocks
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); } }
-
[1.8] [SOLVED] Help with right-clickable blocks
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
-
[1.8] [SOLVED] Help with right-clickable blocks
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:
-
[1.8] [SOLVED] Help with right-clickable blocks
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.
-
[1.8] [SOLVED] Help with right-clickable blocks
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 .
-
[1.8] [SOLVED] Particles not appearing?
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:
-
[1.8] [SOLVED] Particles not appearing?
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
-
[1.8] [SOLVED] Model glitching/clipping
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
IPS spam blocked by CleanTalk.