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.

Leaderboard

Popular Content

Showing content with the highest reputation on 09/21/20 in all areas

  1. Your code prints both "Hey" and "Hey 2" because after you print "Hey", count is increased and also the second statement is true. For what you want to do you can try with something like this: private String[] array = {"Hey", "Hey 2"}; private int count = 0; @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) { if (!worldIn.isRemote()) { playerIn.sendMessage(new StringTextComponent(array[count])); count++; return new ActionResult<>(ActionResultType.SUCCESS, playerIn.getHeldItem(handIn)); } return new ActionResult<>(ActionResultType.SUCCESS, playerIn.getHeldItem(handIn)); } If you want to make it loop between the Strings you can use an if statement to reset count.
  2. Well, i already told you but i try to explain better. The image you were trying to render on the screen has dimension 256x256, but with this line: minecraft.ingameGUI.blit(posX, posY, 0, 0, 32, 32); you cut only a 32x32 portion from the original image, starting from the upper left corner (x: 0, y: 0), and as a result you only render on the screen that little portion of the image.
  3. Well, actually there is nothing wrong with your code, in the sense that it does exactly what you told it to do...and so it just draws a 32x32 portion of the icons texture at screen position 16-16. But it seems you actually need to render only text right? So you need to use the FontRenderer, and possibly it's drawString method
  4. Old versions of forge are available at sourceforge: https://sourceforge.net/projects/minecraftforge/files/ I think 1.0.0-1.0.6 are for beta 1.7.3

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.