mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Update buildscript & spotlessApply (#78)
* Update buildscript & spotlessApply * Add mapping version
This commit is contained in:
1 parent
f272840987
commit
cf41b89ae4
851 files changed
+95348
-92599
No files matched your search
+33
-36
@@ -1,48 +1,45 @@
|
||||
package crazypants.enderio.machine.invpanel;
|
||||
|
||||
import com.enderio.core.common.network.MessageTileEntity;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import com.enderio.core.common.network.MessageTileEntity;
|
||||
public class PacketSetExtractionDisabled extends MessageTileEntity<TileInventoryPanel>
|
||||
implements IMessageHandler<PacketSetExtractionDisabled, IMessage> {
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
private boolean extractionDisabled;
|
||||
|
||||
public class PacketSetExtractionDisabled extends MessageTileEntity<TileInventoryPanel> implements IMessageHandler<PacketSetExtractionDisabled, IMessage> {
|
||||
public PacketSetExtractionDisabled() {}
|
||||
|
||||
private boolean extractionDisabled;
|
||||
|
||||
public PacketSetExtractionDisabled() {
|
||||
}
|
||||
|
||||
public PacketSetExtractionDisabled(TileInventoryPanel tile, boolean extractionDisabled) {
|
||||
super(tile);
|
||||
this.extractionDisabled = extractionDisabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
super.fromBytes(buf);
|
||||
extractionDisabled = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
super.toBytes(buf);
|
||||
buf.writeBoolean(extractionDisabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketSetExtractionDisabled message, MessageContext ctx) {
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
TileEntity te = player.worldObj.getTileEntity(message.x, message.y, message.z);
|
||||
if(te instanceof TileInventoryPanel) {
|
||||
TileInventoryPanel teInvPanel = (TileInventoryPanel) te;
|
||||
teInvPanel.setExtractionDisabled(message.extractionDisabled);
|
||||
public PacketSetExtractionDisabled(TileInventoryPanel tile, boolean extractionDisabled) {
|
||||
super(tile);
|
||||
this.extractionDisabled = extractionDisabled;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
super.fromBytes(buf);
|
||||
extractionDisabled = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
super.toBytes(buf);
|
||||
buf.writeBoolean(extractionDisabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketSetExtractionDisabled message, MessageContext ctx) {
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
TileEntity te = player.worldObj.getTileEntity(message.x, message.y, message.z);
|
||||
if (te instanceof TileInventoryPanel) {
|
||||
TileInventoryPanel teInvPanel = (TileInventoryPanel) te;
|
||||
teInvPanel.setExtractionDisabled(message.extractionDisabled);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user