Second update pass (2/3) - 82 -> 0 errors
Second update pass which fixes all compile errors. Some parts may have aftermath effect, hence why 3rd pass will check those maked with "aftermath". Errors: 82 -> 0. Mod can be launched.
This commit is contained in:
@@ -60,6 +60,7 @@ import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.SPacketChunkData;
|
||||
import net.minecraft.server.management.PlayerChunkMap;
|
||||
import net.minecraft.server.management.PlayerChunkMapEntry;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
@@ -160,9 +161,7 @@ public class Platform
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
private static final WeakHashMap<World, EntityPlayer> FAKE_PLAYERS = new WeakHashMap<World, EntityPlayer>();
|
||||
private static Field tagList;
|
||||
private static Class playerInstance;
|
||||
private static Method getOrCreateChunkWatcher;
|
||||
private static Method sendToAllPlayersWatchingChunk;
|
||||
private static Method getEntry;
|
||||
|
||||
public static Random getRandom()
|
||||
{
|
||||
@@ -2129,7 +2128,6 @@ public class Platform
|
||||
return is;
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - What do we want to do with this? Seriously, it wont work now, so JUST DO SOMETHING!
|
||||
public static void sendChunk( final Chunk c, final int verticalBits )
|
||||
{
|
||||
try
|
||||
@@ -2137,27 +2135,17 @@ public class Platform
|
||||
final WorldServer ws = (WorldServer) c.getWorld();
|
||||
final PlayerChunkMap pm = ws.getPlayerChunkMap();
|
||||
|
||||
if( getOrCreateChunkWatcher == null )
|
||||
if( getEntry == null )
|
||||
{
|
||||
getOrCreateChunkWatcher = ReflectionHelper.findMethod( PlayerChunkMap.class, pm, new String[] { "getOrCreateChunkWatcher", "func_72690_a" }, int.class, int.class, boolean.class );
|
||||
getEntry = ReflectionHelper.findMethod( PlayerChunkMap.class, pm, new String[] { "getEntry", "func_187301_b" }, int.class, int.class );
|
||||
}
|
||||
|
||||
if( getOrCreateChunkWatcher != null )
|
||||
if( getEntry != null )
|
||||
{
|
||||
final Object playerInstance = getOrCreateChunkWatcher.invoke( pm, c.xPosition, c.zPosition, false );
|
||||
final PlayerChunkMapEntry playerInstance = (PlayerChunkMapEntry) getEntry.invoke( pm, c.xPosition, c.zPosition );
|
||||
if( playerInstance != null )
|
||||
{
|
||||
Platform.playerInstance = playerInstance.getClass();
|
||||
|
||||
if( sendToAllPlayersWatchingChunk == null )
|
||||
{
|
||||
sendToAllPlayersWatchingChunk = ReflectionHelper.findMethod( Platform.playerInstance, playerInstance, new String[] { "sendToAllPlayersWatchingChunk", "func_151251_a" }, Packet.class );
|
||||
}
|
||||
|
||||
if( sendToAllPlayersWatchingChunk != null )
|
||||
{
|
||||
sendToAllPlayersWatchingChunk.invoke( playerInstance, new SPacketChunkData( c, verticalBits ) );
|
||||
}
|
||||
playerInstance.sendPacket( new SPacketChunkData( c, verticalBits ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.List;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -48,9 +49,8 @@ public class AEItemDef
|
||||
private String displayName;
|
||||
@SideOnly( Side.CLIENT )
|
||||
private List tooltip;
|
||||
//TODO 1.9.4 - UniqueIdentifier => ?
|
||||
@SideOnly( Side.CLIENT )
|
||||
private UniqueIdentifier uniqueID;
|
||||
private ResourceLocation uniqueID;
|
||||
private OreReference isOre;
|
||||
|
||||
public AEItemDef( final Item it )
|
||||
@@ -176,12 +176,12 @@ public class AEItemDef
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
UniqueIdentifier getUniqueID()
|
||||
ResourceLocation getUniqueID()
|
||||
{
|
||||
return this.uniqueID;
|
||||
}
|
||||
|
||||
UniqueIdentifier setUniqueID( final UniqueIdentifier uniqueID )
|
||||
ResourceLocation setUniqueID( final ResourceLocation uniqueID )
|
||||
{
|
||||
this.uniqueID = uniqueID;
|
||||
return uniqueID;
|
||||
|
||||
@@ -35,7 +35,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -591,7 +591,6 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
return this.getDefinition().getDisplayName();
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - UniqueIdentifier => ResourceLocation ?
|
||||
@SideOnly( Side.CLIENT )
|
||||
public String getModID()
|
||||
{
|
||||
@@ -600,17 +599,17 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
return this.getModName( this.getDefinition().getUniqueID() );
|
||||
}
|
||||
|
||||
return this.getModName( this.getDefinition().setUniqueID( GameRegistry.findUniqueIdentifierFor( this.getDefinition().getItem() ) ) );
|
||||
return this.getModName( this.getDefinition().setUniqueID( Item.REGISTRY.getNameForObject( this.getDefinition().getItem() ) ) );
|
||||
}
|
||||
|
||||
private String getModName( final UniqueIdentifier uniqueIdentifier )
|
||||
private String getModName( final ResourceLocation uniqueIdentifier )
|
||||
{
|
||||
if( uniqueIdentifier == null )
|
||||
{
|
||||
return "** Null";
|
||||
}
|
||||
|
||||
return uniqueIdentifier.modId == null ? "** Null" : uniqueIdentifier.modId;
|
||||
return uniqueIdentifier.getResourceDomain() == null ? "** Null" : uniqueIdentifier.getResourceDomain();
|
||||
}
|
||||
|
||||
IAEItemStack getLow( final FuzzyMode fuzzy, final boolean ignoreMeta )
|
||||
|
||||
Reference in New Issue
Block a user