Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/05/17 in all areas

  1. It doesn't exist any more. Loot is now handled by LootTables and json definitions.
    1 point
  2. That class is completely unrelated to your situation. It handles remapping old Block/Item registry names to new ones when they change.
    1 point
  3. As Draco said, you need to use reflection to access the field. PlayerInteractionManager#durabilityRemainingOnBlock is a non-static field, so it needs to be accessed from an instance rather than the class. This is a basic Java concept. Each player's PlayerInteractionManager instance is stored in the EntityPlayerMP#interactionManager field. Every EntityPlayer on the logical server (when World#isRemote is false) is an instance of EntityPlayerMP.
    1 point
  4. If you look at the usages of World#sendBlockBreakProgress, you'll see that it's called from various places within PlayerInteractionManager; this is the server-side class that manages block interactions (e.g. breaking) for the player that the instance is attached to. When the player is in the process of breaking a block, PlayerInteractionManager#durabilityRemainingOnBlock stores the current break progress; this is passed to World#sendBlockBreakProgress whenever it changes.
    1 point
  5. Well I opened an issue... https://github.com/MinecraftForge/MinecraftForge/issues/3821
    1 point
  6. If you look at GuiNewChat#drawChat (which renders the recent chat messages), you'll see that it renders each line by calling ITextComponent#getFormattedText to get the text with formatting codes and then FontRenderer#drawStringWithShadow to render the text. FontRenderer is responsible for interpreting the formatting codes and rendering each character with the appropriate colour and style. The vanilla FontRenderer only supports the colours and styles of the TextFormatting enum, you'd need to implement custom colours yourself.
    1 point
  7. Forge's documentation has a page on events here.
    1 point
  8. The method is only called on the Item that the player is holding. This is a general principle in Minecraft: methods of classes like Item and Block are only called on the object involved in the interaction (e.g. breaking a block calls a method on the Block that was broken and the Item being held by the player that broke it). To change the behaviour of Blocks and Items added by Minecraft and other mods, you need to use events.
    1 point
  9. Item#onBlockDestroyed is called when a player destroys a block while holding an ItemStack of the Item in their main hand (regardless of what that Item is). The ItemStack argument is the ItemStack in the player's main hand. It's not called in creative mode.
    1 point
  10. Why are we even calling cascading chunk loading a problem, when vanilla just lets it happen?
    1 point
  11. I found how to use specific potions in recipes. I used TheMasterGabriel's method, by using PotionUtils. Example code for future googlers: new PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING));
    1 point
×
×
  • Create New...

Important Information

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