mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Update MCP mappings to snapshot_nodoc_20161220 (#3551)
This commit is contained in:
1 parent
1f4007e5d8
commit
5165dc52bf
88 files changed
+445
-436
No files matched your search
+2
-1
@@ -65,6 +65,7 @@ public class ItemStackTransformer implements IClassTransformer {
|
||||
MethodNode getItemMethod = null;
|
||||
for (MethodNode m: classNode.methods)
|
||||
{
|
||||
if (m.name.equals("getItemRaw")) continue;
|
||||
if (GETITEM_DESC.equals(m.desc) && getItemMethod == null)
|
||||
{
|
||||
getItemMethod = m;
|
||||
@@ -81,7 +82,7 @@ public class ItemStackTransformer implements IClassTransformer {
|
||||
|
||||
for (MethodNode m: classNode.methods)
|
||||
{
|
||||
if (m.name.equals("forgeInit") || m.name.equals("func_190926_b")) continue;
|
||||
if (m.name.equals("getItemRaw")) continue;
|
||||
for (ListIterator<AbstractInsnNode> it = m.instructions.iterator(); it.hasNext(); )
|
||||
{
|
||||
AbstractInsnNode insnNode = it.next();
|
||||
|
||||
@@ -163,7 +163,7 @@ public class ByteBufUtils {
|
||||
public static void writeItemStack(ByteBuf to, ItemStack stack)
|
||||
{
|
||||
PacketBuffer pb = new PacketBuffer(to);
|
||||
pb.writeItemStackToBuffer(stack);
|
||||
pb.writeItemStack(stack);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,7 +177,7 @@ public class ByteBufUtils {
|
||||
PacketBuffer pb = new PacketBuffer(from);
|
||||
try
|
||||
{
|
||||
return pb.readItemStackFromBuffer();
|
||||
return pb.readItemStack();
|
||||
} catch (IOException e)
|
||||
{
|
||||
// Unpossible?
|
||||
@@ -194,7 +194,7 @@ public class ByteBufUtils {
|
||||
public static void writeTag(ByteBuf to, NBTTagCompound tag)
|
||||
{
|
||||
PacketBuffer pb = new PacketBuffer(to);
|
||||
pb.writeNBTTagCompoundToBuffer(tag);
|
||||
pb.writeCompoundTag(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,7 +208,7 @@ public class ByteBufUtils {
|
||||
PacketBuffer pb = new PacketBuffer(from);
|
||||
try
|
||||
{
|
||||
return pb.readNBTTagCompoundFromBuffer();
|
||||
return pb.readCompoundTag();
|
||||
} catch (IOException e)
|
||||
{
|
||||
// Unpossible?
|
||||
|
||||
@@ -148,7 +148,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
|
||||
public List<NetworkDispatcher> selectNetworks(Object args, ChannelHandlerContext context, FMLProxyPacket packet)
|
||||
{
|
||||
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.builder();
|
||||
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
|
||||
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayers())
|
||||
{
|
||||
NetworkDispatcher dispatcher = player.connection.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
|
||||
if (dispatcher != null) builder.add(dispatcher);
|
||||
@@ -176,7 +176,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
|
||||
{
|
||||
int dimension = (Integer)args;
|
||||
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.builder();
|
||||
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
|
||||
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayers())
|
||||
{
|
||||
if (dimension == player.dimension)
|
||||
{
|
||||
@@ -210,7 +210,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
|
||||
{
|
||||
TargetPoint tp = (TargetPoint)args;
|
||||
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.builder();
|
||||
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList())
|
||||
for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayers())
|
||||
{
|
||||
if (player.dimension == tp.dimension)
|
||||
{
|
||||
|
||||
+1
-1
@@ -630,7 +630,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
|
||||
|
||||
private MultiPartCustomPayload(PacketBuffer preamble) throws IOException
|
||||
{
|
||||
channel = preamble.readStringFromBuffer(20);
|
||||
channel = preamble.readString(20);
|
||||
part_count = preamble.readUnsignedByte();
|
||||
int length = preamble.readInt();
|
||||
if (length <= 0 || length >= FMLProxyPacket.MAX_LENGTH)
|
||||
|
||||
@@ -54,8 +54,8 @@ public class OpenGuiHandler extends SimpleChannelInboundHandler<FMLMessage.OpenG
|
||||
|
||||
private void process(OpenGui msg)
|
||||
{
|
||||
EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
|
||||
player.openGui(msg.modId, msg.modGuiId, player.worldObj, msg.x, msg.y, msg.z);
|
||||
EntityPlayer player = FMLClientHandler.instance().getClient().player;
|
||||
player.openGui(msg.modId, msg.modGuiId, player.world, msg.x, msg.y, msg.z);
|
||||
player.openContainer.windowId = msg.windowId;
|
||||
}
|
||||
|
||||
|
||||
@@ -202,14 +202,11 @@ public class EntityRegistry
|
||||
* Once registered mob eggs can be created by using minecraft:spawn_egg with NBT entry 'entity_name' with
|
||||
* value of the name this class is registered in the classToStringMapping with.
|
||||
*
|
||||
* @param entityClass The entity class
|
||||
* @param name The entity ResourceLocation
|
||||
* @param primary Primary egg color
|
||||
* @param secondary Secondary egg color
|
||||
*
|
||||
* @throws IllegalArgumentException if entityClass is not registered in classToStringMapping.
|
||||
*
|
||||
*/
|
||||
|
||||
public static void registerEgg(ResourceLocation name, int primary, int secondary)
|
||||
{
|
||||
EntityEntry entry = ForgeRegistries.ENTITIES.getValue(name);
|
||||
@@ -222,7 +219,7 @@ public class EntityRegistry
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a spawn entry for the supplied entity in the supplied {@link BiomeGenBase} list
|
||||
* Add a spawn entry for the supplied entity in the supplied {@link Biome} list
|
||||
* @param entityClass Entity class added
|
||||
* @param weightedProb Probability
|
||||
* @param min Min spawn count
|
||||
@@ -256,7 +253,7 @@ public class EntityRegistry
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a spawn entry for the supplied entity in the supplied {@link BiomeGenBase} list
|
||||
* Add a spawn entry for the supplied entity in the supplied {@link Biome} list
|
||||
* @param entityName The entity name
|
||||
* @param weightedProb Probability
|
||||
* @param min Min spawn count
|
||||
@@ -352,7 +349,7 @@ public class EntityRegistry
|
||||
EntityRegistration er = lookupModSpawn(entity.getClass(), true);
|
||||
if (er != null)
|
||||
{
|
||||
entityTracker.addEntityToTracker(entity, er.getTrackingRange(), er.getUpdateFrequency(), er.sendsVelocityUpdates());
|
||||
entityTracker.track(entity, er.getTrackingRange(), er.getUpdateFrequency(), er.sendsVelocityUpdates());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -375,7 +375,7 @@ public class GameRegistry
|
||||
if (item == null)
|
||||
{
|
||||
FMLLog.getLogger().log(Level.TRACE, "Unable to find item with name {}", itemName);
|
||||
return ItemStack.field_190927_a;
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
ItemStack is = new ItemStack(item, stackSize, meta);
|
||||
if (!Strings.isNullOrEmpty(nbtString))
|
||||
|
||||
Reference in new issue
Block a user