2015-08-29 14:33:25 +02:00
/ *
2016-05-16 22:52:27 +02:00
* This file ( " ItemSwordAA.java " ) is part of the Actually Additions mod for Minecraft .
2015-08-29 14:33:25 +02:00
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
2016-05-16 22:52:27 +02:00
* http : //ellpeck.de/actaddlicense
2015-08-29 14:33:25 +02:00
* View the source code at https : //github.com/Ellpeck/ActuallyAdditions
*
2017-01-01 16:23:26 +01:00
* © 2015 - 2017 Ellpeck
2015-08-29 14:33:25 +02:00
* /
2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.items.base ;
2015-02-17 16:15:16 +01:00
2024-03-02 21:23:08 +01:00
import net.minecraft.world.item.SwordItem ;
import net.minecraft.world.item.Tier ;
2015-02-17 16:15:16 +01:00
2021-11-21 21:05:27 +01:00
public class ItemSwordAA extends SwordItem {
2024-03-02 21:23:08 +01:00
private Tier tier ;
public ItemSwordAA ( Tier tier ) {
2021-11-21 21:18:00 +01:00
super ( tier ,
( int ) tier . getAttackDamageBonus ( ) ,
tier . getSpeed ( ) ,
new Properties ( )
2024-03-02 21:23:08 +01:00
// .addToolType(ToolType.AXE, tier.getLevel())
// .addToolType(ToolType.HOE, tier.getLevel())
// .addToolType(ToolType.SHOVEL, tier.getLevel())
// .addToolType(ToolType.PICKAXE, tier.getLevel())
2021-11-21 21:18:00 +01:00
. durability ( tier . getUses ( ) * 4 )
2024-03-03 01:20:53 +01:00
2021-11-21 21:18:00 +01:00
) ;
2021-11-21 21:05:27 +01:00
}
2015-02-20 22:45:33 +01:00
2021-11-21 21:05:27 +01:00
/ * private final boolean disabled ;
2015-02-17 16:15:16 +01:00
2021-02-27 21:24:26 +01:00
public ItemSwordAA ( IItemTier toolMat ) {
2015-02-17 16:15:16 +01:00
super ( toolMat ) ;
2015-12-03 20:15:07 +01:00
2019-05-02 09:08:15 +02:00
this . disabled = ConfigurationHandler . config . getBoolean ( " Disable: " + StringUtil . badTranslate ( this . name ) , " Tool Control " , false , " This will disable the " + StringUtil . badTranslate ( this . name ) + " . It will not be registered. " ) ;
2021-02-27 21:24:26 +01:00
if ( ! this . disabled ) {
this . register ( ) ;
}
2015-12-03 20:15:07 +01:00
}
2019-05-02 09:08:15 +02:00
private void register ( ) {
2016-02-01 17:49:55 +01:00
}
2019-05-02 09:08:15 +02:00
protected Class < ? extends ItemBlockBase > getItemBlock ( ) {
2015-12-03 20:15:07 +01:00
return ItemBlockBase . class ;
2015-02-17 16:15:16 +01:00
}
2015-03-19 21:27:56 +01:00
@Override
2021-08-22 17:09:06 +02:00
public boolean isValidRepairItem ( ItemStack itemToRepair , ItemStack stack ) {
2015-12-31 15:05:27 +01:00
return ItemUtil . areItemsEqual ( this . repairItem , stack , false ) ;
2015-03-19 21:27:56 +01:00
}
2019-02-27 19:53:05 +01:00
@Override
public boolean isDisabled ( ) {
return this . disabled ;
2021-11-21 21:05:27 +01:00
} * /
2015-02-17 16:15:16 +01:00
}