All the patches done? Some code fixups.. It begins.

This commit is contained in:
cpw committed 2015-11-13 02:32:08 -05:00
1 parent a26c4017b1
commit da03639bd7
20 files changed
+1081 -17

No files matched your search

@@ -31,7 +31,7 @@ public class FMLDeobfTweaker implements ITweaker {
classLoader.registerTransformer(transformer);
}
classLoader.registerTransformer("net.minecraftforge.fml.common.asm.transformers.ModAccessTransformer");
// classLoader.registerTransformer("net.minecraftforge.fml.common.asm.transformers.ItemStackTransformer");
classLoader.registerTransformer("net.minecraftforge.fml.common.asm.transformers.ItemStackTransformer");
try
{
FMLRelaunchLog.fine("Validating minecraft");
@@ -62,7 +62,7 @@ public class PacketLoggingHandler
{
String prefix = (direction == EnumPacketDirection.SERVERBOUND ? "SERVER: C->S" : "CLIENT: S->C");
@Override
protected void decode(ChannelHandlerContext context, ByteBuf input, List output)
protected void decode(ChannelHandlerContext context, ByteBuf input, List output) throws Exception
{
super.decode(context, input, output);
for (ByteBuf pkt : (List<ByteBuf>)output)
@@ -77,7 +77,7 @@ public class PacketLoggingHandler
{
String prefix = (direction == EnumPacketDirection.SERVERBOUND ? "SERVER: S->C" : "CLIENT: C->S");
@Override
protected void encode(ChannelHandlerContext context, ByteBuf input, ByteBuf output)
protected void encode(ChannelHandlerContext context, ByteBuf input, ByteBuf output) throws Exception
{
input.markReaderIndex();
FMLLog.log(Level.DEBUG, "%s:\n%s", prefix, ByteBufUtils.getContentDump(input));
@@ -306,14 +306,14 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet> imple
}
else
{
manager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<?>>()
manager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<? super Void>>()
{
@Override
public void operationComplete(Future<?> result)
public void operationComplete(Future<? super Void> result)
{
manager.closeChannel(chatcomponenttext);
}
});
}, new GenericFutureListener[0]);
}
manager.channel().config().setAutoRead(false);
}
@@ -3,8 +3,6 @@ package net.minecraftforge.fml.common.network.internal;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import java.util.List;
import org.apache.logging.log4j.Level;
import net.minecraft.client.entity.EntityPlayerSP;
@@ -128,7 +126,7 @@ public class EntitySpawnHandler extends SimpleChannelInboundHandler<FMLMessage.E
if (spawnMsg.dataWatcherList != null)
{
entity.getDataWatcher().updateWatchedObjectsFromList((List<?>) spawnMsg.dataWatcherList);
entity.getDataWatcher().updateWatchedObjectsFromList(spawnMsg.dataWatcherList);
}
if (spawnMsg.throwerId > 0)
@@ -157,8 +157,7 @@ public abstract class FMLMessage {
double speedScaledX;
double speedScaledY;
double speedScaledZ;
@SuppressWarnings("rawtypes")
List dataWatcherList;
List<DataWatcher.WatchableObject> dataWatcherList;
ByteBuf dataStream;
public EntitySpawnMessage() {}
@@ -38,7 +38,10 @@ import net.minecraft.util.RegistryNamespacedDefaultedByKey;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Tuple;
import net.minecraft.village.MerchantRecipeList;
import net.minecraft.world.gen.structure.StructureComponent;
import net.minecraft.world.gen.structure.StructureVillagePieces;
import net.minecraft.world.gen.structure.StructureVillagePieces.PieceWeight;
import net.minecraft.world.gen.structure.StructureVillagePieces.Village;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -103,7 +106,7 @@ public class VillagerRegistry
* @param facing
* @param p5
*/
Object buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int p1,
Village buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List<StructureComponent> pieces, Random random, int p1,
int p2, int p3, EnumFacing facing, int p5);
}
@@ -181,17 +184,16 @@ public class VillagerRegistry
return Collections.unmodifiableCollection(instance().newVillagerIds);
}
public static void addExtraVillageComponents(@SuppressWarnings("rawtypes") ArrayList components, Random random, int i)
public static void addExtraVillageComponents(List<PieceWeight> list, Random random, int i)
{
@SuppressWarnings("unchecked")
List<StructureVillagePieces.PieceWeight> parts = components;
List<StructureVillagePieces.PieceWeight> parts = list;
for (IVillageCreationHandler handler : instance().villageCreationHandlers.values())
{
parts.add(handler.getVillagePieceWeight(random, i));
}
}
public static Object getVillageComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random,
public static Village getVillageComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List<StructureComponent> pieces, Random random,
int p1, int p2, int p3, EnumFacing facing, int p5)
{
return instance().villageCreationHandlers.get(villagePiece.villagePieceClass).buildComponent(villagePiece, startPiece, pieces, random, p1, p2, p3, facing, p5);