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.

Featured Replies

Posted

Hey guys

 

So I have run into some problems with my multitool/paxel mod. My problem is that I can't mine stone stairs and walls. And I can't really understand why that is. I had some problems with wood stairs and fences aswell, and the worst part is that I don't really know how I fixed it.

I have made a class for paxels, and the code is like this

public class ItemPaxel extends ItemTool
{

private static final Set<Block> blocksEffectiveAgainst = Sets.newHashSet(Block.blockRegistry);
private ToolMaterial mat;

public ItemPaxel(String name, ToolMaterial tool)
{
	super(3.0F, tool, blocksEffectiveAgainst);
	mat = tool;
	this.setHarvestLevel("pickaxe", tool.getHarvestLevel());
	this.setHarvestLevel("axe", tool.getHarvestLevel());
	this.setHarvestLevel("shovel", tool.getHarvestLevel());
	this.setCreativeTab(CreativeTabs.tabTools);
}
}

 

I'm thinking that the problem is in the blockEffectiveAgainst, but I don't know how to fix the problem. Any help would be lovely :)

So it cannot mine stone stairs/walls while it can mine stone block?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

Yes, that is correct, I'm also very confussed as to why it's acting like this

Why did you declare 'private static final Set<Block> blocksEffectiveAgainst'?

It would have no effect because it is private static and not used in the class.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

Why did you declare 'private static final Set<Block> blocksEffectiveAgainst'?

It would have no effect because it is private static and not used in the class.

 

So you want it to be public instead, or remove it completely? BTW it is used in the class, in the 'super(3.0F, tool, blocksEffectiveAgainst)'

Oh. I was blind :/

Then nothing would be wrong.. Or try moving the item initialization code to preInit.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

Oh. I was blind :/

Then nothing would be wrong.. Or try moving the item initialization code to preInit.

No problem :)

I have tried to have the code in both init and preInit. It didn't work, I have to say that this is strange. Because it otherwise works as intended. Just not the wall and stone stairs(all stair blocks harvest by pickaxe, the pickaxe function is working fine otherwise). Maybe there's something I have missed :/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.