Spring Cleaning (#127)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
koolkrafter5andgithub-actions[bot] authored and GitHub committed 2026-05-12 20:52:29 +02:00
1 parent 1544c1bf0d
commit 3b2b31f733
413 files changed
+9272 -17658

No files matched your search

@@ -2,16 +2,12 @@ package WayofTime.alchemicalWizardry.common.items;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.IIcon;
@@ -84,36 +80,32 @@ public class EnergySword extends ItemSword implements IBindable {
if (isActive && !player.worldObj.isRemote) {
OmegaParadigm parad = this.getOmegaParadigmOfWeilder(player);
if (parad != null && parad.isPlayerWearingFullSet(player)) {
if (!parad.onBoundSwordLeftClickEntity(stack, player, entity)) {
return true;
}
if (parad != null && parad.isPlayerWearingFullSet(player)
&& !parad.onBoundSwordLeftClickEntity(stack, player, entity)) {
return true;
}
}
return !isActive;
}
@Override
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,
EntityLivingBase par3EntityLivingBase) {
if (par3EntityLivingBase instanceof EntityPlayer) {
if (!IBindable.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !EnergyItems
.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.drainCost())) {
return false;
}
public boolean hitEntity(ItemStack item, EntityLivingBase target, EntityLivingBase attacker) {
if (attacker instanceof EntityPlayer player && (!IBindable.checkAndSetItemOwner(item, player)
|| !EnergyItems.syphonBatteries(item, player, this.drainCost()))) {
return false;
}
par2EntityLivingBase.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
target.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
return true;
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer);
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
super.onItemRightClick(item, world, player);
this.toggle(par1ItemStack, par2World, par3EntityPlayer);
this.toggle(item, world, player);
return par1ItemStack;
return item;
}
@Override
@@ -122,43 +114,19 @@ public class EnergySword extends ItemSword implements IBindable {
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
if (!(par3Entity instanceof EntityPlayer)) {
public void onUpdate(ItemStack item, World world, Entity entity, int slot, boolean held) {
if (!(entity instanceof EntityPlayer player)) {
return;
}
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
if (par1ItemStack.getTagCompound() == null) {
par1ItemStack.setTagCompound(new NBTTagCompound());
}
checkPassiveDrain(par1ItemStack, par2World, par3EntityPlayer);
par1ItemStack.setItemDamage(0);
}
public float func_82803_g() {
return 4.0F;
checkPassiveDrain(item, world, player);
item.setItemDamage(0);
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
par3List.add(StatCollector.translateToLocal("tooltip.caution.desc1"));
par3List.add(StatCollector.translateToLocal("tooltip.caution.desc2"));
addBindingInformation(par1ItemStack, par3List);
}
@Override
public float func_150893_a(ItemStack par1ItemStack, Block par2Block) {
if (par2Block == Blocks.web) {
return 15.0F;
} else {
Material material = par2Block.getMaterial();
return material != Material.plants && material != Material.vine
&& material != Material.coral
&& material != Material.leaves
&& material != Material.gourd ? 1.0F : 1.5F;
}
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean adv) {
tooltip.add(StatCollector.translateToLocal("tooltip.caution.desc1"));
tooltip.add(StatCollector.translateToLocal("tooltip.caution.desc2"));
addBindingInformation(item, tooltip);
}
}