Posted May 2, 20169 yr How can I disable the block outline for a block if the player isn't in creative? Also, how can I eliminate the block particle effects when my block is being clicked (It is unbreakable) without changing it's texture?
May 3, 20169 yr Author Thanks! Really helped! Now how can I give it a texture only if the player is in creative?
May 3, 20169 yr IIRC, shouldSideBeRendered is a client-side only method (that is, the vanilla method is marked @SideOnly(CLIENT)) which means you will be able to access Minecraft.getMinecraft() in order to retrieve a reference for the client-side player and check for creative status. 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.
May 3, 20169 yr Author Thanks for being so quick Draco! @Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if(Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode){ return true; } return false; } Like that? Because the texture updates only when a block near it is destroyed.
May 3, 20169 yr I'm not sure how to make the rendering update just because the player changed survival/creative off-hand, not without using a TileEntity and a TESR. You could try looking at--wait, nevermind. The barrier block was added in 1.8 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.
May 4, 20169 yr I'm not sure how to make the rendering update just because the player changed survival/creative off-hand, not without using a TileEntity and a TESR. You could try looking at--wait, nevermind. The barrier block was added in 1.8 The Barrier block spawns particles when you are in creative mode. May not be what he is after.
May 4, 20169 yr Ah, darn again. The other option is to write a custom ISimpleBlockRenderingHandler...which might run into the same issue. Hmm. 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.
May 4, 20169 yr Author I'd rather have a block texture instead of a particle, I find the barrier particle a little hard to see... I've come up with a workaround, but it wouldn't be the same as what we're trying to accomplish here. My workaround is to replace the block with a different block if right clicked in creative with an item I make, and then make another item that reverses this. But, for now ignore my workaround, I'd like to do this a different way. Edit: Is there a client event for when the player switches gamemodes?
May 5, 20169 yr Author So here's an update on my progress... I've finished my workaround, and the tool that changes the block from visible to invisible has two modes, precision and 3 by 3 by 3. Precision changes one block at a time, 3 by 3 by 3 does what you think it does (Changes 3 by 3 by 3 area). The tool can only be used in creative.
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.