Update to 1.10

This commit is contained in:
cpw committed 2016-06-23 02:39:55 -04:00
1 parent 3fbf8c9960
commit 260be68723
162 files changed
+1930 -1016

No files matched your search

@@ -20,7 +20,7 @@
package net.minecraftforge.client;
import net.minecraft.util.Util.EnumOS;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.GameType;
import net.minecraft.client.settings.GameSettings.Options;
import net.minecraftforge.common.util.EnumHelper;
@@ -478,7 +478,6 @@ public class GuiIngameForge extends GuiIngame
FoodStats stats = mc.thePlayer.getFoodStats();
int level = stats.getFoodLevel();
int levelLast = stats.getPrevFoodLevel();
for (int i = 0; i < 10; ++i)
{
@@ -502,14 +501,6 @@ public class GuiIngameForge extends GuiIngame
drawTexturedModalRect(x, y, 16 + background * 9, 27, 9, 9);
if (unused)
{
if (idx < levelLast)
drawTexturedModalRect(x, y, icon + 54, 27, 9, 9);
else if (idx == levelLast)
drawTexturedModalRect(x, y, icon + 63, 27, 9, 9);
}
if (idx < level)
drawTexturedModalRect(x, y, icon + 36, 27, 9, 9);
else if (idx == level)
@@ -90,7 +90,7 @@ import net.minecraft.util.text.event.ClickEvent;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.GameType;
import net.minecraft.world.storage.loot.LootEntry;
import net.minecraft.world.storage.loot.LootTable;
import net.minecraft.world.storage.loot.LootTableManager;
@@ -682,7 +682,7 @@ public class ForgeHooks
if (gameType.isAdventure())
{
if (gameType == WorldSettings.GameType.SPECTATOR)
if (gameType == GameType.SPECTATOR)
preCancelEvent = true;
if (!entityPlayer.isAllowEdit())
@@ -56,11 +56,11 @@ public class ForgeVersion
//This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version
public static final int revisionVersion = 0;
//This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code.
public static final int buildVersion = 0;
public static final int buildVersion = 9999;
// This is the minecraft version we're building for - used in various places in Forge/FML code
public static final String mcVersion = "1.9.4";
public static final String mcVersion = "1.10";
// This is the MCP data version we're using
public static final String mcpVersion = "9.28";
public static final String mcpVersion = "9.32";
@SuppressWarnings("unused")
private static Status status = PENDING;
@SuppressWarnings("unused")
@@ -158,7 +158,7 @@ public class BlockSnapshot implements Serializable
public TileEntity getTileEntity()
{
if (getNbt() != null)
return TileEntity.create(getNbt());
return TileEntity.func_190200_a(getWorld(), getNbt());
else return null;
}
@@ -134,7 +134,7 @@ public class PopulateChunkEvent extends ChunkGeneratorEvent
/** Use CUSTOM to filter custom event types
*/
public static enum EventType { DUNGEON, FIRE, GLOWSTONE, ICE, LAKE, LAVA, NETHER_LAVA, NETHER_LAVA2, ANIMALS, CUSTOM }
public static enum EventType { DUNGEON, FIRE, GLOWSTONE, ICE, LAKE, LAVA, NETHER_LAVA, NETHER_LAVA2, NETHER_MAGMA, ANIMALS, CUSTOM }
private final EventType type;
@@ -63,7 +63,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem
private ItemStack fillContainer(IBlockSource source, ItemStack stack)
{
World world = source.getWorld();
EnumFacing dispenserFacing = BlockDispenser.getFacing(source.getBlockMetadata());
EnumFacing dispenserFacing = source.func_189992_e().getValue(BlockDispenser.FACING);
BlockPos blockpos = source.getBlockPos().offset(dispenserFacing);
ItemStack result = FluidUtil.tryPickUpFluid(stack, null, world, blockpos, dispenserFacing.getOpposite());
@@ -100,7 +100,7 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem
}
FluidStack fluidStack = fluidHandler.drain(Fluid.BUCKET_VOLUME, false);
EnumFacing dispenserFacing = BlockDispenser.getFacing(source.getBlockMetadata());
EnumFacing dispenserFacing = source.func_189992_e().getValue(BlockDispenser.FACING);
BlockPos blockpos = source.getBlockPos().offset(dispenserFacing);
if (fluidStack != null && fluidStack.amount == Fluid.BUCKET_VOLUME && FluidUtil.tryPlaceFluid(null, source.getWorld(), fluidStack, blockpos))
@@ -225,6 +225,7 @@ public class FMLModContainer implements ModContainer
String mcVersionString = (String)descriptor.get("acceptedMinecraftVersions");
if ("[1.8.8]".equals(mcVersionString)) mcVersionString = "[1.8.8,1.8.9]"; // MC 1.8.8 and 1.8.9 is forward SRG compatible so accept these versions by default.
if ("[1.9.4]".equals(mcVersionString) || "[1.9,1.9.4]".equals(mcVersionString)) mcVersionString = "[1.9.4,1.10]"; // MC 1.8.8 and 1.8.9 is forward SRG compatible so accept these versions by default.
if (!Strings.isNullOrEmpty(mcVersionString))
{
minecraftAccepted = VersionParser.parseRange(mcVersionString);
@@ -267,7 +267,7 @@ public class FMLDeobfuscatingRemapper extends Remapper {
return name;
}
Map<String, String> fieldMap = getFieldMap(owner);
return fieldMap!=null && fieldMap.containsKey(name+":"+desc) ? fieldMap.get(name+":"+desc) : name;
return fieldMap!=null && fieldMap.containsKey(name+":"+desc) ? fieldMap.get(name+":"+desc) : fieldMap!=null && fieldMap.containsKey(name+":null") ? fieldMap.get(name+":null") :name;
}
@Override
@@ -443,7 +443,7 @@ public class FMLDeobfuscatingRemapper extends Remapper {
public String getStaticFieldType(String oldType, String oldName, String newType, String newName)
{
String fType = getFieldType(oldType, oldName);
String fType = getFieldType(newType, newName);
if (oldType.equals(newType))
{
return fType;
@@ -28,6 +28,7 @@ import com.google.common.collect.Maps;
import org.apache.commons.lang3.Validate;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.monster.ZombieType;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.passive.EntityVillager.ITradeList;
import net.minecraft.util.EnumFacing;
@@ -355,8 +356,8 @@ public class VillagerRegistry
{
if (prof == null)
{
if (entity.getVillagerType() != 0)
entity.setVillagerType(-1);
if (entity.func_189777_di() != ZombieType.NORMAL)
entity.func_189778_a(ZombieType.NORMAL);
return;
}
@@ -366,21 +367,31 @@ public class VillagerRegistry
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof);
}
if (network != entity.getVillagerType())
entity.setVillagerType(network);
if (network >= 0 && network < 5) // Vanilla
{
if (entity.func_189777_di() == null || entity.func_189777_di().func_190150_a() != network + 1)
{
entity.func_189778_a(ZombieType.func_190144_b(network));
}
}
else if (entity.func_189777_di() != null)
entity.func_189778_a(null);
}
public static void onSetProfession(EntityZombie entity, int network)
public static void onSetProfession(EntityZombie entity, ZombieType type, int network)
{
if (network == -1)
if (type == ZombieType.NORMAL || type == ZombieType.HUSK)
{
if (entity.getVillagerTypeForge() != null)
entity.setVillagerType(null);
return;
}
VillagerProfession prof = INSTANCE.professions.getObjectById(network);
if (prof == null && network != 0 || INSTANCE.professions.getId(prof) != network)
int realID = network - 1;
if (type == null) //Forge type?
realID = network * -1; // Forge encoded as -ID
VillagerProfession prof = INSTANCE.professions.getObjectById(realID);
if (prof == null && network != 0 || INSTANCE.professions.getId(prof) != realID)
{
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + network + " " + prof);
throw new RuntimeException("Attempted to set villager profession to unregistered profession: " + realID + " " + prof);
}
if (prof != entity.getVillagerTypeForge())