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.

raiwhiz

Members
  • Joined

  • Last visited

Everything posted by raiwhiz

  1. Actually, I had tried to copy the private static final Set and add all bricks in it. But nothing chage. private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] { Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.DOUBLE_STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE, Blocks.BRICK_BLOCK, Blocks.BRICK_STAIRS, Blocks.RED_NETHER_BRICK, Blocks.NETHER_BRICK, Blocks.NETHER_BRICK_STAIRS, Blocks.STONE_BRICK_STAIRS, Blocks.STONEBRICK } ); public class NewTool extends ItemTool { public NewTool() { super(3.0f, -1.5f, ToolMaterial.DIAMOND, EFFECTIVE_ON); this.setHarvestLevel("pickaxe", 3); this.setHarvestLevel("shovel", 3); } }
  2. Hey, guys! I just create a simple tool: public class NewTool extends ItemTool { public NewTool() { super(3.0f, -1.5f, ToolMaterial.DIAMOND, new HashSet()); this.setHarvestLevel("pickaxe", 3); this.setHarvestLevel("shovel", 3); } } But I found it can't harvest bricks! I check the ItemPickaxe code, I found it needs to overwrite canHarvestBlock. So I do this: @Override public boolean canHarvestBlock(IBlockState blockIn) { return true; } Now it worked! Bricks can be harvested. I set a debug point to canHarvestBlock(). Only harvesting bricks it triggered. So, is this a bug that Forge missing to take control bricks? Or it's design that needs canHarvestBlock() to control bricks? Otherwise, is it OK to transfer new HashSet() for effectiveBlocksIn when I using Forge? (The fourth parameter) It seems no probrem when I do the test in game. super(3.0f, -1.5f, ToolMaterial.DIAMOND, new HashSet()); Forge version: 12.18.3.2422 Thanks!

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.