Jump to content

[1.7.10] Multitool/paxel mod problem


Erfurt

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)'

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :/

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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