mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Refractored Code
+added Solar Factory -removed unnessecary solar and essentia generator classes +started gtnh researches +added tooltip clearance on solars (maximal output) Signed-off-by: bartimaeusnek <[email protected]>
This commit is contained in:
1 parent
980df8516a
commit
0fecf28b65
397 files changed
+8693
-9288
No files matched your search
@@ -15,50 +15,48 @@ import net.minecraft.world.World;
|
||||
|
||||
public class ItemOmnitoolDiamond extends ItemOmnitoolIron {
|
||||
|
||||
public ItemOmnitoolDiamond() {
|
||||
super();
|
||||
this.efficiencyOnProperMaterial = 16F;
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
this.setMaxStackSize(1);
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
this.setMaxDamage(27);
|
||||
}
|
||||
else {
|
||||
this.setMaxDamage(350);
|
||||
}
|
||||
maxCharge = 100000;
|
||||
hitCost = 250;
|
||||
}
|
||||
public ItemOmnitoolDiamond() {
|
||||
super();
|
||||
this.efficiencyOnProperMaterial = 16F;
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
this.setMaxStackSize(1);
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
this.setMaxDamage(27);
|
||||
} else {
|
||||
this.setMaxDamage(350);
|
||||
}
|
||||
maxCharge = 100000;
|
||||
hitCost = 250;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(EMT.TEXTURE_PATH + ":tools/omnitool_diamond");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
cost = 200;
|
||||
}
|
||||
else {
|
||||
cost = 1;
|
||||
}
|
||||
ElectricItem.manager.use(stack, cost, entityLiving);
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int par4, int par5, int par6, EntityLivingBase entityLiving) {
|
||||
if (!EMTConfigHandler.toolsInBore) {
|
||||
cost = 200;
|
||||
} else {
|
||||
cost = 1;
|
||||
}
|
||||
ElectricItem.manager.use(stack, cost, entityLiving);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
|
||||
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
|
||||
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack itemstack, EntityLivingBase entityliving, EntityLivingBase attacker) {
|
||||
if (ElectricItem.manager.use(itemstack, hitCost, attacker)) {
|
||||
entityliving.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) attacker), 10F);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* IC2 API METHODS */
|
||||
@Override
|
||||
public double getTransferLimit(ItemStack itemStack) {
|
||||
return 400;
|
||||
}
|
||||
/* IC2 API METHODS */
|
||||
@Override
|
||||
public double getTransferLimit(ItemStack itemStack) {
|
||||
return 400;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user