Connected Glass
This commit is contained in:
@@ -34,7 +34,6 @@ import appeng.core.AEConfig;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
|
||||
|
||||
public abstract class AppEngPacket
|
||||
@@ -48,7 +47,8 @@ public abstract class AppEngPacket
|
||||
|
||||
public final int getPacketID()
|
||||
{
|
||||
return AppEngPacketHandlerBase.PacketTypes.getID( this.getClass() ).ordinal();
|
||||
throw new IllegalStateException();
|
||||
// FIXME return AppEngPacketHandlerBase.PacketTypes.getID( this.getClass() ).ordinal();
|
||||
}
|
||||
|
||||
public void clientPacketData( final INetworkInfo network, final PlayerEntity player )
|
||||
@@ -74,7 +74,8 @@ public abstract class AppEngPacket
|
||||
AELog.info( this.getClass().getName() + " : " + p.readableBytes() );
|
||||
}
|
||||
|
||||
return direction.buildPacket( Pair.of( p, 0 ), NetworkHandler.instance().getChannel() ).getThis();
|
||||
// FIXME return direction.buildPacket( Pair.of( p, 0 ), NetworkHandler.instance().getChannel() ).getThis();
|
||||
return null;
|
||||
}
|
||||
|
||||
// TODO: Figure out why Forge/Minecraft on the server sets the stream data buffer to PooledUnsafeDirectByteBuf
|
||||
|
||||
@@ -22,7 +22,6 @@ package appeng.core.sync.network;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.fml.network.PacketDispatcher;
|
||||
|
||||
|
||||
public interface IPacketHandler
|
||||
|
||||
@@ -29,18 +29,14 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import appeng.api.definitions.IComparableDefinition;
|
||||
import appeng.api.definitions.IItems;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import appeng.api.implementations.items.MemoryCardMessages;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.core.Api;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.items.tools.ToolNetworkTool;
|
||||
import appeng.items.tools.powered.ToolColorApplicator;
|
||||
|
||||
|
||||
public class PacketClick extends AppEngPacket
|
||||
@@ -120,34 +116,34 @@ public class PacketClick extends AppEngPacket
|
||||
if( this.leftClick )
|
||||
{
|
||||
final Block block = player.world.getBlockState( pos ).getBlock();
|
||||
if( block instanceof BlockCableBus )
|
||||
{
|
||||
( (BlockCableBus) block ).onBlockClickPacket( player.world, pos, player, this.hand, new Vec3d( this.hitX, this.hitY, this.hitZ ) );
|
||||
}
|
||||
// FIXME if( block instanceof BlockCableBus )
|
||||
// FIXME {
|
||||
// FIXME ( (BlockCableBus) block ).onBlockClickPacket( player.world, pos, player, this.hand, new Vec3d( this.hitX, this.hitY, this.hitZ ) );
|
||||
// FIXME }
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !is.isEmpty() )
|
||||
{
|
||||
if( is.getItem() instanceof ToolNetworkTool )
|
||||
{
|
||||
final ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
|
||||
tnt.serverSideToolLogic( is, player, this.hand, player.world, pos, this.side, this.hitX, this.hitY,
|
||||
this.hitZ );
|
||||
}
|
||||
// FIXME if( is.getItem() instanceof ToolNetworkTool )
|
||||
// FIXME {
|
||||
// FIXME final ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
|
||||
// FIXME tnt.serverSideToolLogic( is, player, this.hand, player.world, pos, this.side, this.hitX, this.hitY,
|
||||
// FIXME this.hitZ );
|
||||
// FIXME }
|
||||
|
||||
else if( maybeMemoryCard.isSameAs( is ) )
|
||||
/* FIXME else */ if( maybeMemoryCard.isSameAs( is ) )
|
||||
{
|
||||
final IMemoryCard mem = (IMemoryCard) is.getItem();
|
||||
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
|
||||
is.setTag( null );
|
||||
}
|
||||
|
||||
else if( maybeColorApplicator.isSameAs( is ) )
|
||||
{
|
||||
final ToolColorApplicator mem = (ToolColorApplicator) is.getItem();
|
||||
mem.cycleColors( is, mem.getColor( is ), 1 );
|
||||
}
|
||||
// FIXME else if( maybeColorApplicator.isSameAs( is ) )
|
||||
// FIXME {
|
||||
// FIXME final ToolColorApplicator mem = (ToolColorApplicator) is.getItem();
|
||||
// FIXME mem.cycleColors( is, mem.getColor( is ), 1 );
|
||||
// FIXME }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import appeng.api.util.DimensionalCoord;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.worlddata.WorldData;
|
||||
import appeng.services.compass.ICompassCallback;
|
||||
|
||||
|
||||
@@ -79,6 +78,6 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
||||
this.talkBackTo = player;
|
||||
|
||||
final DimensionalCoord loc = new DimensionalCoord( player.world, this.cx << 4, this.cdy << 5, this.cz << 4 );
|
||||
WorldData.instance().compassData().service().getCompassDirection( loc, 174, this );
|
||||
// FIXME WorldData.instance().compassData().service().getCompassDirection( loc, 174, this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.client.gui.implementations.GuiInterfaceTerminal;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
@@ -113,9 +112,9 @@ public class PacketCompressedNBT extends AppEngPacket
|
||||
{
|
||||
final Screen gs = Minecraft.getInstance().currentScreen;
|
||||
|
||||
if( gs instanceof GuiInterfaceTerminal )
|
||||
{
|
||||
( (GuiInterfaceTerminal) gs ).postUpdate( this.in );
|
||||
}
|
||||
// FIXME if( gs instanceof GuiInterfaceTerminal )
|
||||
// FIXME {
|
||||
// FIXME ( (GuiInterfaceTerminal) gs ).postUpdate( this.in );
|
||||
// FIXME }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import net.minecraft.network.PacketBuffer;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
import appeng.util.Platform;
|
||||
@@ -65,15 +64,15 @@ public final class PacketConfigButton extends AppEngPacket
|
||||
public void serverPacketData( final INetworkInfo manager, final PlayerEntity player )
|
||||
{
|
||||
final ServerPlayerEntity sender = (ServerPlayerEntity) player;
|
||||
if( sender.openContainer instanceof AEBaseContainer )
|
||||
{
|
||||
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||
if( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||
{
|
||||
final IConfigManager cm = ( (IConfigurableObject) baseContainer.getTarget() ).getConfigManager();
|
||||
final Enum<?> newState = Platform.rotateEnum( cm.getSetting( this.option ), this.rotationDirection, this.option.getPossibleValues() );
|
||||
cm.putSetting( this.option, newState );
|
||||
}
|
||||
}
|
||||
// FIXME if( sender.openContainer instanceof AEBaseContainer )
|
||||
// FIXME {
|
||||
// FIXME final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||
// FIXME if( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||
// FIXME {
|
||||
// FIXME final IConfigManager cm = ( (IConfigurableObject) baseContainer.getTarget() ).getConfigManager();
|
||||
// FIXME final Enum<?> newState = Platform.rotateEnum( cm.getSetting( this.option ), this.rotationDirection, this.option.getPossibleValues() );
|
||||
// FIXME cm.putSetting( this.option, newState );
|
||||
// FIXME }
|
||||
// FIXME }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ import appeng.api.networking.crafting.ICraftingGrid;
|
||||
import appeng.api.networking.crafting.ICraftingJob;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.container.ContainerOpenContext;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
|
||||
Reference in New Issue
Block a user