Posted July 15, 20178 yr I want to be able to bind a microphone to a box, then use it on a stand which has a tile entity which stores the boxes position. I can't seem to bind it to the box, though, since it always says "You have no source bound to the microphone". Microphone Stand I want to place the mic on Edited July 15, 20178 yr by That_Martin_Guy
July 15, 20178 yr Let me see if I read this correctly: ItemNBTHelper.getBlockPos(usedMicrophone, "BoxPos").equals(BlockPos.ORIGIN) If the microphone is brand new, then its BoxPos will be the origin, yes? Ok, so I go to link it, I get the current linkage, it is to the ORIGIN, that returns (!(origin)) which is false, and I dump into the else statement: player.sendMessage(new TextComponentString("You have no source bound to the microphone")); Edited July 15, 20178 yr by Draco18s 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.
July 15, 20178 yr 1 hour ago, That_Martin_Guy said: I want to be able to bind a microphone to a box, then use it on a stand which has a tile entity which stores the boxes position. I can't seem to bind it to the box, though, since it always says "You have no source bound to the microphone". Microphone Stand I want to place the mic on ItemNBTHelper.getBlockPos(usedMicrophone, "BoxPos") Will always return BlockPos.ORIGIN because when you call ItemNBTHelper.setBlockPos it doesn't set a tag with the key you send it, and if you look at ItemNBTHelper.getBlockPos it checks for that key. Also Draco is right what if they wanted to put it at the ORIGIN? Edited July 15, 20178 yr by Animefan8888 VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Just now, diesieben07 said: I don't think you can place a block at 0,0,0. Or maybe you can, but it's not very useful. It depends on what the box does exactly. This could be used for building a map. Then again I don't know exactly what this box will do. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Author 5 minutes ago, Animefan8888 said: it doesn't set a tag with the key you send it Why wouldn't it? It appends X, Y and Z depending on the coordinate to the key in both the setter and getter.
July 15, 20178 yr Just now, That_Martin_Guy said: Why wouldn't it? It appends X, Y and Z depending on the coordinate to the key in both the setter and getter. This line. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Change this to return itemStack.getTagCompound(); VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Author Why would that make a difference? That instance is the same as the itemstacks instance. EDIT: It doesn't make a difference as far as I can tell, either. Edited July 15, 20178 yr by That_Martin_Guy
July 15, 20178 yr 16 minutes ago, diesieben07 said: I don't think you can place a block at 0,0,0. Or maybe you can, but it's not very useful. 0,0,0 should be bedrock in the overworld, the nether, and similar dimensions. For other dimensions (without a bedrock floor) it's possible although unlikely to be able to place a block there. 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.
July 15, 20178 yr 2 minutes ago, That_Martin_Guy said: Why would that make a difference? That instance is the same as the itemstacks instance. I was taking a shot in the dark...where are you appending that "X" at? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Author Just now, Animefan8888 said: I was taking a shot in the dark...where are you appending that "X" at? 13 minutes ago, That_Martin_Guy said: Appending X to the key in the if statement doesn't seem to change anything.
July 15, 20178 yr 3 minutes ago, That_Martin_Guy said: Appending X to the key in the if statement doesn't seem to change anything. Sorry I miss the small details a lot, have you tried stepping through it with the debugger because it is not popping out at me. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Author I think I have found the problem, or atleast something related to the problem. onItemUse isn't called when right clicked on a quiz box. Say, what does the return of onBlockActivated do?
July 15, 20178 yr 10 minutes ago, That_Martin_Guy said: I think I have found the problem, or atleast something related to the problem. onItemUse isn't called when right clicked on a quiz box. Say, what does the return of onBlockActivated do? If it returns true it believes you did something and the onItemRighClick/onItemUse shouldn't be called. Edit: It also tells the client to play the animation of the player moving their hand when true is returned. Edited July 15, 20178 yr by Animefan8888 VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 15, 20178 yr Author Ah, there is the problem! I had made BlockQuizBox return true on onBlockActivated if it had a tile entity in it, which it should always have. Therefore it made it not call onItemRightClick, which in turn made it not bind the microphone to the block. Thank you!
July 15, 20178 yr Just now, That_Martin_Guy said: Thank you! No problem. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.