Backstage Sigil of Holding (#785)

* Backstage Sigil of Holding
All Sigil of Holding features work, just need to add the aesthetics -> TehNut
Somebody might want to look at adding LP costs to the Sigil?
Also recipes need to be added
Added a keybinding system for future usage
Standardized some NBT tags

Compact classes

Fix lang stuff?

* Fancify Sigil of Holding GUI
Displays the selected sigil in the GUI now

Woops

* Quick fix

* Unused import

* Final commit I promise
This commit is contained in:
Arcaratus 2016-06-07 18:50:41 -04:00 committed by Nick Ignoffo
parent 9aa2f86c88
commit 8d66575530
19 changed files with 922 additions and 6 deletions

View file

@ -0,0 +1,56 @@
package WayofTime.bloodmagic.network;
import WayofTime.bloodmagic.item.sigil.ItemSigilHolding;
import io.netty.buffer.ByteBuf;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
public class SigilHoldingPacketProcessor implements IMessage, IMessageHandler<SigilHoldingPacketProcessor, IMessage>
{
private int slot;
private int mode;
public SigilHoldingPacketProcessor()
{
}
public SigilHoldingPacketProcessor(int slot, int mode)
{
this.slot = slot;
this.mode = mode;
}
@Override
public void toBytes(ByteBuf buffer)
{
buffer.writeInt(slot);
buffer.writeInt(mode);
}
@Override
public void fromBytes(ByteBuf buffer)
{
slot = buffer.readInt();
mode = buffer.readInt();
}
@Override
public IMessage onMessage(SigilHoldingPacketProcessor message, MessageContext ctx)
{
ItemStack itemStack = null;
if (message.slot > -1 && message.slot < 9)
{
itemStack = ctx.getServerHandler().playerEntity.inventory.getStackInSlot(message.slot);
}
if (itemStack != null)
{
ItemSigilHolding.cycleSigil(itemStack, message.mode);
}
return null;
}
}