mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Override getToolClasses() in tools so that they work with basically every mod that needs it to work.
Duh.
This commit is contained in:
parent
edf870403f
commit
8b0a5eb799
3 changed files with 18 additions and 0 deletions
|
@ -20,6 +20,7 @@ import net.minecraft.item.EnumRarity;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemAxeAA extends ItemToolAA{
|
||||
|
@ -39,4 +40,9 @@ public class ItemAxeAA extends ItemToolAA{
|
|||
Material material = state.getMaterial();
|
||||
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack stack){
|
||||
return Collections.singleton("axe");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.item.EnumRarity;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemPickaxeAA extends ItemToolAA{
|
||||
|
@ -80,4 +81,9 @@ public class ItemPickaxeAA extends ItemToolAA{
|
|||
Material material = state.getMaterial();
|
||||
return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack stack){
|
||||
return Collections.singleton("pickaxe");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.minecraft.util.EnumHand;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemShovelAA extends ItemToolAA{
|
||||
|
@ -51,4 +52,9 @@ public class ItemShovelAA extends ItemToolAA{
|
|||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
return Items.IRON_SHOVEL.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack stack){
|
||||
return Collections.singleton("shovel");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue