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());
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
|
||||
this.attackDamage = 4.0F + ModItems.boundToolMaterial.getDamageVsEntity();
|
||||
this.attackDamage = 1.0F + ModItems.boundToolMaterial.getDamageVsEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -95,7 +95,8 @@ public class ItemBoundSword extends ItemSword implements IBindable, IActivatable
|
|||
}
|
||||
|
||||
@Override
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack) {
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack)
|
||||
{
|
||||
Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(stack);
|
||||
double damage = getActivated(stack) ? this.attackDamage : 1.0D;
|
||||
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.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
|
||||
/**
|
||||
|
@ -72,6 +75,11 @@ public class DefaultItemFilter implements IItemFilter
|
|||
testStack = inputStack.copy();
|
||||
testStack.stackSize -= changeAmount;
|
||||
|
||||
TileEntity tile = (TileEntity) accessedInventory;
|
||||
World world = tile.getWorld();
|
||||
BlockPos pos = tile.getPos();
|
||||
world.markBlockForUpdate(pos);
|
||||
|
||||
return testStack;
|
||||
}
|
||||
|
||||
|
@ -124,6 +132,11 @@ public class DefaultItemFilter implements IItemFilter
|
|||
continue;
|
||||
}
|
||||
|
||||
TileEntity tile = (TileEntity) accessedInventory;
|
||||
World world = tile.getWorld();
|
||||
BlockPos pos = tile.getPos();
|
||||
world.markBlockForUpdate(pos);
|
||||
|
||||
inputStack.stackSize -= changeAmount;
|
||||
maxTransfer -= changeAmount;
|
||||
|
||||
|
|
Loading…
Reference in a new issue