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.

Anon10W1z

Forge Modder
  • Joined

  • Last visited

Everything posted by Anon10W1z

  1. Just wondering, why not?
  2. If you use comments and JavaDoc it will look much nicer.
  3. I found this code: @SubscribeEvent public void onEntityUpdate(LivingUpdateEvent event) throws InterruptedException { } But I need to get the current player that is grabbing it ... It would be perfect if i can set a "grabber-id" variable on the entity with which to obtain the player.. or How can i do it? First off, remove that throws declaration, Second, look up data watchers.
  4. I take it one step further and make my event handler final. Then I store the singleton instance of the event handler in itself.
  5. You need to use posSide when getting the block state from the world.
  6. It's good that you have put in effort to learn, and the desire is there. However, for server-side modding, Bukkit plugin development is what you want to look into, not Forge modding. Look up kennethbgoodin Bukkit tutorials on YouTube. They're great for beginners.
  7. http://www.minecraftforge.net/forum/index.php/topic,26403.0.html
  8. That was added in 1.8. EDIT: 1.7.10.
  9. Did you register the inventory block renderer?
  10. The hell? Don't use reflection. Use player.capabilities...
  11. EDIT: Ok this is getting really weird: Apparently my code works 100% correctly. The only problem is that on loading a world where the block is already placed, nothing happens. If I set a new block, it works without any problem. Really strange. Ah, this is because if you add a tile entity to your block, then blocks placed before the tile entity was added will not have the tile entity. Tile entities are only added when the block is placed.
  12. MinecraftServer.getServer().getCommandManager().executeCommand(player, command); Runs a command. Set your block to tick randomly and override the on random tick method.
  13. Look at the Minecraft wiki for color codes. Use them in your language file.
  14. 1.8 uses block states now.
  15. This is an error with your block...make sure you override getMetaFromState as well as getStateFromMeta
  16. Alright then. public class YourEventHandler { @SubscribeEvent public void onBlockBreak(BlockEvent.BreakEvent event) { //do stuff } } And in your init method in the main mod file, put MinecraftForge.EVENT_BUS.register(new YourEventHandler());
  17. Use the BlockEvent.BreakEvent.
  18. I see you used diesieben07's tutorial. Read the replies, you'll find the SRG names. Add them to the lines following like so: private static final Field eventHandlerField = ReflectionHelper.findField(InventoryCrafting.class, "eventHandler", "srgEventHandlerNameGoesHere"); private static final Field containerPlayerPlayerField = ReflectionHelper.findField(ContainerPlayer.class, "thePlayer", "sameForThePlayer"); private static final Field slotCraftingPlayerField = ReflectionHelper.findField(SlotCrafting.class, "thePlayer", andSoOn);

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.