Update licencing information to make clear that forge is allowed to redistribute and automatically

download parts of MCP, but this permission is not transitive to people distributing MinecraftForge
source independently of the MinecraftForge project.

Update MCP to 7.26a and FML: 7ad8529
7ad8529 Update MCP to MCP7.26a and refresh MCP names
15534ed Update address of the FML repository to the new location in all the files
a14ab91 Update license text to make clear that FML is not a way to sidestep MCP licensing.
This commit is contained in:
Christian 2013-01-20 10:58:07 -05:00
parent 1155235d92
commit fe2d3244d7
24 changed files with 114 additions and 103 deletions

View file

@ -25,7 +25,7 @@ public class ChestGenHooks
private static final HashMap<String, ChestGenHooks> chestInfo = new HashMap<String, ChestGenHooks>();
private static boolean hasInit = false;
static
static
{
init();
}
@ -49,10 +49,10 @@ public class ChestGenHooks
addInfo(VILLAGE_BLACKSMITH, ComponentVillageHouse2.villageBlacksmithChestContents, 3, 9);
addInfo(BONUS_CHEST, WorldServer.bonusChestContent, 10, 10);
ItemStack book = new ItemStack(Item.field_92053_bW, 1, 0);
ItemStack book = new ItemStack(Item.enchantedBook, 1, 0);
WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
getInfo(MINESHAFT_CORRIDOR ).addItem(tmp);
getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
getInfo(STRONGHOLD_LIBRARY ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
@ -77,7 +77,7 @@ public class ChestGenHooks
addDungeonLoot(d, new ItemStack(Item.dyePowder, 1, 3), 100, 1, 1);
addDungeonLoot(d, book, 100, 1, 1);
}
static void addDungeonLoot(ChestGenHooks dungeon, ItemStack item, int weight, int min, int max)
{
dungeon.addItem(new WeightedRandomChestContent(item, min, max, weight));
@ -90,7 +90,7 @@ public class ChestGenHooks
/**
* Retrieves, or creates the info class for the specified category.
*
*
* @param category The category name
* @return A instance of ChestGenHooks for the specified category.
*/
@ -105,14 +105,14 @@ public class ChestGenHooks
/**
* Generates an array of items based on the input min/max count.
* If the stack can not hold the total amount, it will be split into
* If the stack can not hold the total amount, it will be split into
* stacks of size 1.
*
*
* @param rand A random number generator
* @param source Source item stack
* @param min Minimum number of items
* @param max Maximum number of items
* @return An array containing the generated item stacks
* @return An array containing the generated item stacks
*/
public static ItemStack[] generateStacks(Random rand, ItemStack source, int min, int max)
{
@ -158,7 +158,7 @@ public class ChestGenHooks
{
this.category = category;
}
public ChestGenHooks(String category, WeightedRandomChestContent[] items, int min, int max)
{
this(category);
@ -169,21 +169,21 @@ public class ChestGenHooks
countMin = min;
countMax = max;
}
/**
* Adds a new entry into the possible items to generate.
*
*
* @param item The item to add.
*/
public void addItem(WeightedRandomChestContent item)
{
contents.add(item);
}
/**
* Removes all items that match the input item stack, Only metadata and item ID are checked.
* If the input item has a metadata of -1, all metadatas will match.
*
*
* @param item The item to check
*/
public void removeItem(ItemStack item)
@ -201,13 +201,13 @@ public class ChestGenHooks
/**
* Gets an array of all random objects that are associated with this category.
*
*
* @return The random objects
*/
public WeightedRandomChestContent[] getItems(Random rnd)
{
ArrayList<WeightedRandomChestContent> ret = new ArrayList<WeightedRandomChestContent>();
for (WeightedRandomChestContent orig : contents)
{
Item item = orig.theItemId.getItem();
@ -227,7 +227,7 @@ public class ChestGenHooks
/**
* Gets a random number between countMin and countMax.
*
*
* @param rand A RNG
* @return A random number where countMin <= num <= countMax
*/
@ -235,11 +235,11 @@ public class ChestGenHooks
{
return countMin < countMax ? countMin + rand.nextInt(countMax - countMin) : countMin;
}
/**
* Returns a single ItemStack from the possible items in this registry,
* Useful if you just want a quick and dirty random Item.
*
*
* @param rand A Random Number gen
* @return A single ItemStack, or null if it could not get one.
*/

View file

@ -18,3 +18,9 @@ ScotTools Background: ScotTools was an API that enabled modders to add blocks to
* LexManos *
* cpw *
* Minecraft Coder Pack (MCP) *
Forge Mod Loader and Minecraft Forge have permission to distribute and automatically download components of MCP and distribute MCP data files.
This permission is not transitive and others wishing to redistribute the Minecraft Forge source independently should seek permission of MCP or
remove the MCP data files and request their users to download MCP separately.

View file

@ -63,3 +63,8 @@ minecraft original sources.
Modification of Minecraft Forge as well as dependencies, including patches to
minecraft original sources, has to remain under the terms of the present
license.
The right to distribute Minecraft Forge does not extend to the right to distribute
MCP data files included within Minecraft Forge. These are the property of the MCP
project and should be removed from any customized distribution of Minecraft Forge
or permission sought separately from the MCP team.

View file

@ -38,7 +38,7 @@
+ boolean result = !ForgeEventFactory.onPlayerInteract(thePlayer, Action.RIGHT_CLICK_AIR, 0, 0, 0, -1).isCanceled();
+ if (result && var9 != null && this.playerController.sendUseItem(this.thePlayer, this.theWorld, var9))
{
this.entityRenderer.itemRenderer.func_78445_c();
this.entityRenderer.itemRenderer.resetEquippedProgress2();
}
@@ -2041,6 +2047,18 @@
if (this.theIntegratedServer != null)

View file

@ -23,7 +23,7 @@
}
/**
@@ -290,6 +296,12 @@
@@ -289,6 +295,12 @@
*/
protected void updateWeather()
{

View file

@ -24,22 +24,22 @@
float var12 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI);
- byte var13 = 1;
-
- if (par1EntityItem.func_92014_d().stackSize > 1)
- if (par1EntityItem.getEntityItem().stackSize > 1)
- {
- var13 = 2;
- }
-
- if (par1EntityItem.func_92014_d().stackSize > 5)
- if (par1EntityItem.getEntityItem().stackSize > 5)
- {
- var13 = 3;
- }
-
- if (par1EntityItem.func_92014_d().stackSize > 20)
- if (par1EntityItem.getEntityItem().stackSize > 20)
- {
- var13 = 4;
- }
-
- if (par1EntityItem.func_92014_d().stackSize > 40)
- if (par1EntityItem.getEntityItem().stackSize > 40)
- {
- var13 = 5;
- }
@ -119,7 +119,7 @@
{
@@ -232,39 +211,27 @@
var17 = 0.021875F;
ItemStack var18 = par1EntityItem.func_92014_d();
ItemStack var18 = par1EntityItem.getEntityItem();
int var19 = var18.stackSize;
- byte var24;
-

View file

@ -32,7 +32,7 @@
+ */
+ public static void addToBookList(Enchantment enchantment)
+ {
+ ObjectArrays.concat(field_92038_c, enchantment);
+ ObjectArrays.concat(field_92090_c, enchantment);
+ }
+
static

View file

@ -12,22 +12,22 @@
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
@@ -29,6 +34,11 @@
@@ -30,6 +35,11 @@
/** The EntityItem's random initial float height. */
public float hoverStart;
+
+ /**
+ * The maximum age of this EntityItem. The item is expired once this is reached.
+ */
+ public int lifespan = 6000;
+
public EntityItem(World par1World, double par2, double par4, double par6)
{
super(par1World);
@@ -49,6 +59,7 @@
{
this(par1World, par2, par4, par6);
this.func_92013_a(par8ItemStack);
this.func_92058_a(par8ItemStack);
+ this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World));
}
@ -42,7 +42,7 @@
+ if (!this.worldObj.isRemote && this.age >= lifespan)
+ {
+ if (item != null)
+ {
+ {
+ ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj)));
+ if (MinecraftForge.EVENT_BUS.post(event))
+ {
@ -69,13 +69,13 @@
par1NBTTagCompound.setShort("Age", (short)this.age);
+ par1NBTTagCompound.setInteger("Lifespan", lifespan);
if (this.func_92014_d() != null)
if (this.getEntityItem() != null)
{
@@ -280,10 +314,17 @@
NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item");
this.func_92013_a(ItemStack.loadItemStackFromNBT(var2));
this.func_92058_a(ItemStack.loadItemStackFromNBT(var2));
- if (this.func_92014_d() == null)
- if (this.getEntityItem() == null)
+ ItemStack item = getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (item == null || item.stackSize <= 0)
@ -106,7 +106,7 @@
+ return;
+ }
+
ItemStack var2 = this.func_92014_d();
ItemStack var2 = this.getEntityItem();
int var3 = var2.stackSize;
- if (this.delayBeforeCanPickup == 0 && par1EntityPlayer.inventory.addItemStackToInventory(var2))

View file

@ -570,7 +570,7 @@
{
ItemStack var2 = par1EntityPlayer.inventory.getCurrentItem();
@@ -1354,4 +1240,375 @@
@@ -1366,4 +1252,375 @@
{
return this.dataWatcher.getWatchableObjectInt(18);
}

View file

@ -69,7 +69,7 @@
+ return;
+ }
+
this.mcServer.getConfigurationManager().func_92027_k(par1DamageSource.getDeathMessage(this));
this.mcServer.getConfigurationManager().sendChatMsg(par1DamageSource.getDeathMessage(this));
if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{

View file

@ -340,7 +340,7 @@
+ {
+ if (this instanceof ItemEnchantedBook)
+ {
+ return ((ItemEnchantedBook)this).func_92058_a(rnd,
+ return ((ItemEnchantedBook)this).func_92112_a(rnd,
+ original.theMinimumChanceToGenerateItem,
+ original.theMaximumChanceToGenerateItem, original.itemWeight);
+ }

View file

@ -2,7 +2,7 @@
+++ ../src_work/minecraft/net/minecraft/item/crafting/RecipeFireworks.java
@@ -91,9 +91,9 @@
{
this.field_92050_a = new ItemStack(Item.field_92052_bU);
this.field_92102_a = new ItemStack(Item.firework);
+ var15 = new NBTTagCompound();
if (var6 > 0)
@ -15,12 +15,12 @@
var18.setTag("Explosions", var25);
var18.setByte("Flight", (byte)var4);
var15.setTag("Fireworks", var18);
- this.field_92050_a.setTagCompound(var15);
- this.field_92102_a.setTagCompound(var15);
- }
-
+ }
+
+ this.field_92050_a.setTagCompound(var15);
+ this.field_92102_a.setTagCompound(var15);
return true;
}
else if (var4 == 1 && var3 == 0 && var6 == 0 && var5 > 0 && var8 <= 1)

View file

@ -10,7 +10,7 @@
import java.util.zip.Inflater;
@@ -26,6 +27,9 @@
private int dataLength;
private boolean field_92024_h;
private boolean field_92076_h;
private static byte[] chunkDataNotCompressed = new byte[0];
+ private int maxLen = 0;
+
@ -83,4 +83,4 @@
+
par1DataOutputStream.writeShort(this.chunkPostX.length);
par1DataOutputStream.writeInt(this.dataLength);
par1DataOutputStream.writeBoolean(this.field_92024_h);
par1DataOutputStream.writeBoolean(this.field_92076_h);

View file

@ -25,8 +25,8 @@
+ int var3 = 0;
+ for (Integer id : DimensionManager.getIDs())
{
- this.displayStrings[5 + var3] = "Lvl " + var3 + " tick: " + field_79020_a.format(this.func_79015_a(this.field_79017_e.timeOfLastDimensionTick[var3]) * 1.0E-6D) + " ms";
+ this.displayStrings[5 + var3] = "Lvl " + id + " tick: " + field_79020_a.format(this.func_79015_a(this.field_79017_e.worldTickTimes.get(id)) * 1.0E-6D) + " ms";
- this.displayStrings[5 + var3] = "Lvl " + var3 + " tick: " + field_79020_a.format(this.calcArrayAverage(this.field_79017_e.timeOfLastDimensionTick[var3]) * 1.0E-6D) + " ms";
+ this.displayStrings[5 + var3] = "Lvl " + id + " tick: " + field_79020_a.format(this.calcArrayAverage(this.field_79017_e.worldTickTimes.get(id)) * 1.0E-6D) + " ms";
- if (this.field_79017_e.worldServers[var3] != null && this.field_79017_e.worldServers[var3].theChunkProviderServer != null)
+ WorldServer world = DimensionManager.getWorld(id);

View file

@ -55,7 +55,7 @@
WorldServer var5 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension);
+
par1EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet9Respawn(par1EntityPlayerMP.dimension, (byte)par1EntityPlayerMP.worldObj.difficultySetting, var5.getWorldInfo().getTerrainType(), var5.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType()));
var4.removeEntity(par1EntityPlayerMP);
var4.removePlayerEntityDangerously(par1EntityPlayerMP);
par1EntityPlayerMP.isDead = false;
- this.transferEntityToWorld(par1EntityPlayerMP, var3, var4, var5);
+ this.transferEntityToWorld(par1EntityPlayerMP, var3, var4, var5, teleporter);

View file

@ -138,8 +138,8 @@
+ return Block.blocksList[var4] != null && Block.blocksList[var4].hasTileEntity(meta);
}
public int func_85175_e(int par1, int par2, int par3)
@@ -1127,7 +1183,7 @@
/**
@@ -1130,7 +1186,7 @@
*/
public boolean isDaytime()
{
@ -148,7 +148,7 @@
}
/**
@@ -1159,7 +1215,7 @@
@@ -1162,7 +1218,7 @@
int var12 = this.getBlockMetadata(var8, var9, var10);
Block var13 = Block.blocksList[var11];
@ -157,7 +157,7 @@
{
MovingObjectPosition var14 = var13.collisionRayTrace(this, var8, var9, var10, par1Vec3, par2Vec3);
@@ -1359,6 +1415,12 @@
@@ -1362,6 +1418,12 @@
*/
public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4)
{
@ -170,7 +170,7 @@
if (par1Entity != null && par2Str != null)
{
for (int var5 = 0; var5 < this.worldAccesses.size(); ++var5)
@@ -1373,6 +1435,12 @@
@@ -1376,6 +1438,12 @@
*/
public void playSoundToNearExcept(EntityPlayer par1EntityPlayer, String par2Str, float par3, float par4)
{
@ -183,7 +183,7 @@
if (par1EntityPlayer != null && par2Str != null)
{
for (int var5 = 0; var5 < this.worldAccesses.size(); ++var5)
@@ -1459,6 +1527,11 @@
@@ -1462,6 +1530,11 @@
EntityPlayer var5 = (EntityPlayer)par1Entity;
this.playerEntities.add(var5);
this.updateAllPlayersSleepingFlag();
@ -195,7 +195,7 @@
}
this.getChunkFromChunkCoords(var2, var3).addEntity(par1Entity);
@@ -1706,6 +1779,12 @@
@@ -1708,6 +1781,12 @@
* Calculates the color for the skybox
*/
public Vec3 getSkyColor(Entity par1Entity, float par2)
@ -208,7 +208,7 @@
{
float var3 = this.getCelestialAngle(par2);
float var4 = MathHelper.cos(var3 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
@@ -1801,6 +1880,12 @@
@@ -1803,6 +1882,12 @@
@SideOnly(Side.CLIENT)
public Vec3 drawClouds(float par1)
{
@ -221,7 +221,7 @@
float var2 = this.getCelestialAngle(par1);
float var3 = MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
@@ -1879,7 +1964,7 @@
@@ -1881,7 +1966,7 @@
{
int var5 = var3.getBlockID(par1, var4, par2);
@ -230,7 +230,7 @@
{
return var4 + 1;
}
@@ -1894,6 +1979,12 @@
@@ -1896,6 +1981,12 @@
* How bright are stars in the sky
*/
public float getStarBrightness(float par1)
@ -243,7 +243,7 @@
{
float var2 = this.getCelestialAngle(par1);
float var3 = 1.0F - (MathHelper.cos(var2 * (float)Math.PI * 2.0F) * 2.0F + 0.25F);
@@ -2038,16 +2129,8 @@
@@ -2040,16 +2131,8 @@
if (var2.isDead)
{
@ -262,7 +262,7 @@
}
this.theProfiler.endSection();
@@ -2095,7 +2178,7 @@
@@ -2097,7 +2180,7 @@
if (var11 != null)
{
@ -271,7 +271,7 @@
}
}
}
@@ -2104,6 +2187,10 @@
@@ -2106,6 +2189,10 @@
if (!this.entityRemoval.isEmpty())
{
@ -282,7 +282,7 @@
this.loadedTileEntityList.removeAll(this.entityRemoval);
this.entityRemoval.clear();
}
@@ -2124,18 +2211,18 @@
@@ -2126,18 +2213,18 @@
{
this.loadedTileEntityList.add(var12);
}
@ -305,7 +305,7 @@
}
}
@@ -2148,13 +2235,13 @@
@@ -2150,13 +2237,13 @@
public void addTileEntity(Collection par1Collection)
{
@ -326,7 +326,7 @@
}
}
@@ -2174,9 +2261,17 @@
@@ -2176,9 +2263,17 @@
{
int var3 = MathHelper.floor_double(par1Entity.posX);
int var4 = MathHelper.floor_double(par1Entity.posZ);
@ -347,7 +347,7 @@
{
par1Entity.lastTickPosX = par1Entity.posX;
par1Entity.lastTickPosY = par1Entity.posY;
@@ -2409,6 +2504,14 @@
@@ -2411,6 +2506,14 @@
{
return true;
}
@ -362,7 +362,7 @@
}
}
}
@@ -2714,25 +2817,21 @@
@@ -2716,25 +2819,21 @@
*/
public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
{
@ -403,7 +403,7 @@
}
}
@@ -2741,27 +2840,10 @@
@@ -2743,27 +2842,10 @@
*/
public void removeBlockTileEntity(int par1, int par2, int par3)
{
@ -435,7 +435,7 @@
}
}
@@ -2787,7 +2869,8 @@
@@ -2789,7 +2871,8 @@
*/
public boolean isBlockNormalCube(int par1, int par2, int par3)
{
@ -445,7 +445,7 @@
}
public boolean func_85174_u(int par1, int par2, int par3)
@@ -2810,8 +2893,7 @@
@@ -2812,8 +2895,7 @@
*/
public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3)
{
@ -455,7 +455,7 @@
}
/**
@@ -2827,7 +2909,7 @@
@@ -2829,7 +2911,7 @@
if (var5 != null && !var5.isEmpty())
{
Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)];
@ -464,7 +464,7 @@
}
else
{
@@ -2858,8 +2940,7 @@
@@ -2860,8 +2942,7 @@
*/
public void setAllowedSpawnTypes(boolean par1, boolean par2)
{
@ -474,7 +474,7 @@
}
/**
@@ -2875,6 +2956,11 @@
@@ -2877,6 +2958,11 @@
*/
private void calculateInitialWeather()
{
@ -486,7 +486,7 @@
if (this.worldInfo.isRaining())
{
this.rainingStrength = 1.0F;
@@ -2890,6 +2976,11 @@
@@ -2892,6 +2978,11 @@
* Updates all weather states.
*/
protected void updateWeather()
@ -498,7 +498,7 @@
{
if (!this.provider.hasNoSky)
{
@@ -2987,12 +3078,14 @@
@@ -2989,12 +3080,14 @@
public void toggleRain()
{
@ -514,7 +514,7 @@
this.theProfiler.startSection("buildList");
int var1;
EntityPlayer var2;
@@ -3099,6 +3192,11 @@
@@ -3101,6 +3194,11 @@
*/
public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4)
{
@ -526,7 +526,7 @@
BiomeGenBase var5 = this.getBiomeGenForCoords(par1, par3);
float var6 = var5.getFloatTemperature();
@@ -3156,6 +3254,11 @@
@@ -3158,6 +3256,11 @@
* Tests whether or not snow can be placed at a given location
*/
public boolean canSnowAt(int par1, int par2, int par3)
@ -538,7 +538,7 @@
{
BiomeGenBase var4 = this.getBiomeGenForCoords(par1, par3);
float var5 = var4.getFloatTemperature();
@@ -3249,7 +3352,7 @@
@@ -3251,7 +3354,7 @@
private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6)
{
@ -547,7 +547,7 @@
int var8 = this.getSavedLightValue(EnumSkyBlock.Block, par2 - 1, par3, par4) - par6;
int var9 = this.getSavedLightValue(EnumSkyBlock.Block, par2 + 1, par3, par4) - par6;
int var10 = this.getSavedLightValue(EnumSkyBlock.Block, par2, par3 - 1, par4) - par6;
@@ -3384,7 +3487,7 @@
@@ -3386,7 +3489,7 @@
int var21 = var24 + (var18 / 2 + 1) % 3 / 2 * var19;
int var22 = var12 + (var18 / 2 + 2) % 3 / 2 * var19;
var14 = this.getSavedLightValue(par1EnumSkyBlock, var20, var21, var22);
@ -556,7 +556,7 @@
if (var23 == 0)
{
@@ -3415,7 +3518,7 @@
@@ -3417,7 +3520,7 @@
var12 = (var9 >> 12 & 63) - 32 + par4;
var13 = this.getSavedLightValue(par1EnumSkyBlock, var10, var24, var12);
var14 = this.getBlockId(var10, var24, var12);
@ -565,7 +565,7 @@
if (var15 == 0)
{
@@ -3517,10 +3620,10 @@
@@ -3519,10 +3622,10 @@
public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
{
this.entitiesWithinAABBExcludingEntity.clear();
@ -580,7 +580,7 @@
for (int var7 = var3; var7 <= var4; ++var7)
{
@@ -3546,10 +3649,10 @@
@@ -3548,10 +3651,10 @@
public List selectEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
{
@ -595,7 +595,7 @@
ArrayList var8 = new ArrayList();
for (int var9 = var4; var9 <= var5; ++var9)
@@ -3642,11 +3745,14 @@
@@ -3644,11 +3747,14 @@
*/
public void addLoadedEntities(List par1List)
{
@ -613,7 +613,7 @@
}
}
@@ -3680,6 +3786,11 @@
@@ -3682,6 +3788,11 @@
else
{
if (var9 != null && (var9 == Block.waterMoving || var9 == Block.waterStill || var9 == Block.lavaMoving || var9 == Block.lavaStill || var9 == Block.fire || var9.blockMaterial.isReplaceable()))
@ -625,7 +625,7 @@
{
var9 = null;
}
@@ -3897,7 +4008,7 @@
@@ -3899,7 +4010,7 @@
*/
public long getSeed()
{
@ -634,7 +634,7 @@
}
public long getTotalWorldTime()
@@ -3907,7 +4018,7 @@
@@ -3909,7 +4020,7 @@
public long getWorldTime()
{
@ -643,7 +643,7 @@
}
/**
@@ -3915,7 +4026,7 @@
@@ -3917,7 +4028,7 @@
*/
public void setWorldTime(long par1)
{
@ -652,7 +652,7 @@
}
/**
@@ -3923,13 +4034,13 @@
@@ -3925,13 +4036,13 @@
*/
public ChunkCoordinates getSpawnPoint()
{
@ -668,7 +668,7 @@
}
@SideOnly(Side.CLIENT)
@@ -3953,7 +4064,10 @@
@@ -3955,7 +4066,10 @@
if (!this.loadedEntityList.contains(par1Entity))
{
@ -680,7 +680,7 @@
}
}
@@ -3961,6 +4075,11 @@
@@ -3963,6 +4077,11 @@
* Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here.
*/
public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4)
@ -692,7 +692,7 @@
{
return true;
}
@@ -4081,8 +4200,7 @@
@@ -4083,8 +4202,7 @@
*/
public boolean isBlockHighHumidity(int par1, int par2, int par3)
{
@ -702,7 +702,7 @@
}
/**
@@ -4157,7 +4275,7 @@
@@ -4159,7 +4277,7 @@
*/
public int getHeight()
{
@ -711,7 +711,7 @@
}
/**
@@ -4165,7 +4283,7 @@
@@ -4167,7 +4285,7 @@
*/
public int getActualHeight()
{
@ -720,7 +720,7 @@
}
public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart)
@@ -4208,7 +4326,7 @@
@@ -4210,7 +4328,7 @@
*/
public double getHorizon()
{
@ -729,7 +729,7 @@
}
/**
@@ -4269,4 +4387,75 @@
@@ -4271,4 +4389,75 @@
@SideOnly(Side.CLIENT)
public void func_92088_a(double par1, double par3, double par5, double par7, double par9, double par11, NBTTagCompound par13NBTTagCompound) {}

View file

@ -37,7 +37,7 @@
private ItemStack pickCheckLootItem(Random par1Random)
{
- int var2 = par1Random.nextInt(12);
- return var2 == 0 ? new ItemStack(Item.saddle) : (var2 == 1 ? new ItemStack(Item.ingotIron, par1Random.nextInt(4) + 1) : (var2 == 2 ? new ItemStack(Item.bread) : (var2 == 3 ? new ItemStack(Item.wheat, par1Random.nextInt(4) + 1) : (var2 == 4 ? new ItemStack(Item.gunpowder, par1Random.nextInt(4) + 1) : (var2 == 5 ? new ItemStack(Item.silk, par1Random.nextInt(4) + 1) : (var2 == 6 ? new ItemStack(Item.bucketEmpty) : (var2 == 7 && par1Random.nextInt(100) == 0 ? new ItemStack(Item.appleGold) : (var2 == 8 && par1Random.nextInt(2) == 0 ? new ItemStack(Item.redstone, par1Random.nextInt(4) + 1) : (var2 == 9 && par1Random.nextInt(10) == 0 ? new ItemStack(Item.itemsList[Item.record13.itemID + par1Random.nextInt(2)]) : (var2 == 10 ? new ItemStack(Item.dyePowder, 1, 3) : (var2 == 11 ? Item.field_92053_bW.func_92055_a(par1Random) : null)))))))))));
- return var2 == 0 ? new ItemStack(Item.saddle) : (var2 == 1 ? new ItemStack(Item.ingotIron, par1Random.nextInt(4) + 1) : (var2 == 2 ? new ItemStack(Item.bread) : (var2 == 3 ? new ItemStack(Item.wheat, par1Random.nextInt(4) + 1) : (var2 == 4 ? new ItemStack(Item.gunpowder, par1Random.nextInt(4) + 1) : (var2 == 5 ? new ItemStack(Item.silk, par1Random.nextInt(4) + 1) : (var2 == 6 ? new ItemStack(Item.bucketEmpty) : (var2 == 7 && par1Random.nextInt(100) == 0 ? new ItemStack(Item.appleGold) : (var2 == 8 && par1Random.nextInt(2) == 0 ? new ItemStack(Item.redstone, par1Random.nextInt(4) + 1) : (var2 == 9 && par1Random.nextInt(10) == 0 ? new ItemStack(Item.itemsList[Item.record13.itemID + par1Random.nextInt(2)]) : (var2 == 10 ? new ItemStack(Item.dyePowder, 1, 3) : (var2 == 11 ? Item.enchantedBook.func_92109_a(par1Random) : null)))))))))));
+ return ChestGenHooks.getOneItem(ChestGenHooks.DUNGEON_CHEST, par1Random);
}

View file

@ -18,13 +18,13 @@
+
if (par2Random.nextInt(100) == 0)
{
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, WeightedRandomChestContent.func_92029_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 3 + par2Random.nextInt(4));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, WeightedRandomChestContent.func_92080_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 3 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 2, 0, var10 - 1, info.getItems(par2Random), info.getCount(par2Random));
}
if (par2Random.nextInt(100) == 0)
{
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, WeightedRandomChestContent.func_92029_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 3 + par2Random.nextInt(4));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, WeightedRandomChestContent.func_92080_a(StructureMineshaftPieces.func_78816_a(), new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 3 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 0, 0, var10 + 1, info.getItems(par2Random), info.getCount(par2Random));
}

View file

@ -21,7 +21,7 @@
{
int var11 = Direction.offsetX[var10] * 2;
int var12 = Direction.offsetZ[var10] * 2;
- this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, WeightedRandomChestContent.func_92029_a(itemsToGenerateInTemple, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5));
- this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, WeightedRandomChestContent.func_92080_a(itemsToGenerateInTemple, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(5));
+ this.field_74940_h[var10] = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 10 + var11, -11, 10 + var12, info.getItems(par2Random), info.getCount(par2Random));
}
}

View file

@ -37,7 +37,7 @@
if (!this.field_74947_h)
{
- this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, WeightedRandomChestContent.func_92029_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5));
- this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, WeightedRandomChestContent.func_92080_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(5));
+ this.field_74947_h = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 8, -3, 3, chest.getItems(par2Random), chest.getCount(par2Random));
}
@ -46,7 +46,7 @@
if (!this.field_74948_i)
{
- this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, WeightedRandomChestContent.func_92029_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(5));
- this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, WeightedRandomChestContent.func_92080_a(junglePyramidsChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(5));
+ this.field_74948_i = this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 9, -3, 10, chest.getItems(par2Random), chest.getCount(par2Random));
}

View file

@ -14,7 +14,7 @@
if (par3StructureBoundingBox.isVecInside(var5, var4, var6))
{
this.hasMadeChest = true;
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, WeightedRandomChestContent.func_92029_a(strongholdChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 2 + par2Random.nextInt(2));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, WeightedRandomChestContent.func_92080_a(strongholdChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 2 + par2Random.nextInt(2));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, ChestGenHooks.getItems(STRONGHOLD_CORRIDOR, par2Random), ChestGenHooks.getCount(STRONGHOLD_CORRIDOR, par2Random));
}
}

View file

@ -14,7 +14,7 @@
this.placeBlockAtCurrentPosition(par1World, Block.torchWood.blockID, 0, var8, 8, var9 + 1, par3StructureBoundingBox);
}
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, WeightedRandomChestContent.func_92029_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92058_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, WeightedRandomChestContent.func_92080_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92112_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4));
+ ChestGenHooks info = ChestGenHooks.getInfo(STRONGHOLD_LIBRARY);
+
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, info.getItems(par2Random), info.getCount(par2Random));
@ -22,7 +22,7 @@
if (this.isLargeRoom)
{
this.placeBlockAtCurrentPosition(par1World, 0, 0, 12, 9, 1, par3StructureBoundingBox);
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, WeightedRandomChestContent.func_92029_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92058_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, WeightedRandomChestContent.func_92080_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92112_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, info.getItems(par2Random), info.getCount(par2Random));
}

View file

@ -14,7 +14,7 @@
this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 1, 3, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 2, 3, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 3, 3, par3StructureBoundingBox);
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, WeightedRandomChestContent.func_92029_a(strongholdRoomCrossingChestContents, new WeightedRandomChestContent[] {Item.field_92053_bW.func_92059_b(par2Random)}), 1 + par2Random.nextInt(4));
- this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, WeightedRandomChestContent.func_92080_a(strongholdRoomCrossingChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)}), 1 + par2Random.nextInt(4));
+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, ChestGenHooks.getItems(STRONGHOLD_CROSSING, par2Random), ChestGenHooks.getCount(STRONGHOLD_CROSSING, par2Random));
}