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.

wd40bomber7

Members
  • Joined

  • Last visited

  1. Thanks a bunch, I traced it back to the Better PVP mod. The mod stores off the selected item pre-tick, and then restores it post-tick given some conditions. I can detect the mods presence and modify some of its public fields so this doesn't happen.
  2. In this context I mean the item the player has selected on their bar of 9 items at the bottom of their screen. Normally to change the player's item I do something super basic like: EntityPlayerSP p = Minecraft.getMinecraft().thePlayer; p.inventory.currentItem = newCurrentItem; Unfortunately recently this has only worked sometimes. When the player isn't moving at all, and I try to change the player's selected item, it doesn't work. Basically during an onTick event, I'd use the above code to change it to 5 (as an example) and then next tick, it would be back at the previous value. And this happens every single tick. Using a watchpoint on field modification I tracked down the culprit code reverting the value I set: FMLEvents.playerTick(TickEvent$PlayerTickEvent) line: 99 ASMEventHandler_14_FMLEvents_playerTick_PlayerTickEvent.invoke(Event) line: not available ASMEventHandler.invoke(Event) line: 55 EventBus.post(Event) line: 140 FMLCommonHandler.onPlayerPostTick(EntityPlayer) line: 355 EntityOtherPlayerMP(EntityPlayer).func_70071_h_() line:362 EntityOtherPlayerMP.func_70071_h_() line:52 ... The problem is none of the forge code I can find has a class called "FMLEvents" and I have no idea why a playerTick function would be modifying part of the player at all. Anyone know what's going on here?
  3. What is the easiest way to get BlockState from an ID and Data? I *only* have an ID and data value. Both integers. Previously I was doing this: IBlockState bState = (IBlockState) GameData.getBlockStateIDMap().getByValue(minecraftBlockId); Minecraft.getMinecraft().theWorld.setBlockState(loc, bState); Unfortunately GameData.getBlockStateIDMap() came with the following warning: //Internal: DO NOT USE, will change without warning. public static ClearableObjectIntIdentityMap<IBlockState> getBlockStateIDMap() { return BLOCKSTATE_TO_ID; } And of course, true to its word this approach broke in 1.8.9. What is the approach I'm supposed to take? This is driving me nuts. It feels like I want to do something very simple but there's no obvious interface to do it.

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.