GUI Rendering and various fixes

This commit is contained in:
Sebastian Hartte
2020-06-07 03:29:57 +02:00
parent 97f04922b9
commit 46b1d1ffdc
72 changed files with 650 additions and 552 deletions
@@ -27,6 +27,7 @@ import appeng.container.AEBaseContainer;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketProgressBar;
import appeng.core.sync.packets.PacketValueConfig;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.IContainerListener;
@@ -66,27 +67,20 @@ public class SyncData
this.send( c, val );
}
}
catch( final IllegalArgumentException e )
{
AELog.debug( e );
}
catch( final IllegalAccessException e )
{
AELog.debug( e );
}
catch( final IOException e )
catch( final IllegalArgumentException | IllegalAccessException e )
{
AELog.debug( e );
}
}
private void send( final IContainerListener o, final Object val ) throws IOException
private void send( final IContainerListener o, final Object val )
{
if( val instanceof String )
{
if( o instanceof ServerPlayerEntity)
{
// FIXME NetworkHandler.instance().sendTo( new PacketValueConfig( "SyncDat." + this.channel, (String) val ), (ServerPlayerEntity) o );
NetworkHandler.instance().sendTo( new PacketValueConfig( "SyncDat." + this.channel, (String) val ), (ServerPlayerEntity) o );
}
}
else if( this.field.getType().isEnum() )