mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
Move the directory structure around to a more conventional one and start out on the 1.7 update.
3797 errors. We have a long way to go.
This commit is contained in:
1 parent
3a0de87a09
commit
ab47724473
1245 files changed
+1764
-5953
No files matched your search
@@ -0,0 +1,47 @@
|
||||
package mekanism.common.network;
|
||||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.common.item.ItemPortableTeleporter;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
public class PacketStatusUpdate implements IMekanismPacket
|
||||
{
|
||||
public int status;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "StatusUpdate";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
status = (Integer)data[0];
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
ItemStack currentStack = player.getCurrentEquippedItem();
|
||||
|
||||
if(currentStack != null && currentStack.getItem() instanceof ItemPortableTeleporter)
|
||||
{
|
||||
ItemPortableTeleporter item = (ItemPortableTeleporter)currentStack.getItem();
|
||||
item.setStatus(currentStack, dataStream.readInt());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutputStream dataStream) throws Exception
|
||||
{
|
||||
dataStream.writeInt(status);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user