Fixed filters so that they would send a block update to the inventories when updated. Also nerfed the bound sword.
This commit is contained in:
parent
a88d7f43b8
commit
b3636fe12f
|
@ -40,7 +40,7 @@ public class ItemBoundSword extends ItemSword implements IBindable, IActivatable
|
||||||
setRegistryName(Constants.BloodMagicItem.BOUND_SWORD.getRegName());
|
setRegistryName(Constants.BloodMagicItem.BOUND_SWORD.getRegName());
|
||||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||||
|
|
||||||
this.attackDamage = 4.0F + ModItems.boundToolMaterial.getDamageVsEntity();
|
this.attackDamage = 1.0F + ModItems.boundToolMaterial.getDamageVsEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -95,7 +95,8 @@ public class ItemBoundSword extends ItemSword implements IBindable, IActivatable
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack) {
|
public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack)
|
||||||
|
{
|
||||||
Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(stack);
|
Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(stack);
|
||||||
double damage = getActivated(stack) ? this.attackDamage : 1.0D;
|
double damage = getActivated(stack) ? this.attackDamage : 1.0D;
|
||||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(itemModifierUUID, "Weapon modifier", damage, 0));
|
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(itemModifierUUID, "Weapon modifier", damage, 0));
|
||||||
|
|
|
@ -5,7 +5,10 @@ import java.util.List;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.ISidedInventory;
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import WayofTime.bloodmagic.util.Utils;
|
import WayofTime.bloodmagic.util.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,6 +75,11 @@ public class DefaultItemFilter implements IItemFilter
|
||||||
testStack = inputStack.copy();
|
testStack = inputStack.copy();
|
||||||
testStack.stackSize -= changeAmount;
|
testStack.stackSize -= changeAmount;
|
||||||
|
|
||||||
|
TileEntity tile = (TileEntity) accessedInventory;
|
||||||
|
World world = tile.getWorld();
|
||||||
|
BlockPos pos = tile.getPos();
|
||||||
|
world.markBlockForUpdate(pos);
|
||||||
|
|
||||||
return testStack;
|
return testStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,6 +132,11 @@ public class DefaultItemFilter implements IItemFilter
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TileEntity tile = (TileEntity) accessedInventory;
|
||||||
|
World world = tile.getWorld();
|
||||||
|
BlockPos pos = tile.getPos();
|
||||||
|
world.markBlockForUpdate(pos);
|
||||||
|
|
||||||
inputStack.stackSize -= changeAmount;
|
inputStack.stackSize -= changeAmount;
|
||||||
maxTransfer -= changeAmount;
|
maxTransfer -= changeAmount;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue