Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

This isn't more of a problem, as it is plainly annoying. I am creating a block with a Gui, Container, and all that fancy work. When I right click my block, the container opens just fine. But, when I attempt to right click it with an item in my hand, it doesn't seem to work.

 

#onBlockActivated in my block class:

public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) {
	if(world.isRemote || player.isSneaking()) {
		return false;
	}else {
		FMLNetworkHandler.openGui(player, ModMain.instance, ModMain.GUI_UPGRADE_STATION, world, pos.getX(), pos.getY(), pos.getZ());

		return true;
	}
}

 

If you need any other classes, just ask!

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

I assume you debugged if this method gets called when you right-click with an item? Minecraft might be trying to do something else that pertains to the Item you are holding - something along the lines of the Item's function taking precedence over block activation (which wouldn't make sense since Buttons and Chests work alright). Maybe the error is outside the class?

I do pony stuff :3

  • Author

I'm not sure. It seems when I hold anything in my hand, it won't activate. This has never happened before, so perhaps it is a 1.8 bug?

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

  • Author

Seems like I can activate it with an item in my hand, but not a block. :/

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Check out the ItemBlock class.. I think when you sneak you can't use ItemBlocks to interact with other blocks.

Check out the ItemBlock class.. I think when you sneak you can't use ItemBlocks to interact with other blocks.

 

This. Shift-Click with blocks by vanilla bypasses block activation and places the block.

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.

Check out the ItemBlock class.. I think when you sneak you can't use ItemBlocks to interact with other blocks.

 

This. Shift-Click with blocks by vanilla bypasses block activation and places the block.

 

But... He's not talking about sneaking at all... It happens while he's standing?

I do pony stuff :3

  • Author

It happens while standing. :/ Has this been happening to anyone else?

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

I've recently written some code that was dependent on detecting ItemBlocks being used trying to activate a block. This is not a problem on Forge 1.8-11.14. It's quite possible this is a genuine bug for 1.8.8. You should consider opening an issue on GitHub.

I still haven't published a mod because I can never get that in-dev version just right to warrant a public release. And yes, after two years of mod development I am still learning to speak Java.

 

Follow me on GitHub: https://github.com/yooksi

Contact me on Twitter: https://twitter.com/yooksi

Read my Minecraft blog: https://yooksidoesminecraft.blogspot.de/

  • Author

I opened an issue, although I am still wondering if I am doing anything wrong. I never added a block with a gui in 1.8, only when I updated to 1.8.8. I might try to do the same in 1.8.9, and see if I get the same result.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

  • 2 weeks later...

Can you link the issue on GitHub here?

Might be easier to find out what was the problem like this for the rest of us.

I still haven't published a mod because I can never get that in-dev version just right to warrant a public release. And yes, after two years of mod development I am still learning to speak Java.

 

Follow me on GitHub: https://github.com/yooksi

Contact me on Twitter: https://twitter.com/yooksi

Read my Minecraft blog: https://yooksidoesminecraft.blogspot.de/

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.