try
{
datainputstream = new DataInputStream(new ByteArrayInputStream(p_147349_1_.func_149558_e()));
i = datainputstream.readInt();
int j = datainputstream.readInt();
ContainerBeacon containerbeacon = (ContainerBeacon)net.playerEntity.openContainer;
Slot slot = containerbeacon.getSlot(0);
if (slot.getHasStack())
{
slot.decrStackSize(1);
TileEntityBeacon tileentitybeacon = containerbeacon.func_148327_e();
tileentitybeacon.setPrimaryEffect(i);
tileentitybeacon.setSecondaryEffect(j);
tileentitybeacon.markDirty();
}
}