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.

suyama

Members
  • Joined

  • Last visited

  1. thanks guys. this was a nice push for me. and jabelar your blog is awesome. The Documention of forge is nice but im looking for something like this https://docs.oracle.com/javase/7/docs/api/ public void BlockHarvested(BlockEvent.BreakEvent event) { if (event.getState().getBlock().isWood(event.getWorld(), event.getPos())) { System.out.println("It Works!"); } } this is my event. it works fine now. Now I just need a method to delete everything around the harvested block. Could someone correct me if i have the wrong idea. I was thinking about a method which has 2 or 3 for loops (for x,y and perhaps z) with a max_radius of maybe 4 which has 2 conditions . if leaves || if wood -> break. block. And around the for loops i need my condition isAxe. If im correct I just need to find out how the Syntax works to do something like this
  2. Im trying to improve my java skills with modding some minecraft and currently im trying to do something like a chopping Tree mod. Im using tutorials and the MinecraftForge Docu but I still have trouble. I wanted to go like this. an event triggered through players destroying a block 2 conditions: active item == axe and destroyed block == wood conditions == true -> destroy tree Could somebody give me a little push or perhaps a tutorial about this problem. most tutorials i find are about creating items ^^ this is my method i was trying to get active item. public static boolean isItemAxe(EntityPlayer theplayer){ if(theplayer.getActiveItemStack().isEmpty()== true){ return false; } else if(theplayer.getActiveItemStack().isItemEqual(Items.IRON_PICKAXE)== false){ return false; } return true; Exception: The method isItemEqual(ItemStack) in the type ItemStack is not applicable for the arguments (Item) edit:// public static boolean isItemAxe(EntityPlayer theplayer){ if(theplayer == null || theplayer.getActiveItemStack().getItem() == null ){ return false; } else if(theplayer.getActiveItemStack().getItem() == Items.IRON_PICKAXE){ return true; }else return false; } this should work. later i try to do a condition with all pickaxes. Now im having trouble creating an event triggered through players destroying a block thanks in advance

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.