Container-Stuff

This commit is contained in:
Sebastian Hartte
2020-06-02 02:33:05 +02:00
parent 9f63859769
commit fc300745cd
43 changed files with 197 additions and 202 deletions
@@ -23,14 +23,13 @@ import java.io.IOException;
import java.lang.reflect.Field;
import java.util.EnumSet;
import net.minecraft.entity.player.PlayerEntityMP;
import net.minecraft.inventory.IContainerListener;
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;
public class SyncData
@@ -86,9 +85,9 @@ public class SyncData
{
if( val instanceof String )
{
if( o instanceof PlayerEntityMP )
if( o instanceof ServerPlayerEntity)
{
NetworkHandler.instance().sendTo( new PacketValueConfig( "SyncDat." + this.channel, (String) val ), (PlayerEntityMP) o );
NetworkHandler.instance().sendTo( new PacketValueConfig( "SyncDat." + this.channel, (String) val ), (ServerPlayerEntity) o );
}
}
else if( this.field.getType().isEnum() )
@@ -97,9 +96,9 @@ public class SyncData
}
else if( val instanceof Long || val.getClass() == long.class )
{
if( o instanceof PlayerEntityMP )
if( o instanceof ServerPlayerEntity )
{
NetworkHandler.instance().sendTo( new PacketProgressBar( this.channel, (Long) val ), (PlayerEntityMP) o );
NetworkHandler.instance().sendTo( new PacketProgressBar( this.channel, (Long) val ), (ServerPlayerEntity) o );
}
}
else if( val instanceof Boolean || val.getClass() == boolean.class )