BloodMagic/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilCompression.java
Arcaratus 0383f0fb31 Move some base classes into the API
Add Javadocs for API classes that didn't already have them

Redo

'nother redo

Another redo

Update ItemSigil.java

Last one, I swear

Fix
2016-03-23 20:23:39 -04:00

33 lines
1.1 KiB
Java

package WayofTime.bloodmagic.item.sigil;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.compress.CompressionRegistry;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemSigilCompression extends ItemSigilToggleableBase
{
public ItemSigilCompression()
{
super("compression", 200);
setRegistryName(Constants.BloodMagicItem.SIGIL_COMPRESSION.getRegName());
}
// TODO REWRITE all compression stuff if someone has time
// TODO for now, there is a semi-working system in place
@Override
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
{
ItemStack compressedStack = CompressionRegistry.compressInventory(player.inventory.mainInventory, world);
if (compressedStack != null)
{
EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, compressedStack);
world.spawnEntityInWorld(entityItem);
}
}
}