Update to 1.5.1 Pre-Release:

MinecraftForge/FML@9565529baf Updated to latest MCP and Minecraft 1.5.1 Pre-release.
MinecraftForge/FML@a573faf92d Someone derped up this function bad, revert name.
This commit is contained in:
LexManos 2013-03-19 18:09:34 -07:00
parent 8aca6b4193
commit 3d9629013b
61 changed files with 415 additions and 414 deletions

View File

@ -71,11 +71,11 @@ public class ForgeHooksClient
if (item.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[item.itemID].getRenderType())))
{
engine.func_98187_b("/terrain.png");
engine.bindTexture("/terrain.png");
int renderType = Block.blocksList[item.itemID].getRenderType();
float scale = (renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2 ? 0.5F : 0.25F);
if (RenderItem.field_82407_g)
if (RenderItem.renderInFrame)
{
GL11.glScalef(1.25F, 1.25F, 1.25F);
GL11.glTranslatef(0.0F, 0.05F, 0.0F);
@ -103,7 +103,7 @@ public class ForgeHooksClient
}
else
{
engine.func_98187_b(item.func_94608_d() == 0 ? "/terrain.png" : "/gui/items.png");
engine.bindTexture(item.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
GL11.glScalef(0.5F, 0.5F, 0.5F);
customRenderer.renderItem(ENTITY, item, renderBlocks, entity);
}
@ -118,7 +118,7 @@ public class ForgeHooksClient
return false;
}
engine.func_98187_b(item.func_94608_d() == 0 ? "/terrain.png" : "/gui/items.png");
engine.bindTexture(item.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
if (customRenderer.shouldUseRenderHelper(INVENTORY, item, INVENTORY_BLOCK))
{
GL11.glPushMatrix();

View File

@ -91,7 +91,7 @@ public class GuiControlsScrollPanel extends GuiSlot
boolean flag = _mouseX >= xPosition && _mouseY >= yPosition && _mouseX < xPosition + width && _mouseY < yPosition + height;
int k = (flag ? 2 : 1);
mc.renderEngine.func_98187_b("/gui/gui.png");
mc.renderEngine.bindTexture("/gui/gui.png");
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);

View File

@ -1,87 +1,87 @@
#Main Forge Access Transformer configuration file
# Tessellator
public-f bfx.a #FD:Tessellator/field_78398_a #instance
public bfx.u #FD:Tessellator/field_78409_u #drawMode
public bfx.v #FD:Tessellator/field_78408_v #xOffset
public bfx.w #FD:Tessellator/field_78407_w #yOffset
public bfx.x #FD:Tessellator/field_78417_x #zOffset
public bfx.z #FD:Tessellator/field_78415_z #isDrawing
public-f bge.a #FD:Tessellator/field_78398_a #instance
public bge.u #FD:Tessellator/field_78409_u #drawMode
public bge.v #FD:Tessellator/field_78408_v #xOffset
public bge.w #FD:Tessellator/field_78407_w #yOffset
public bge.x #FD:Tessellator/field_78417_x #zOffset
public bge.z #FD:Tessellator/field_78415_z #isDrawing
# ItemPickaxe
public wo.<init>(ILwf;)V #MD:ItemPickaxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f wo.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst
public wu.<init>(ILwl;)V #MD:ItemPickaxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f wu.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst
# ItemAxe
public wc.<init>(ILwf;)V #MD:ItemAxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f wc.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst
public wi.<init>(ILwl;)V #MD:ItemAxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f wi.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst
# ItemSpade
public wz.<init>(ILwf;)V #MD:ItemSpade/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f wz.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst
public xf.<init>(ILwl;)V #MD:ItemSpade/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
public+f xf.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst
# ItemTool
public vl.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial
public vl.d #FD:ItemTool/field_77865_bY #damageVsEntity
public vr.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial
public vr.d #FD:ItemTool/field_77865_bY #damageVsEntity
# EntityEnderman
public rp.d #FD:EntityEnderman/field_70827_d #carriableBlocks
public rv.d #FD:EntityEnderman/field_70827_d #carriableBlocks
# RenderEngine
public bfy.f(Ljava/lang/String;)I #MD:RenderEngine/func_78341_b #getTexture
public bfy.i #FD:RenderEngine/field_94154_l #terrainTextureMap
public bfy.j #FD:RenderEngine/field_94155_m #itemTextureMap
public bgf.f(Ljava/lang/String;)I #MD:RenderEngine/func_78341_b #getTexture
public bgf.i #FD:RenderEngine/field_94154_l #terrainTextureMap
public bgf.j #FD:RenderEngine/field_94155_m #itemTextureMap
# RenderGlobal
public bfs.h #FD:RenderGlobal/field_72769_h #theWorld
public bfs.i #FD:RenderGlobal/field_72770_i #renderEngine
public bfs.q #FD:RenderGlobal/field_72777_q #mc
public bfs.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks
public bfs.E #FD:RenderGlobal/field_72738_E #damagedBlocks
public bfz.h #FD:RenderGlobal/field_72769_h #theWorld
public bfz.i #FD:RenderGlobal/field_72770_i #renderEngine
public bfz.q #FD:RenderGlobal/field_72777_q #mc
public bfz.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks
public bfz.E #FD:RenderGlobal/field_72738_E #damagedBlocks
# SoundManager
public bjw.a #FD:SoundManager/field_77381_a #sndSystem
public bjw.b #FD:SoundManager/field_77379_b #soundPoolSounds
public bjw.c #FD:SoundManager/field_77380_c #soundPoolStreaming
public bjw.d #FD:SoundManager/field_77377_d #soundPoolMusic
public bkd.a #FD:SoundManager/field_77381_a #sndSystem
public bkd.b #FD:SoundManager/field_77379_b #soundPoolSounds
public bkd.c #FD:SoundManager/field_77380_c #soundPoolStreaming
public bkd.d #FD:SoundManager/field_77377_d #soundPoolMusic
# EntityMinecart
protected rc.* #FD:EntityMinecart/* # All private -> protected
protected ri.* #FD:EntityMinecart/* # All private -> protected
# -- MISSING MAPPING public py.h()Z #MD:EntityMinecart/func_70490_h #isMinecartPowered
# Block
public aou.<init>(ILahz;)V #MD:Block/<init>(ILnet/minecraft/src/Material;) #Constructor
public aou.<init>(IILahz;)V #MD:Block/<init>(IILnet/minecraft/src/Material;) #Constructor
public apa.<init>(ILaif;)V #MD:Block/<init>(ILnet/minecraft/src/Material;) #Constructor
public apa.<init>(IILaif;)V #MD:Block/<init>(IILnet/minecraft/src/Material;) #Constructor
# -- MISSING MAPPING public amq.r()Lamq; #MD:Block/func_71912_p #setRequiresSelfNotify
public aou.a(Laoy;)Laou; #MD:Block/func_71884_a #setStepSound
public aou.b(F)Laou; #MD:Block/func_71894_b #setResistance
public aou.c(F)Laou; #MD:Block/func_71848_c #setHardness
public aou.k(I)Laou; #MD:Block/func_71868_h #setLightOpacity
public aou.a(F)Laou; #MD:Block/func_71900_a #setLightValue
public aou.r()Laou; #MD:Block/func_71875_q #setBlockUnbreakable
public aou.b(Z)Laou; #MD:Block/func_71907_b #setTickRandomly
public aou.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds
public apa.a(Lape;)Lapa; #MD:Block/func_71884_a #setStepSound
public apa.b(F)Lapa; #MD:Block/func_71894_b #setResistance
public apa.c(F)Lapa; #MD:Block/func_71848_c #setHardness
public apa.k(I)Lapa; #MD:Block/func_71868_h #setLightOpacity
public apa.a(F)Lapa; #MD:Block/func_71900_a #setLightValue
public apa.r()Lapa; #MD:Block/func_71875_q #setBlockUnbreakable
public apa.b(Z)Lapa; #MD:Block/func_71907_b #setTickRandomly
public apa.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds
# NetServerHandler
public jh.f #FD:NetServerHandler/field_72572_g #playerInAirTime
# TileEntity
public aqj.k #FD:TileEntity/field_70331_k #worldObj
public aqp.k #FD:TileEntity/field_70331_k #worldObj
# BlockLeavesBase
public apc.d #FD:BlockLeavesBase/field_72131_c #graphicsLevel
public api.d #FD:BlockLeavesBase/field_72131_c #graphicsLevel
# Item
public we.<init>(I)V #MD:Item/<init>(I) #Constructor
public we.e(I)Lwe; #MD:Item/func_77656_e #setMaxDamage
public-f we.h(Lwg;)Llx; #MD:Item/func_77650_f #getIconIndex
public wk.<init>(I)V #MD:Item/<init>(I) #Constructor
public wk.e(I)Lwk; #MD:Item/func_77656_e #setMaxDamage
public-f wk.h(Lwm;)Llx; #MD:Item/func_77650_f #getIconIndex
# RailLogic
public akw #CL:BlockBaseRailLogic
public akw.a()I #MD:BlockBaseRailLogic/func_94505_a #getNAdjacentTiles
public alc #CL:BlockBaseRailLogic
public alc.a()I #MD:BlockBaseRailLogic/func_94505_a #getNAdjacentTiles
# EntityPlayer
public sk.a(Lrb;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld
public sk.h()V #MD:EntityPlayer/func_71053_j #closeScreen
public sk.b #FD:EntityPlayer/field_71076_b #sleepTimer
public sq.a(Lrh;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld
public sq.h()V #MD:EntityPlayer/func_71053_j #closeScreen
public sq.b #FD:EntityPlayer/field_71076_b #sleepTimer
# EntityPlayerMP
public bdp.a(Lrb;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld
public bdw.a(Lrh;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld
# World Gen Chests Related
public lp.* #FD:WeightedRandomChestContent/* #all
public iz.S #FD:WorldServer/field_73069_S #bonusChestContent
public aeg.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents
public afk.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple
public afl.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents
public afl.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents
public afv.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents
public afz.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
public age.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
public ahf.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
public aem.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents
public afq.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple
public afr.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents
public afr.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents
public agb.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents
public agf.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
public agk.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
public ahl.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
# AnvilChunkLoader.chunkSaveLocation
public acd.d #FD:AnvilChunkLoader/field_75825_d
public acj.d #FD:AnvilChunkLoader/field_75825_d
# ChunkProviderServer.currentChunkLoader
public iy.e #FD:ChunkProviderServer/field_73247_e
# PlayerManager
@ -89,47 +89,47 @@ public iw.a(IIZ)Lix; #MD:PlayerManager/func_72690_a #getOrCreateChunkWatcher
# PlayerInstance
public ix #CL:PlayerInstance
# World
public-f zv.A #FD:World/field_72982_D #villageCollectionObj
public zv.G #FD:World/field_72993_I #activeChunkSet
public-f aab.A #FD:World/field_72982_D #villageCollectionObj
public aab.G #FD:World/field_72993_I #activeChunkSet
# EntityLiving
public ng.be #FD:EntityLiving/field_70728_aV #experienceValue
# GuiFlatPresets
public axg.a(Ljava/lang/String;ILaap;Ljava/util/List;[Laec;)V #MD:GuiFlatPresets/func_82294_a
public axg.a(Ljava/lang/String;ILaap;[Laec;)V #MD:GuiFlatPresets/func_82297_a
public axm.a(Ljava/lang/String;ILaav;Ljava/util/List;[Laei;)V #MD:GuiFlatPresets/func_82294_a
public axm.a(Ljava/lang/String;ILaav;[Laei;)V #MD:GuiFlatPresets/func_82297_a
# BiomeGenBase
public aap.*() #MD:BiomeGenBase/* #Everything protected->public
public aav.*() #MD:BiomeGenBase/* #Everything protected->public
# MapGenVillage
public-f agt.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes
public-f agz.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes
# ShapedRecipes
public+f yh.d #FD:ShapedRecipes/field_77574_d #recipeItems
public+f yh.b #FD:ShapedRecipes/field_77576_b #recipeWidth
public+f yh.c #FD:ShapedRecipes/field_77577_c #recipeHeight
public+f yn.d #FD:ShapedRecipes/field_77574_d #recipeItems
public+f yn.b #FD:ShapedRecipes/field_77576_b #recipeWidth
public+f yn.c #FD:ShapedRecipes/field_77577_c #recipeHeight
# ShapelessRecipes
public yi.b #FD:ShapelessRecipes/field_77579_b #recipeItems
public yo.b #FD:ShapelessRecipes/field_77579_b #recipeItems
# GuiContainer
protected ayf.a(Luf;)V #MD:GuiContainer/func_74192_a #drawSlotInventory
protected ayl.a(Lul;)V #MD:GuiContainer/func_74192_a #drawSlotInventory
# BlockButton
protected alc.n(Lzv;III)V #MD:BlockButton/func_82535_o #checkActivation
protected-f alc.a #FD:BlockButton/field_82537_a #sensible
protected ali.n(Laab;III)V #MD:BlockButton/func_82535_o #checkActivation
protected-f ali.a #FD:BlockButton/field_82537_a #sensible
# BiomeDecorator
public aat.* #FD:BiomeDecorator/* # All private -> protected
public aaz.* #FD:BiomeDecorator/* # All private -> protected
# CreativeTabs
public-f uy.a #FD:CreativeTabs/field_78032_a # creativeTabArray non-final
public-f ve.a #FD:CreativeTabs/field_78032_a # creativeTabArray non-final
# Packet
public ei.a(IZZLjava/lang/Class;)V #MD:Packet/func_73285_a #addIdClassMapping
# SaveHandler
public ajn.b()Ljava/io/File; #MD:SaveHandler/func_75765_b
public ajt.b()Ljava/io/File; #MD:SaveHandler/func_75765_b
# World stuff
public zv.b(Lmp;)V #MD:World/func_72847_b #releaseEntitySkin
public zv.m #FD:World/field_73003_n #prevRainingStrength
public zv.n #FD:World/field_73004_o #rainingStrength
public zv.p #FD:World/field_73017_q #thunderingStrength
public zv.o #FD:World/field_73018_p #prevThunderingStrength
public aab.b(Lmp;)V #MD:World/func_72847_b #releaseEntitySkin
public aab.m #FD:World/field_73003_n #prevRainingStrength
public aab.n #FD:World/field_73004_o #rainingStrength
public aab.p #FD:World/field_73017_q #thunderingStrength
public aab.o #FD:World/field_73018_p #prevThunderingStrength
#WorldClient
public bdm.b(Lmp;)V #MD:WorldClient/func_72847_b #releaseEntitySkin
public bdt.b(Lmp;)V #MD:WorldClient/func_72847_b #releaseEntitySkin
#WorldServer
public iz.b(Lmp;)V #MD:WorldServer/func_72847_b #releaseEntitySkin
public iz.N #FD:WorldServer/field_73068_N #allPlayersSleeping
public iz.N #FD:WorldServer/field_73068_P #allPlayersSleeping
#TextureMap
public bil.a #TextureMap/field_94255_a
public bil.b #TextureMap/field_94253_b

View File

@ -239,7 +239,7 @@ public class DimensionManager
ISaveHandler savehandler = overworld.getSaveHandler();
WorldSettings worldSettings = new WorldSettings(overworld.getWorldInfo());
WorldServer world = (dim == 0 ? overworld : new WorldServerMulti(mcServer, savehandler, overworld.getWorldInfo().getWorldName(), dim, worldSettings, overworld, mcServer.theProfiler, overworld.func_98180_V()));
WorldServer world = (dim == 0 ? overworld : new WorldServerMulti(mcServer, savehandler, overworld.getWorldInfo().getWorldName(), dim, worldSettings, overworld, mcServer.theProfiler, overworld.getWorldLogAgent()));
world.addWorldAccess(new WorldManager(mcServer, world));
MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
if (!mcServer.isSinglePlayer())

View File

@ -63,7 +63,7 @@ public class ForgeHooks
{
return;
}
world.setBlockAndMetadataWithNotify(x, y, z, grass.block.blockID, grass.metadata, 3);
world.setBlock(x, y, z, grass.block.blockID, grass.metadata, 3);
}
public static ItemStack getGrassSeed(World world)

View File

@ -42,7 +42,7 @@ public class OreDictionary
registerOre("logWood", new ItemStack(Block.wood, 1, WILDCARD_VALUE));
registerOre("plankWood", new ItemStack(Block.planks, 1, WILDCARD_VALUE));
registerOre("slabWood", new ItemStack(Block.woodSingleSlab, 1, WILDCARD_VALUE));
registerOre("stairWood", Block.stairCompactPlanks);
registerOre("stairWood", Block.stairsWoodOak);
registerOre("stairWood", Block.stairsWoodBirch);
registerOre("stairWood", Block.stairsWoodJungle);
registerOre("stairWood", Block.stairsWoodSpruce);

2
fml

@ -1 +1 @@
Subproject commit 3c346247e1c5de12d4548f6a99349157057e2de6
Subproject commit a573faf92def5dd01af380b3ca86de877c1178a2

View File

@ -154,7 +154,7 @@
}
/**
@@ -1414,4 +1433,853 @@
@@ -1435,4 +1454,853 @@
canBlockGrass[0] = true;
StatList.initBreakableStats();
}
@ -325,7 +325,7 @@
+ */
+ public boolean removeBlockByPlayer(World world, EntityPlayer player, int x, int y, int z)
+ {
+ return world.func_94571_i(x, y, z);
+ return world.setBlockToAir(x, y, z);
+ }
+
+ /**
@ -932,7 +932,7 @@
+ {
+ if (blockID == grass.blockID)
+ {
+ world.setBlockAndMetadataWithNotify(x, y, z, dirt.blockID, 0, 2);
+ world.setBlock(x, y, z, dirt.blockID, 0, 2);
+ }
+ }
+

View File

@ -22,9 +22,9 @@
}
}
@@ -177,4 +181,22 @@
this.field_94380_a = par1IconRegister.func_94245_a("cactus_top");
this.field_94379_b = par1IconRegister.func_94245_a("cactus_bottom");
@@ -182,4 +186,22 @@
this.field_94380_a = par1IconRegister.registerIcon("cactus_top");
this.field_94379_b = par1IconRegister.registerIcon("cactus_bottom");
}
+
+ @Override

View File

@ -9,7 +9,7 @@
public class BlockChest extends BlockContainer
{
private final Random random = new Random();
@@ -436,7 +438,7 @@
@@ -438,7 +440,7 @@
{
return null;
}
@ -18,7 +18,7 @@
{
return null;
}
@@ -444,19 +446,19 @@
@@ -446,19 +448,19 @@
{
return null;
}

View File

@ -37,8 +37,8 @@
}
@SideOnly(Side.CLIENT)
@@ -244,4 +254,10 @@
this.field_94469_b[i] = par1IconRegister.func_94245_a(field_94470_a[i]);
@@ -249,4 +259,10 @@
this.iconArray[i] = par1IconRegister.registerIcon(field_94470_a[i]);
}
}
+

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/block/BlockDoor.java
+++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java
@@ -296,7 +296,7 @@
@@ -301,7 +301,7 @@
{
if (this.blockMaterial == Material.iron)
{

View File

@ -45,13 +45,13 @@
if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
{
@@ -155,7 +155,7 @@
par1World.func_94571_i(par2, par3, par4);
par1World.setBlockToAir(par2, par3, par4);
}
}
- else if (!flag && !this.canBlockCatchFire(par1World, par2, par3 - 1, par4) && l == 15 && par5Random.nextInt(4) == 0)
+ else if (!flag && !this.canBlockCatchFire(par1World, par2, par3 - 1, par4, UP) && l == 15 && par5Random.nextInt(4) == 0)
{
par1World.func_94571_i(par2, par3, par4);
par1World.setBlockToAir(par2, par3, par4);
}
@@ -169,12 +169,12 @@
b0 = -50;
@ -206,9 +206,9 @@
{
for (l = 0; l < 2; ++l)
{
@@ -462,4 +481,46 @@
@@ -467,4 +486,46 @@
{
return this.field_94439_c[0];
return this.iconArray[0];
}
+
+ /**

View File

@ -7,7 +7,7 @@
- if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2)
+ if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2)
{
par1World.func_94575_c(par2, par3, par4, Block.dirt.blockID);
par1World.setBlock(par2, par3, par4, Block.dirt.blockID);
}
@@ -57,7 +57,7 @@
int k1 = par4 + par5Random.nextInt(3) - 1;
@ -16,5 +16,5 @@
- if (par1World.getBlockId(i1, j1, k1) == Block.dirt.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && Block.lightOpacity[l1] <= 2)
+ if (par1World.getBlockId(i1, j1, k1) == Block.dirt.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && par1World.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
{
par1World.func_94575_c(i1, j1, k1, Block.grass.blockID);
par1World.setBlock(i1, j1, k1, Block.grass.blockID);
}

View File

@ -66,7 +66,7 @@
}
/**
@@ -409,4 +406,30 @@
@@ -414,4 +411,30 @@
}
}
}

View File

@ -17,8 +17,8 @@
}
}
}
@@ -171,4 +166,16 @@
this.field_94390_c[i] = par1IconRegister.func_94245_a(field_94389_b[i]);
@@ -176,4 +171,16 @@
this.iconArray[i] = par1IconRegister.registerIcon(treeTextureTypes[i]);
}
}
+

View File

@ -7,7 +7,7 @@
- if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2)
+ if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2)
{
par1World.func_94575_c(par2, par3, par4, Block.dirt.blockID);
par1World.setBlock(par2, par3, par4, Block.dirt.blockID);
}
@@ -54,7 +54,7 @@
int k1 = par4 + par5Random.nextInt(3) - 1;
@ -16,5 +16,5 @@
- if (par1World.getBlockId(i1, j1, k1) == Block.dirt.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && Block.lightOpacity[l1] <= 2)
+ if (par1World.getBlockId(i1, j1, k1) == Block.dirt.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && par1World.getBlockLightOpacity(i1, j1 + 1, k1) <= 2)
{
par1World.func_94575_c(i1, j1, k1, this.blockID);
par1World.setBlock(i1, j1, k1, this.blockID);
}

View File

@ -54,8 +54,8 @@
}
/**
@@ -138,4 +124,23 @@
this.field_94372_b[i] = par1IconRegister.func_94245_a(field_94373_a[i]);
@@ -143,4 +129,23 @@
this.iconArray[i] = par1IconRegister.registerIcon(field_94373_a[i]);
}
}
+

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/block/BlockPistonBase.java
+++ ../src_work/minecraft/net/minecraft/block/BlockPistonBase.java
@@ -426,7 +426,7 @@
@@ -431,7 +431,7 @@
return false;
}
@ -9,7 +9,7 @@
}
}
@@ -444,7 +444,7 @@
@@ -449,7 +449,7 @@
{
if (l1 < 13)
{
@ -18,7 +18,7 @@
{
return false;
}
@@ -494,7 +494,7 @@
@@ -499,7 +499,7 @@
if (l1 < 13)
{
@ -27,7 +27,7 @@
{
return false;
}
@@ -522,7 +522,9 @@
@@ -527,7 +527,9 @@
continue;
}
@ -35,6 +35,6 @@
+ //With our change to how snowballs are dropped this needs to dissallow to mimic vanilla behavior.
+ float chance = (Block.blocksList[i2] instanceof BlockSnow ? -1.0f : 1.0f);
+ Block.blocksList[i2].dropBlockAsItemWithChance(par1World, i1, j1, k1, par1World.getBlockMetadata(i1, j1, k1), chance, 0);
par1World.func_94571_i(i1, j1, k1);
par1World.setBlockToAir(i1, j1, k1);
}
}

View File

@ -12,7 +12,7 @@
*/
public static final boolean isRailBlock(int par0)
{
- return par0 == Block.rail.blockID || par0 == Block.railPowered.blockID || par0 == Block.railDetector.blockID || par0 == Block.field_94337_cv.blockID;
- return par0 == Block.rail.blockID || par0 == Block.railPowered.blockID || par0 == Block.railDetector.blockID || par0 == Block.railActivator.blockID;
+ return Block.blocksList[par0] instanceof BlockRailBase;
}

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/block/BlockSnow.java
+++ ../src_work/minecraft/net/minecraft/block/BlockSnow.java
@@ -88,8 +88,12 @@
@@ -93,8 +93,12 @@
*/
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{
@ -15,15 +15,15 @@
}
/**
@@ -108,7 +112,6 @@
@@ -113,7 +117,6 @@
{
if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
{
- this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.func_94571_i(par2, par3, par4);
par1World.setBlockToAir(par2, par3, par4);
return false;
}
@@ -124,11 +127,8 @@
@@ -129,11 +132,8 @@
*/
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
{
@ -31,12 +31,12 @@
- int j1 = par6 & 7;
- this.dropBlockAsItem_do(par1World, par3, par4, par5, new ItemStack(i1, j1 + 1, 0));
+ super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
par1World.func_94571_i(par3, par4, par5);
par1World.setBlockToAir(par3, par4, par5);
- par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
}
/**
@@ -144,7 +144,7 @@
@@ -149,7 +149,7 @@
*/
public int quantityDropped(Random par1Random)
{
@ -45,15 +45,15 @@
}
/**
@@ -154,7 +154,6 @@
@@ -159,7 +159,6 @@
{
if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11)
{
- this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.func_94571_i(par2, par3, par4);
par1World.setBlockToAir(par2, par3, par4);
}
}
@@ -169,4 +168,10 @@
@@ -174,4 +173,10 @@
{
return par5 == 1 ? true : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
}

View File

@ -26,7 +26,7 @@
+ boolean isSoil = (blocksList[l1] != null && blocksList[l1].canSustainPlant(par1World, j1, par3 - 1, k1, ForgeDirection.UP, this));
+ if (par1World.getBlockId(j1, par3, k1) == 0 && (isSoil || l1 == Block.dirt.blockID || l1 == Block.grass.blockID))
{
par1World.func_94575_c(j1, par3, k1, this.fruitType.blockID);
par1World.setBlock(j1, par3, k1, this.fruitType.blockID);
}
@@ -149,11 +154,11 @@
int j3 = par1World.getBlockId(l2, par3 - 1, i3);

View File

@ -19,7 +19,7 @@
+
+public class BlockTallGrass extends BlockFlower implements IShearable
{
private static final String[] field_94367_a = new String[] {"deadbush", "tallgrass", "fern"};
private static final String[] grassTypes = new String[] {"deadbush", "tallgrass", "fern"};
@SideOnly(Side.CLIENT)
@@ -50,7 +55,7 @@
*/
@ -47,8 +47,8 @@
}
@SideOnly(Side.CLIENT)
@@ -139,4 +136,35 @@
this.field_94366_b[i] = par1IconRegister.func_94245_a(field_94367_a[i]);
@@ -144,4 +141,35 @@
this.iconArray[i] = par1IconRegister.registerIcon(grassTypes[i]);
}
}
+

View File

@ -21,7 +21,7 @@
- if (!isValidSupportBlock(par1World.getBlockId(j1, par3, k1)))
+ if (!(isValidSupportBlock(par1World.getBlockId(j1, par3, k1)) || par1World.isBlockSolidOnSide(j1, par3, k1, ForgeDirection.getOrientation((i1 & 3) + 2))))
{
par1World.func_94571_i(par2, par3, par4);
par1World.setBlockToAir(par2, par3, par4);
this.dropBlockAsItem(par1World, par2, par3, par4, i1, 0);
@@ -259,6 +264,10 @@
*/

View File

@ -131,11 +131,11 @@
- }
- else if (entityminecart.func_94087_l() == 3)
- {
- j = Item.field_94582_cb.itemID;
- j = Item.tntMinecart.itemID;
- }
- else if (entityminecart.func_94087_l() == 5)
- {
- j = Item.field_96600_cc.itemID;
- j = Item.hopperMinecart.itemID;
- }
- else
- {

View File

@ -13,7 +13,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG);
Tessellator tessellator = Tessellator.instance;
- this.mc.renderEngine.func_98187_b("/gui/background.png");
- this.mc.renderEngine.bindTexture("/gui/background.png");
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- float f1 = 32.0F;
- tessellator.startDrawingQuads();
@ -35,8 +35,8 @@
+ protected void overlayBackground(int par1, int par2, int par3, int par4)
{
Tessellator tessellator = Tessellator.instance;
- this.mc.renderEngine.func_98187_b("/gui/background.png");
+ this.mc.renderEngine.func_98187_b(BACKGROUND_IMAGE);
- this.mc.renderEngine.bindTexture("/gui/background.png");
+ this.mc.renderEngine.bindTexture(BACKGROUND_IMAGE);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float f = 32.0F;
tessellator.startDrawingQuads();
@ -47,7 +47,7 @@
+
+ protected void drawContainerBackground(Tessellator tess)
+ {
+ this.mc.renderEngine.func_98187_b(BACKGROUND_IMAGE);
+ this.mc.renderEngine.bindTexture(BACKGROUND_IMAGE);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float height = 32.0F;
+ tess.startDrawingQuads();

View File

@ -119,7 +119,7 @@
+ for (l = start; l < k; ++l)
{
CreativeTabs creativetabs1 = acreativetabs[l];
this.mc.renderEngine.func_98187_b("/gui/allitems.png");
this.mc.renderEngine.bindTexture("/gui/allitems.png");
- if (creativetabs1.getTabIndex() != selectedTabIndex)
+ if (creativetabs1 != null && creativetabs1.getTabIndex() != selectedTabIndex)
@ -132,12 +132,12 @@
+ {
+ if (creativetabs != CreativeTabs.tabAllSearch)
+ {
+ mc.renderEngine.func_98187_b("/gui/allitems.png");
+ mc.renderEngine.bindTexture("/gui/allitems.png");
+ renderCreativeTab(CreativeTabs.tabAllSearch);
+ }
+ if (creativetabs != CreativeTabs.tabInventory)
+ {
+ mc.renderEngine.func_98187_b("/gui/allitems.png");
+ mc.renderEngine.bindTexture("/gui/allitems.png");
+ renderCreativeTab(CreativeTabs.tabInventory);
}
}

View File

@ -28,7 +28,7 @@
{
worldclient.playAuxSFX(2001, par1, par2, par3, block.blockID + (worldclient.getBlockMetadata(par1, par2, par3) << 12));
int i1 = worldclient.getBlockMetadata(par1, par2, par3);
- boolean flag = worldclient.func_94571_i(par1, par2, par3);
- boolean flag = worldclient.setBlockToAir(par1, par2, par3);
+ boolean flag = block.removeBlockByPlayer(worldclient, mc.thePlayer, par1, par2, par3);
if (flag)
@ -38,8 +38,8 @@
boolean flag = false;
int i1;
+ if (par3ItemStack != null &&
+ par3ItemStack.getItem() != null &&
+ par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2))
+ par3ItemStack.getItem() != null &&
+ par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2))
+ {
+ return true;
+ }

View File

@ -22,13 +22,11 @@
@SideOnly(Side.CLIENT)
public class ItemRenderer
{
@@ -53,8 +61,21 @@
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
@@ -54,7 +62,20 @@
{
GL11.glPushMatrix();
-
- if (par2ItemStack.func_94608_d() == 0 && Block.blocksList[par2ItemStack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
+
- if (par2ItemStack.getItemSpriteNumber() == 0 && Block.blocksList[par2ItemStack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
+ Block block = null;
+ if (par2ItemStack.getItem() instanceof ItemBlock && par2ItemStack.itemID < Block.blocksList.length)
+ {
@ -39,12 +37,12 @@
+
+ if (customRenderer != null)
+ {
+ this.mc.renderEngine.func_98187_b(par2ItemStack.func_94608_d() == 0 ? "/terrain.png" : "/gui/items.png");
+ this.mc.renderEngine.bindTexture(par2ItemStack.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
+ ForgeHooksClient.renderEquippedItem(customRenderer, renderBlocksInstance, par1EntityLiving, par2ItemStack);
+ }
+ else if (block != null && par2ItemStack.func_94608_d() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
+ else if (block != null && par2ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
{
this.mc.renderEngine.func_98187_b("/terrain.png");
this.mc.renderEngine.bindTexture("/terrain.png");
this.renderBlocksInstance.renderBlockAsItem(Block.blocksList[par2ItemStack.itemID], par2ItemStack.getItemDamage(), 1.0F);
@@ -272,7 +293,7 @@
Render render;

View File

@ -9,7 +9,7 @@
@SideOnly(Side.CLIENT)
public class RenderBlocks
{
@@ -608,9 +610,8 @@
@@ -533,9 +535,8 @@
public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4)
{
Tessellator tessellator = Tessellator.instance;
@ -21,23 +21,23 @@
float f = 0.5F;
float f1 = 1.0F;
float f2 = 0.8F;
@@ -619,6 +620,7 @@
@@ -544,6 +545,7 @@
tessellator.setBrightness(j1);
tessellator.setColorOpaque_F(f, f, f);
Icon icon = this.func_94170_a(par1Block, this.blockAccess, par2, par3, par4, 0);
+ if (func_94167_b()) icon = overrideBlockTexture; //BugFix Proper breaking texture on underside
double d0 = (double)icon.func_94209_e();
double d1 = (double)icon.func_94212_f();
double d2 = (double)icon.func_94206_g();
@@ -635,6 +637,7 @@
Icon icon = this.getBlockIcon(par1Block, this.blockAccess, par2, par3, par4, 0);
+ if (hasOverrideBlockTexture()) icon = overrideBlockTexture; //BugFix Proper breaking texture on underside
double d0 = (double)icon.getMinU();
double d1 = (double)icon.getMaxU();
double d2 = (double)icon.getMinV();
@@ -560,6 +562,7 @@
tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4));
tessellator.setColorOpaque_F(f1, f1, f1);
icon = this.func_94170_a(par1Block, this.blockAccess, par2, par3, par4, 1);
+ if (func_94167_b()) icon = overrideBlockTexture; //BugFix Proper breaking texture on underside
d0 = (double)icon.func_94209_e();
d1 = (double)icon.func_94212_f();
d2 = (double)icon.func_94206_g();
@@ -2426,7 +2429,7 @@
icon = this.getBlockIcon(par1Block, this.blockAccess, par2, par3, par4, 1);
+ if (hasOverrideBlockTexture()) icon = overrideBlockTexture; //BugFix Proper breaking texture on underside
d0 = (double)icon.getMinU();
d1 = (double)icon.getMaxU();
d2 = (double)icon.getMinV();
@@ -2351,7 +2354,7 @@
double d9;
double d10;
@ -46,7 +46,7 @@
{
float f1 = 0.2F;
float f2 = 0.0625F;
@@ -2446,7 +2449,7 @@
@@ -2371,7 +2374,7 @@
d0 = d5;
}
@ -55,7 +55,7 @@
{
tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1);
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 1), d2, d3);
@@ -2458,7 +2461,7 @@
@@ -2383,7 +2386,7 @@
tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1);
}
@ -64,7 +64,7 @@
{
tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1);
tessellator.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d0, d3);
@@ -2470,7 +2473,7 @@
@@ -2395,7 +2398,7 @@
tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1);
}
@ -73,7 +73,7 @@
{
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1);
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d2, d3);
@@ -2482,7 +2485,7 @@
@@ -2407,7 +2410,7 @@
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1);
}
@ -82,7 +82,7 @@
{
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1);
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + f2), (double)(par4 + 1 - 0), d0, d3);
@@ -2494,7 +2497,7 @@
@@ -2419,7 +2422,7 @@
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1);
}

View File

@ -27,7 +27,7 @@
{
this.theWorld.theProfiler.startSection("prepare");
- TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, par3);
- RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.field_96291_i, this.mc.gameSettings, par3);
- RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
- this.countEntitiesTotal = 0;
- this.countEntitiesRendered = 0;
- this.countEntitiesHidden = 0;
@ -41,7 +41,7 @@
+ if (pass == 0)
+ {
+ TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, par3);
+ RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.field_96291_i, this.mc.gameSettings, par3);
+ RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
+ this.countEntitiesTotal = 0;
+ this.countEntitiesRendered = 0;
+ this.countEntitiesHidden = 0;

View File

@ -45,7 +45,7 @@
float f5;
float f6;
- if (itemstack.func_94608_d() == 0 && Block.blocksList[itemstack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
- {
- Block block = Block.blocksList[itemstack.itemID];
+ Block block = null;
@ -58,11 +58,11 @@
+ {
+ ;
+ }
+ else if (itemstack.func_94608_d() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
+ else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
+ {
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
if (field_82407_g)
if (renderInFrame)
@@ -138,10 +129,10 @@
this.loadTexture("/gui/items.png");
@ -75,8 +75,8 @@
+ Icon icon = itemstack.getItem().getIcon(itemstack, k);
f8 = 1.0F;
if (this.field_77024_a)
@@ -241,32 +232,26 @@
if (this.renderWithColor)
@@ -241,32 +232,27 @@
f11 = 0.021875F;
ItemStack itemstack = par1EntityItem.getEntityItem();
int j = itemstack.stackSize;
@ -104,9 +104,9 @@
for (int k = 0; k < b0; ++k)
{
- GL11.glTranslatef(0.0F, 0.0F, f12 + f11);
GL11.glTranslatef(0.0F, 0.0F, f12 + f11);
-
- if (itemstack.func_94608_d() == 0 && Block.blocksList[itemstack.itemID] != null)
- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null)
+ // Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
+ if (k > 0 && shouldSpreadItems())
+ {
@ -120,41 +120,33 @@
+ GL11.glTranslatef(0f, 0f, f12 + f11);
+ }
+
+ if (itemstack.func_94608_d() == 0)
+ if (itemstack.getItemSpriteNumber() == 0)
{
this.loadTexture("/terrain.png");
}
@@ -356,10 +341,11 @@
@@ -356,10 +342,10 @@
float f1;
float f2;
- if (par3ItemStack.func_94608_d() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
- if (par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
+ Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
+
+ if (par3ItemStack.func_94608_d() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
+ if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
{
par2RenderEngine.func_98187_b("/terrain.png");
par2RenderEngine.bindTexture("/terrain.png");
- Block block = Block.blocksList[k];
GL11.glPushMatrix();
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
GL11.glScalef(10.0F, 10.0F, 10.0F);
@@ -390,11 +376,18 @@
@@ -390,11 +376,11 @@
if (Item.itemsList[k].requiresMultipleRenderPasses())
{
GL11.glDisable(GL11.GL_LIGHTING);
- par2RenderEngine.func_98187_b("/gui/items.png");
- par2RenderEngine.bindTexture("/gui/items.png");
-
- for (j1 = 0; j1 <= 1; ++j1)
- {
- Icon icon1 = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1);
+ if (par3ItemStack.func_94608_d() == 0)
+ {
+ par2RenderEngine.func_98187_b("/terrain.png");
+ }
+ else
+ {
+ par2RenderEngine.func_98187_b("/gui/items.png");
+ }
+ par2RenderEngine.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
+
+ for (j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1)
+ {
@ -162,19 +154,19 @@
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
f = (float)(k1 >> 16 & 255) / 255.0F;
f1 = (float)(k1 >> 8 & 255) / 255.0F;
@@ -453,7 +446,10 @@
@@ -453,7 +439,10 @@
{
if (par3ItemStack != null)
{
- this.renderItemIntoGUI(par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5);
+ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2RenderEngine, par3ItemStack, field_77024_a, zLevel, (float)par4, (float)par5))
+ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2RenderEngine, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5))
+ {
+ this.renderItemIntoGUI(par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5);
+ }
if (par3ItemStack.hasEffect())
{
@@ -590,4 +586,47 @@
@@ -590,4 +579,47 @@
{
this.doRenderItem((EntityItem)par1Entity, par2, par4, par6, par8, par9);
}

View File

@ -2,7 +2,7 @@
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
@@ -66,17 +66,42 @@
public List func_94266_e(String par1Str)
public List createTexture(String par1Str)
{
+ return createNewTexture(par1Str, par1Str, null);
+ }
@ -18,7 +18,7 @@
- BufferedImage bufferedimage = ImageIO.read(itexturepack.getResourceAsStream("/" + par1Str));
- int i = bufferedimage.getHeight();
- int j = bufferedimage.getWidth();
- String s1 = this.func_98146_d(par1Str);
- String s1 = this.getBasename(par1Str);
+ BufferedImage bufferedimage = null;
+ int i = 0;
+ int j = 0;
@ -35,7 +35,7 @@
+ }
+ String s1 = textureName;
- if (this.func_98147_a(par1Str, itexturepack))
- if (this.hasAnimationTxt(par1Str, itexturepack))
+ if (stitched != null && stitched.loadTexture(this, itexturepack, textureName, textureFile, bufferedimage, arraylist))
+ {
+ ;
@ -44,7 +44,7 @@
+ {
+ throw fnfe;
+ }
+ else if (this.func_98147_a(par1Str, itexturepack))
+ else if (this.hasAnimationTxt(par1Str, itexturepack))
{
int k = j;
int l = j;

View File

@ -9,88 +9,89 @@
@SideOnly(Side.CLIENT)
public class TextureMap implements IconRegister
@@ -47,6 +49,7 @@
public void func_94247_b()
@@ -48,6 +50,7 @@
public void refreshTextures()
{
this.field_94256_j.clear();
this.textureStichedMap.clear();
+ ForgeHooksClient.onTextureStitchedPre(this);
int i;
int j;
@@ -90,13 +93,22 @@
@@ -91,14 +94,22 @@
StitchHolder stitchholder = new StitchHolder(texture);
stitcher.func_94312_a(stitchholder);
stitcher.addStitchHolder(stitchholder);
hashmap.put(stitchholder, Arrays.asList(new Texture[] {texture}));
- Iterator iterator = this.field_94256_j.keySet().iterator();
- Iterator iterator = this.textureStichedMap.keySet().iterator();
-
- while (iterator.hasNext())
- {
- String s = (String)iterator.next();
- String s1 = this.field_94254_c + s + this.field_94251_d;
- List list = TextureManager.func_94267_b().func_94266_e(s1);
- String s1 = this.basePath + s + this.textureExt;
- List list = TextureManager.instance().createTexture(s1);
-
+
+ for (Map.Entry<String, TextureStitched> entry : ((Map<String, TextureStitched>)field_94256_j).entrySet())
+ for (Map.Entry<String, TextureStitched> entry : ((Map<String, TextureStitched>)textureStichedMap).entrySet())
+ {
+ String name = entry.getKey();
+ String path;
+ if (name.indexOf(':') == -1)
+ {
+ path = this.field_94254_c + name + this.field_94251_d;
+ path = this.basePath + name + this.textureExt;
+ }
+ else
+ {
+ String domain = name.substring(0,name.indexOf(':'));
+ String file = name.substring(name.indexOf(':')+1);
+ path = "mods/" + domain +"/" + field_94254_c + file + field_94251_d;
+ String domain = name.substring(0, name.indexOf(':'));
+ String file = name.substring(name.indexOf(':') + 1);
+ path = "mods/" + domain +"/" + basePath + file + textureExt;
+ }
+ List list = TextureManager.func_94267_b().createNewTexture(name, path, entry.getValue());
+ List list = TextureManager.instance().createNewTexture(name, path, entry.getValue());
if (!list.isEmpty())
{
@@ -116,7 +128,7 @@
StitchHolder stitchholder1 = new StitchHolder((Texture)list.get(0));
@@ -117,7 +128,7 @@
}
this.field_94257_h = stitcher.func_94306_e();
- iterator = stitcher.func_94309_g().iterator();
+ Iterator iterator = stitcher.func_94309_g().iterator();
this.atlasTexture = stitcher.getTexture();
- iterator = stitcher.getStichSlots().iterator();
+ Iterator iterator = stitcher.getStichSlots().iterator();
while (iterator.hasNext())
{
@@ -150,7 +162,17 @@
@@ -151,7 +162,17 @@
if (list1.size() > 1)
{
this.field_94258_i.add(texturestitched);
- String s3 = this.field_94254_c + s2 + ".txt";
this.listTextureStiched.add(texturestitched);
- String s3 = this.basePath + s2 + ".txt";
+ String s3;
+ if (s2.indexOf(':') == -1)
+ {
+ s3 = field_94254_c + s2 + ".txt";
+ s3 = basePath + s2 + ".txt";
+ }
+ else
+ {
+ String domain = s2.substring(0, s2.indexOf(':'));
+ String file = s2.substring(s2.indexOf(':') + 1);
+ s3 = "mods/" + domain + "/" + field_94254_c + file + ".txt";
+ s3 = "mods/" + domain + "/" + basePath + file + ".txt";
+ }
ITexturePack itexturepack = Minecraft.getMinecraft().texturePackList.getSelectedTexturePack();
boolean flag1 = !itexturepack.func_98138_b("/" + this.field_94254_c + s2 + ".png", false);
boolean flag1 = !itexturepack.func_98138_b("/" + this.basePath + s2 + ".png", false);
@@ -176,7 +198,11 @@
texturestitched1.func_94217_a(this.field_94250_g);
@@ -177,7 +198,11 @@
texturestitched1.copyFrom(this.missingTextureStiched);
}
- this.field_94257_h.func_94279_c("debug.stitched_" + this.field_94253_b + ".png");
- this.atlasTexture.writeImage("debug.stitched_" + this.textureName + ".png");
+ if (!ForgeDummyContainer.disableStitchedFileSaving)
+ {
+ this.field_94257_h.func_94279_c("debug.stitched_" + this.field_94253_b + ".png");
+ this.atlasTexture.writeImage("debug.stitched_" + this.textureName + ".png");
+ }
+ ForgeHooksClient.onTextureStitchedPost(this);
this.field_94257_h.func_94285_g();
this.atlasTexture.createTexture();
}
@@ -218,4 +244,37 @@
@@ -219,4 +244,37 @@
{
return this.field_94250_g;
return this.missingTextureStiched;
}
+
+ //===================================================================================================
@ -105,7 +106,7 @@
+ */
+ public TextureStitched getTextureExtry(String name)
+ {
+ return (TextureStitched)field_94256_j.get(name);
+ return (TextureStitched)textureStichedMap.get(name);
+ }
+
+ /**
@ -118,9 +119,9 @@
+ */
+ public boolean setTextureEntry(String name, TextureStitched entry)
+ {
+ if (!field_94256_j.containsKey(name))
+ if (!textureStichedMap.containsKey(name))
+ {
+ field_94256_j.put(name, entry);
+ textureStichedMap.put(name, entry);
+ return true;
+ }
+ return false;

View File

@ -14,8 +14,8 @@
import net.minecraft.util.Icon;
import net.minecraft.util.Tuple;
@@ -196,4 +200,28 @@
this.field_94236_i = arraylist;
@@ -238,4 +242,28 @@
this.listAnimationTuples = arraylist;
}
}
+

View File

@ -32,7 +32,7 @@
import net.minecraft.util.Vec3;
@@ -225,6 +232,11 @@
private boolean invulnerable;
private UUID field_96093_i;
private UUID entityUniqueID;
public EnumEntitySize myEntitySize;
+ /** Forge: Used to store custom data for each entity. */
+ private NBTTagCompound customEntityData;
@ -53,8 +53,8 @@
this.firstUpdate = false;
@@ -1534,6 +1546,10 @@
par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal);
par1NBTTagCompound.setLong("UUIDMost", this.field_96093_i.getMostSignificantBits());
par1NBTTagCompound.setLong("UUIDLeast", this.field_96093_i.getLeastSignificantBits());
par1NBTTagCompound.setLong("UUIDMost", this.entityUniqueID.getMostSignificantBits());
par1NBTTagCompound.setLong("UUIDLeast", this.entityUniqueID.getLeastSignificantBits());
+ if (customEntityData != null)
+ {
+ par1NBTTagCompound.setCompoundTag("ForgeData", customEntityData);
@ -73,7 +73,7 @@
+ //Rawr, legacy code, Vanilla added a UUID, keep this so older maps will convert properly
+ if (par1NBTTagCompound.hasKey("PersistentIDMSB") && par1NBTTagCompound.hasKey("PersistentIDLSB"))
+ {
+ this.field_96093_i = new UUID(par1NBTTagCompound.getLong("PersistentIDMSB"), par1NBTTagCompound.getLong("PersistentIDLSB"));
+ this.entityUniqueID = new UUID(par1NBTTagCompound.getLong("PersistentIDMSB"), par1NBTTagCompound.getLong("PersistentIDLSB"));
+ }
this.readEntityFromNBT(par1NBTTagCompound);
}
@ -186,7 +186,7 @@
+
+ public UUID getPersistentID()
+ {
+ return field_96093_i;
+ return entityUniqueID;
+ }
+
+ /**

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/entity/EntityLiving.java
+++ ../src_work/minecraft/net/minecraft/entity/EntityLiving.java
@@ -20,6 +20,7 @@
@@ -22,6 +22,7 @@
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
@ -8,7 +8,7 @@
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
@@ -47,6 +48,11 @@
@@ -50,6 +51,11 @@
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
@ -20,7 +20,7 @@
public abstract class EntityLiving extends Entity
{
/**
@@ -395,6 +401,7 @@
@@ -398,6 +404,7 @@
public void setAttackTarget(EntityLiving par1EntityLiving)
{
this.attackTarget = par1EntityLiving;
@ -28,7 +28,7 @@
}
/**
@@ -491,6 +498,7 @@
@@ -494,6 +501,7 @@
{
this.entityLivingToAttack = par1EntityLiving;
this.revengeTimer = this.entityLivingToAttack != null ? 100 : 0;
@ -36,7 +36,7 @@
}
protected void entityInit()
@@ -802,6 +810,11 @@
@@ -805,6 +813,11 @@
*/
public void onUpdate()
{
@ -48,7 +48,7 @@
super.onUpdate();
if (!this.worldObj.isRemote)
@@ -987,6 +1000,11 @@
@@ -990,6 +1003,11 @@
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
@ -60,7 +60,7 @@
if (this.isEntityInvulnerable())
{
return false;
@@ -1224,6 +1242,11 @@
@@ -1227,6 +1245,11 @@
{
if (!this.isEntityInvulnerable())
{
@ -72,7 +72,7 @@
par2 = this.applyArmorCalculations(par1DamageSource, par2);
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
int j = this.getHealth();
@@ -1290,6 +1313,11 @@
@@ -1293,6 +1316,11 @@
*/
public void onDeath(DamageSource par1DamageSource)
{
@ -84,7 +84,7 @@
Entity entity = par1DamageSource.getEntity();
EntityLiving entityliving = this.func_94060_bK();
@@ -1314,6 +1342,10 @@
@@ -1317,6 +1345,10 @@
i = EnchantmentHelper.getLootingModifier((EntityLiving)entity);
}
@ -95,7 +95,7 @@
if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
{
this.dropFewItems(this.recentlyHit > 0, i);
@@ -1321,7 +1353,7 @@
@@ -1324,7 +1356,7 @@
if (this.recentlyHit > 0)
{
@ -104,7 +104,7 @@
if (j < 5)
{
@@ -1329,6 +1361,16 @@
@@ -1332,6 +1364,16 @@
}
}
}
@ -121,7 +121,7 @@
}
this.worldObj.setEntityState(this, (byte)3);
@@ -1373,6 +1415,12 @@
@@ -1376,6 +1418,12 @@
*/
protected void fall(float par1)
{
@ -134,7 +134,7 @@
super.fall(par1);
int i = MathHelper.ceiling_float_int(par1 - 3.0F);
@@ -1575,7 +1623,7 @@
@@ -1578,7 +1626,7 @@
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
int l = this.worldObj.getBlockId(i, j, k);
@ -143,7 +143,7 @@
}
/**
@@ -1997,6 +2045,7 @@
@@ -2000,6 +2048,7 @@
}
this.isAirBorne = true;
@ -151,7 +151,7 @@
}
/**
@@ -2534,8 +2583,6 @@
@@ -2552,8 +2601,6 @@
return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD;
}
@ -160,7 +160,7 @@
/**
* Remove the speified potion effect from this entity.
*/
@@ -3059,4 +3106,42 @@
@@ -3077,4 +3124,42 @@
{
this.canPickUpLoot = par1;
}

View File

@ -10,8 +10,8 @@
+
+ if (block != null)
{
- if (j2 != Block.obsidian.blockID && j2 != Block.whiteStone.blockID && j2 != Block.bedrock.blockID)
+ if (block.canDragonDestroy(worldObj, k1, l1, i2))
- if (j2 != Block.obsidian.blockID && j2 != Block.whiteStone.blockID && j2 != Block.bedrock.blockID && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"))
+ if (block.canDragonDestroy(worldObj, k1, l1, i2) && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"))
{
flag1 = this.worldObj.func_94571_i(k1, l1, i2) || flag1;
flag1 = this.worldObj.setBlockToAir(k1, l1, i2) || flag1;
}

View File

@ -79,7 +79,7 @@
+ int i1 = rail.getBasicRailMetadata(worldObj, this, j, i, k);
+ this.func_94091_a(j, i, k, maxSpeed, getSlopeAdjustment(), l, i1);
if (l == Block.field_94337_cv.blockID)
if (l == Block.railActivator.blockID)
{
- this.func_96095_a(j, i, k, (i1 & 8) != 0);
+ this.func_96095_a(j, i, k, (worldObj.getBlockMetadata(j, i, k) & 8) != 0);
@ -294,7 +294,7 @@
{
par1Entity.motionX *= 0.20000000298023224D;
par1Entity.motionZ *= 0.20000000298023224D;
@@ -1145,4 +1171,211 @@
@@ -1149,4 +1175,211 @@
{
return this.field_94102_c;
}
@ -370,7 +370,7 @@
+ }
+ else if (this instanceof EntityMinecartTNT)
+ {
+ return new ItemStack(Item.field_94582_cb);
+ return new ItemStack(Item.tntMinecart);
+ }
+ else if (this instanceof EntityMinecartFurnace)
+ {
@ -378,7 +378,7 @@
+ }
+ else if (this instanceof EntityMinecartHopper)
+ {
+ return new ItemStack(Item.field_96600_cc);
+ return new ItemStack(Item.hopperMinecart);
+ }
+ return new ItemStack(Item.minecartEmpty);
+ }

View File

@ -9,7 +9,7 @@
public abstract class EntityMinecartContainer extends EntityMinecart implements IInventory
{
@@ -275,6 +277,10 @@
@@ -278,6 +280,10 @@
*/
public boolean interact(EntityPlayer par1EntityPlayer)
{

View File

@ -82,4 +82,4 @@
+ }
}
Collection collection = this.worldObj.func_96441_U().func_96520_a(ScoreObjectiveCriteria.field_96642_c);
Collection collection = this.worldObj.getScoreboard().func_96520_a(ScoreObjectiveCriteria.field_96642_c);

View File

@ -1,7 +1,7 @@
--- ../src_base/minecraft/net/minecraft/item/BehaviorDispenseArmor.java
+++ ../src_work/minecraft/net/minecraft/item/BehaviorDispenseArmor.java
@@ -31,7 +31,7 @@
int i1 = EntityLiving.func_82159_b(par2ItemStack);
int i1 = EntityLiving.getArmorPosition(par2ItemStack);
ItemStack itemstack1 = par2ItemStack.copy();
itemstack1.stackSize = 1;
- entityliving.setCurrentItemOrArmor(i1 - l, itemstack1);

View File

@ -36,7 +36,7 @@
}
itemsList[256 + par1] = this;
@@ -636,6 +642,10 @@
@@ -640,6 +646,10 @@
float f7 = f4 * f5;
float f8 = f3 * f5;
double d3 = 5.0D;
@ -47,7 +47,7 @@
Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3);
return par1World.rayTraceBlocks_do_do(vec3, vec31, par3, !par3);
}
@@ -716,4 +726,324 @@
@@ -720,4 +730,324 @@
{
StatList.initStats();
}

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/item/ItemBlock.java
+++ ../src_work/minecraft/net/minecraft/item/ItemBlock.java
@@ -60,7 +60,8 @@
@@ -64,7 +64,8 @@
{
par7 = 1;
}
@ -10,11 +10,11 @@
{
if (par7 == 0)
{
@@ -111,14 +112,8 @@
@@ -115,14 +116,8 @@
int j1 = this.getMetadata(par1ItemStack.getItemDamage());
int k1 = Block.blocksList[this.blockID].onBlockPlaced(par3World, par4, par5, par6, par7, par8, par9, par10, j1);
- if (par3World.setBlockAndMetadataWithNotify(par4, par5, par6, this.blockID, k1, 3))
- if (par3World.setBlock(par4, par5, par6, this.blockID, k1, 3))
- {
- if (par3World.getBlockId(par4, par5, par6) == this.blockID)
- {
@ -27,7 +27,7 @@
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
--par1ItemStack.stackSize;
}
@@ -144,7 +139,8 @@
@@ -148,7 +143,8 @@
{
par5 = 1;
}
@ -37,8 +37,8 @@
{
if (par5 == 0)
{
@@ -227,4 +223,28 @@
this.field_94588_b = par1IconRegister.func_94245_a(s);
@@ -231,4 +227,28 @@
this.field_94588_b = par1IconRegister.registerIcon(s);
}
}
+
@ -52,7 +52,7 @@
+ */
+ public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
+ {
+ if (!world.setBlockAndMetadataWithNotify(x, y, z, this.blockID, metadata, 3))
+ if (!world.setBlock(x, y, z, this.blockID, metadata, 3))
+ {
+ return false;
+ }

View File

@ -42,7 +42,7 @@
if (l == Block.sapling.blockID)
{
@@ -244,16 +270,9 @@
par1World.setBlockAndMetadataWithNotify(j1, k1, l1, Block.tallGrass.blockID, 1, 3);
par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3);
}
}
- else if (itemRand.nextInt(3) != 0)
@ -50,12 +50,12 @@
{
- if (Block.plantYellow.canBlockStay(par1World, j1, k1, l1))
- {
- par1World.func_94575_c(j1, k1, l1, Block.plantYellow.blockID);
- par1World.setBlock(j1, k1, l1, Block.plantYellow.blockID);
- }
- }
- else if (Block.plantRed.canBlockStay(par1World, j1, k1, l1))
- {
- par1World.func_94575_c(j1, k1, l1, Block.plantRed.blockID);
- par1World.setBlock(j1, k1, l1, Block.plantRed.blockID);
+ ForgeHooks.plantGrass(par1World, j1, k1, l1);
}
}

View File

@ -77,7 +77,7 @@
block.onBlockHarvested(this.theWorld, par1, par2, par3, l, this.thisPlayerMP);
}
- boolean flag = this.theWorld.func_94571_i(par1, par2, par3);
- boolean flag = this.theWorld.setBlockToAir(par1, par2, par3);
+ boolean flag = (block != null && block.removeBlockByPlayer(theWorld, thisPlayerMP, par1, par2, par3));
if (block != null && flag)

View File

@ -24,7 +24,7 @@
- if (i1 == this.soilId && par3World.isAirBlock(par4, par5 + 1, par6))
+ if (soil != null && soil.canSustainPlant(par3World, par4, par5, par6, ForgeDirection.UP, this) && par3World.isAirBlock(par4, par5 + 1, par6))
{
par3World.func_94575_c(par4, par5 + 1, par6, this.cropId);
par3World.setBlock(par4, par5 + 1, par6, this.cropId);
--par1ItemStack.stackSize;
@@ -48,4 +53,22 @@
return false;

View File

@ -26,7 +26,7 @@
- if (i1 == this.soilBlockID && par3World.isAirBlock(par4, par5 + 1, par6))
+ if (soil != null && soil.canSustainPlant(par3World, par4, par5, par6, ForgeDirection.UP, this) && par3World.isAirBlock(par4, par5 + 1, par6))
{
par3World.func_94575_c(par4, par5 + 1, par6, this.blockType);
par3World.setBlock(par4, par5 + 1, par6, this.blockType);
--par1ItemStack.stackSize;
@@ -52,4 +58,22 @@
return false;

View File

@ -52,7 +52,7 @@
this.playerEntity.moveEntity(d4, d6, d7);
@@ -347,10 +364,15 @@
this.mcServer.func_98033_al().func_98236_b(this.playerEntity.username + " moved wrongly!");
this.mcServer.getLogAgent().logWarning(this.playerEntity.username + " moved wrongly!");
}
+ if (!this.hasMoved) //Fixes "Moved Too Fast" kick when being teleported while moving
@ -137,7 +137,7 @@
+ return;
+ }
+ s = event.line;
this.mcServer.func_98033_al().func_98233_a(s);
this.mcServer.getLogAgent().logInfo(s);
this.mcServer.getConfigurationManager().sendPacketToAllPlayers(new Packet3Chat(s, false));
}
@@ -822,7 +865,7 @@
@ -149,11 +149,3 @@
}
}
}
@@ -1220,7 +1263,6 @@
}
}
}
-
@Override

View File

@ -16,7 +16,7 @@
- if (par4 >= 64)
+ if (par4 >= ForgeDummyContainer.clumpingThreshold)
{
- this.field_98193_m.func_98233_a("ChunkTilesUpdatePacket compress " + par4);
- this.field_98193_m.logInfo("ChunkTilesUpdatePacket compress " + par4);
-
if (field_73449_e.length < l)
{

View File

@ -104,4 +104,4 @@
+ }
}
/**
public boolean func_102028_d()

View File

@ -60,23 +60,23 @@
- {
- if (this.isDemo())
- {
- this.worldServers[j] = new DemoWorldServer(this, isavehandler, par2Str, b0, this.theProfiler, this.func_98033_al());
- this.worldServers[j] = new DemoWorldServer(this, isavehandler, par2Str, b0, this.theProfiler, this.getLogAgent());
- }
- else
- {
- this.worldServers[j] = new WorldServer(this, isavehandler, par2Str, b0, worldsettings, this.theProfiler, this.func_98033_al());
- this.worldServers[j] = new WorldServer(this, isavehandler, par2Str, b0, worldsettings, this.theProfiler, this.getLogAgent());
- }
- }
- else
- {
- this.worldServers[j] = new WorldServerMulti(this, isavehandler, par2Str, b0, worldsettings, this.worldServers[0], this.theProfiler, this.func_98033_al());
- this.worldServers[j] = new WorldServerMulti(this, isavehandler, par2Str, b0, worldsettings, this.worldServers[0], this.theProfiler, this.getLogAgent());
- }
-
- this.worldServers[j].addWorldAccess(new WorldManager(this, this.worldServers[j]));
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, func_98033_al()) : new WorldServer(this, isavehandler, par2Str, 0, worldsettings, theProfiler, func_98033_al()));
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, worldsettings, theProfiler, getLogAgent()));
+ for (int dim : DimensionManager.getStaticDimensionIDs())
+ {
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, worldsettings, overWorld, theProfiler, func_98033_al()));
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, worldsettings, overWorld, theProfiler, getLogAgent()));
+ world.addWorldAccess(new WorldManager(this, world));
if (!this.isSinglePlayer())

View File

@ -24,10 +24,10 @@
- byte b0 = 0;
-
- if (j == 1)
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, func_98033_al()) : new WorldServer(this, isavehandler, par2Str, 0, theWorldSettings, theProfiler, func_98033_al()));
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, theWorldSettings, theProfiler, getLogAgent()));
+ for (int dim : DimensionManager.getStaticDimensionIDs())
+ {
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, theWorldSettings, overWorld, theProfiler, func_98033_al()));
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, theWorldSettings, overWorld, theProfiler, getLogAgent()));
+ world.addWorldAccess(new WorldManager(this, world));
+
+ if (!this.isSinglePlayer())
@ -45,16 +45,16 @@
- {
- if (this.isDemo())
- {
- this.worldServers[j] = new DemoWorldServer(this, isavehandler, par2Str, b0, this.theProfiler, this.func_98033_al());
- this.worldServers[j] = new DemoWorldServer(this, isavehandler, par2Str, b0, this.theProfiler, this.getLogAgent());
- }
- else
- {
- this.worldServers[j] = new WorldServer(this, isavehandler, par2Str, b0, this.theWorldSettings, this.theProfiler, this.func_98033_al());
- this.worldServers[j] = new WorldServer(this, isavehandler, par2Str, b0, this.theWorldSettings, this.theProfiler, this.getLogAgent());
- }
- }
- else
- {
- this.worldServers[j] = new WorldServerMulti(this, isavehandler, par2Str, b0, this.theWorldSettings, this.worldServers[0], this.theProfiler, this.func_98033_al());
- this.worldServers[j] = new WorldServerMulti(this, isavehandler, par2Str, b0, this.theWorldSettings, this.worldServers[0], this.theProfiler, this.getLogAgent());
- }
-
- this.worldServers[j].addWorldAccess(new WorldManager(this, this.worldServers[j]));

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java
+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java
@@ -177,7 +177,7 @@
@@ -184,7 +184,7 @@
if (Item.itemsList[itemstack.itemID].hasContainerItem())
{

View File

@ -19,9 +19,9 @@
+
+public class TileEntityFurnace extends TileEntity implements ISidedInventory, net.minecraftforge.common.ISidedInventory
{
/**
* The ItemStacks that hold the items currently being used in the furnace
@@ -268,8 +271,7 @@
private static final int[] field_102010_d = new int[] {0};
private static final int[] field_102011_e = new int[] {2, 1};
@@ -276,8 +279,7 @@
if (this.furnaceItemStacks[1].stackSize == 0)
{
@ -31,7 +31,7 @@
}
}
}
@@ -315,8 +317,12 @@
@@ -323,8 +325,12 @@
}
else
{
@ -46,7 +46,7 @@
}
}
@@ -327,15 +333,15 @@
@@ -335,15 +341,15 @@
{
if (this.canSmelt())
{
@ -66,7 +66,7 @@
}
--this.furnaceItemStacks[0].stackSize;
@@ -362,7 +368,7 @@
@@ -370,7 +376,7 @@
int i = par0ItemStack.getItem().itemID;
Item item = par0ItemStack.getItem();
@ -75,9 +75,9 @@
{
Block block = Block.blocksList[i];
@@ -423,4 +429,50 @@
@@ -442,4 +448,50 @@
{
return 1;
return par3 != 0 || par1 != 1 || par2ItemStack.itemID == Item.bucketEmpty.itemID;
}
+
+ /***********************************************************************************

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/world/ChunkCache.java
+++ ../src_work/minecraft/net/minecraft/world/ChunkCache.java
@@ -99,7 +99,15 @@
@@ -108,7 +108,15 @@
{
int l = (par1 >> 4) - this.chunkX;
int i1 = (par3 >> 4) - this.chunkZ;
@ -17,7 +17,7 @@
}
@SideOnly(Side.CLIENT)
@@ -150,7 +158,12 @@
@@ -159,7 +167,12 @@
{
int l = (par1 >> 4) - this.chunkX;
int i1 = (par3 >> 4) - this.chunkZ;
@ -31,3 +31,13 @@
}
}
@@ -306,8 +319,7 @@
*/
public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3)
{
- Block block = Block.blocksList[this.getBlockId(par1, par2, par3)];
- return this.worldObj.func_102026_a(block, this.getBlockMetadata(par1, par2, par3));
+ return this.worldObj.doesBlockHaveSolidTopSurface(par1, par2, par3);
}
/**

View File

@ -149,7 +149,7 @@
}
/**
@@ -1132,7 +1191,7 @@
@@ -1156,7 +1215,7 @@
*/
public boolean isDaytime()
{
@ -158,7 +158,7 @@
}
/**
@@ -1164,7 +1223,7 @@
@@ -1188,7 +1247,7 @@
int l1 = this.getBlockMetadata(l, i1, j1);
Block block = Block.blocksList[k1];
@ -167,7 +167,7 @@
{
MovingObjectPosition movingobjectposition = block.collisionRayTrace(this, l, i1, j1, par1Vec3, par2Vec3);
@@ -1364,6 +1423,12 @@
@@ -1388,6 +1447,12 @@
*/
public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4)
{
@ -180,7 +180,7 @@
if (par1Entity != null && par2Str != null)
{
for (int i = 0; i < this.worldAccesses.size(); ++i)
@@ -1378,6 +1443,12 @@
@@ -1402,6 +1467,12 @@
*/
public void playSoundToNearExcept(EntityPlayer par1EntityPlayer, String par2Str, float par3, float par4)
{
@ -193,7 +193,7 @@
if (par1EntityPlayer != null && par2Str != null)
{
for (int i = 0; i < this.worldAccesses.size(); ++i)
@@ -1464,6 +1535,11 @@
@@ -1488,6 +1559,11 @@
EntityPlayer entityplayer = (EntityPlayer)par1Entity;
this.playerEntities.add(entityplayer);
this.updateAllPlayersSleepingFlag();
@ -205,7 +205,7 @@
}
this.getChunkFromChunkCoords(i, j).addEntity(par1Entity);
@@ -1710,6 +1786,12 @@
@@ -1734,6 +1810,12 @@
* Calculates the color for the skybox
*/
public Vec3 getSkyColor(Entity par1Entity, float par2)
@ -218,7 +218,7 @@
{
float f1 = this.getCelestialAngle(par2);
float f2 = MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
@@ -1802,6 +1884,12 @@
@@ -1826,6 +1908,12 @@
@SideOnly(Side.CLIENT)
public Vec3 getCloudColour(float par1)
{
@ -231,7 +231,7 @@
float f1 = this.getCelestialAngle(par1);
float f2 = MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.5F;
@@ -1880,7 +1968,7 @@
@@ -1904,7 +1992,7 @@
{
int l = chunk.getBlockID(par1, k, par2);
@ -240,7 +240,7 @@
{
return k + 1;
}
@@ -1895,6 +1983,12 @@
@@ -1919,6 +2007,12 @@
* How bright are stars in the sky
*/
public float getStarBrightness(float par1)
@ -253,7 +253,7 @@
{
float f1 = this.getCelestialAngle(par1);
float f2 = 1.0F - (MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.25F);
@@ -1959,7 +2053,15 @@
@@ -1983,7 +2077,15 @@
entity.func_85029_a(crashreportcategory);
}
@ -270,7 +270,7 @@
}
if (entity.isDead)
@@ -2021,7 +2123,16 @@
@@ -2045,7 +2147,16 @@
crashreport = CrashReport.makeCrashReport(throwable1, "Ticking entity");
crashreportcategory = crashreport.makeCategory("Entity being ticked");
entity.func_85029_a(crashreportcategory);
@ -288,7 +288,7 @@
}
}
@@ -2030,16 +2141,8 @@
@@ -2054,16 +2165,8 @@
if (entity.isDead)
{
@ -307,7 +307,7 @@
}
this.theProfiler.endSection();
@@ -2064,7 +2167,16 @@
@@ -2088,7 +2191,16 @@
crashreport = CrashReport.makeCrashReport(throwable2, "Ticking tile entity");
crashreportcategory = crashreport.makeCategory("Tile entity being ticked");
tileentity.func_85027_a(crashreportcategory);
@ -316,7 +316,7 @@
+ {
+ FMLLog.severe(crashreport.getCompleteReport());
+ tileentity.invalidate();
+ func_94571_i(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord);
+ setBlockToAir(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord);
+ }
+ else
+ {
@ -325,7 +325,7 @@
}
}
@@ -2078,7 +2190,7 @@
@@ -2102,7 +2214,7 @@
if (chunk != null)
{
@ -334,7 +334,7 @@
}
}
}
@@ -2087,6 +2199,10 @@
@@ -2111,6 +2223,10 @@
if (!this.entityRemoval.isEmpty())
{
@ -345,7 +345,7 @@
this.loadedTileEntityList.removeAll(this.entityRemoval);
this.entityRemoval.clear();
}
@@ -2107,18 +2223,18 @@
@@ -2131,18 +2247,18 @@
{
this.loadedTileEntityList.add(tileentity1);
}
@ -368,7 +368,7 @@
}
}
@@ -2131,13 +2247,13 @@
@@ -2155,13 +2271,13 @@
public void addTileEntity(Collection par1Collection)
{
@ -389,7 +389,7 @@
}
}
@@ -2157,9 +2273,17 @@
@@ -2181,9 +2297,17 @@
{
int i = MathHelper.floor_double(par1Entity.posX);
int j = MathHelper.floor_double(par1Entity.posZ);
@ -410,7 +410,7 @@
{
par1Entity.lastTickPosX = par1Entity.posX;
par1Entity.lastTickPosY = par1Entity.posY;
@@ -2392,6 +2516,14 @@
@@ -2416,6 +2540,14 @@
{
return true;
}
@ -425,7 +425,7 @@
}
}
}
@@ -2714,38 +2846,38 @@
@@ -2738,38 +2870,38 @@
*/
public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
{
@ -484,7 +484,7 @@
}
}
@@ -2754,27 +2886,10 @@
@@ -2778,27 +2910,10 @@
*/
public void removeBlockTileEntity(int par1, int par2, int par3)
{
@ -516,7 +516,7 @@
}
}
@@ -2800,7 +2915,8 @@
@@ -2824,7 +2939,8 @@
*/
public boolean isBlockNormalCube(int par1, int par2, int par3)
{
@ -526,17 +526,25 @@
}
public boolean func_85174_u(int par1, int par2, int par3)
@@ -2823,8 +2939,7 @@
@@ -2847,12 +2963,13 @@
*/
public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3)
{
- Block block = Block.blocksList[this.getBlockId(par1, par2, par3)];
- return block == null ? false : (block.blockMaterial.isOpaque() && block.renderAsNormalBlock() ? true : (block instanceof BlockStairs ? (this.getBlockMetadata(par1, par2, par3) & 4) == 4 : (block instanceof BlockHalfSlab ? (this.getBlockMetadata(par1, par2, par3) & 8) == 8 : (block instanceof BlockHopper ? true : (block instanceof BlockSnow ? (this.getBlockMetadata(par1, par2, par3) & 7) == 7 : false)))));
- return this.func_102026_a(block, this.getBlockMetadata(par1, par2, par3));
- }
-
+ return isBlockSolidOnSide(par1, par2, par3, ForgeDirection.UP);
+ }
+
+ @Deprecated //DO NOT USE THIS!!! USE doesBlockHaveSolidTopSurface
public boolean func_102026_a(Block par1Block, int par2)
{
+ // -.- Mojang PLEASE make this location sensitive, you have no reason not to.
return par1Block == null ? false : (par1Block.blockMaterial.isOpaque() && par1Block.renderAsNormalBlock() ? true : (par1Block instanceof BlockStairs ? (par2 & 4) == 4 : (par1Block instanceof BlockHalfSlab ? (par2 & 8) == 8 : (par1Block instanceof BlockHopper ? true : (par1Block instanceof BlockSnow ? (par2 & 7) == 7 : false)))));
}
/**
@@ -2840,7 +2955,7 @@
@@ -2869,7 +2986,7 @@
if (chunk != null && !chunk.isEmpty())
{
Block block = Block.blocksList[this.getBlockId(par1, par2, par3)];
@ -545,7 +553,7 @@
}
else
{
@@ -2871,8 +2986,7 @@
@@ -2900,8 +3017,7 @@
*/
public void setAllowedSpawnTypes(boolean par1, boolean par2)
{
@ -555,7 +563,7 @@
}
/**
@@ -2888,6 +3002,11 @@
@@ -2917,6 +3033,11 @@
*/
private void calculateInitialWeather()
{
@ -567,7 +575,7 @@
if (this.worldInfo.isRaining())
{
this.rainingStrength = 1.0F;
@@ -2903,6 +3022,11 @@
@@ -2932,6 +3053,11 @@
* Updates all weather states.
*/
protected void updateWeather()
@ -579,7 +587,7 @@
{
if (!this.provider.hasNoSky)
{
@@ -3000,12 +3124,14 @@
@@ -3029,12 +3155,14 @@
public void toggleRain()
{
@ -595,7 +603,7 @@
this.theProfiler.startSection("buildList");
int i;
EntityPlayer entityplayer;
@@ -3112,6 +3238,11 @@
@@ -3141,6 +3269,11 @@
*/
public boolean canBlockFreeze(int par1, int par2, int par3, boolean par4)
{
@ -607,7 +615,7 @@
BiomeGenBase biomegenbase = this.getBiomeGenForCoords(par1, par3);
float f = biomegenbase.getFloatTemperature();
@@ -3170,6 +3301,11 @@
@@ -3199,6 +3332,11 @@
*/
public boolean canSnowAt(int par1, int par2, int par3)
{
@ -619,7 +627,7 @@
BiomeGenBase biomegenbase = this.getBiomeGenForCoords(par1, par3);
float f = biomegenbase.getFloatTemperature();
@@ -3213,10 +3349,12 @@
@@ -3242,10 +3380,12 @@
else
{
int l = this.getBlockId(par1, par2, par3);
@ -636,7 +644,7 @@
{
j1 = 1;
}
@@ -3312,7 +3450,9 @@
@@ -3341,7 +3481,9 @@
int j4 = i2 + Facing.offsetsXForSide[i4];
int k4 = j2 + Facing.offsetsYForSide[i4];
int l4 = k2 + Facing.offsetsZForSide[i4];
@ -647,7 +655,7 @@
i3 = this.getSavedLightValue(par1EnumSkyBlock, j4, k4, l4);
if (i3 == l2 - i5 && i1 < this.lightUpdateBlockList.length)
@@ -3415,10 +3555,10 @@
@@ -3444,10 +3586,10 @@
public List func_94576_a(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
{
ArrayList arraylist = new ArrayList();
@ -662,7 +670,7 @@
for (int i1 = i; i1 <= j; ++i1)
{
@@ -3444,10 +3584,10 @@
@@ -3473,10 +3615,10 @@
public List selectEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, IEntitySelector par3IEntitySelector)
{
@ -677,7 +685,7 @@
ArrayList arraylist = new ArrayList();
for (int i1 = i; i1 <= j; ++i1)
@@ -3540,11 +3680,14 @@
@@ -3569,11 +3711,14 @@
*/
public void addLoadedEntities(List par1List)
{
@ -695,7 +703,7 @@
}
}
@@ -3578,6 +3721,11 @@
@@ -3607,6 +3752,11 @@
else
{
if (block != null && (block == Block.waterMoving || block == Block.waterStill || block == Block.lavaMoving || block == Block.lavaStill || block == Block.fire || block.blockMaterial.isReplaceable()))
@ -707,7 +715,7 @@
{
block = null;
}
@@ -3866,7 +4014,7 @@
@@ -3901,7 +4051,7 @@
*/
public long getSeed()
{
@ -716,7 +724,7 @@
}
public long getTotalWorldTime()
@@ -3876,7 +4024,7 @@
@@ -3911,7 +4061,7 @@
public long getWorldTime()
{
@ -725,7 +733,7 @@
}
/**
@@ -3884,7 +4032,7 @@
@@ -3919,7 +4069,7 @@
*/
public void setWorldTime(long par1)
{
@ -734,7 +742,7 @@
}
/**
@@ -3892,13 +4040,13 @@
@@ -3927,13 +4077,13 @@
*/
public ChunkCoordinates getSpawnPoint()
{
@ -750,7 +758,7 @@
}
@SideOnly(Side.CLIENT)
@@ -3922,7 +4070,10 @@
@@ -3957,7 +4107,10 @@
if (!this.loadedEntityList.contains(par1Entity))
{
@ -762,7 +770,7 @@
}
}
@@ -3930,6 +4081,11 @@
@@ -3965,6 +4118,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)
@ -774,7 +782,7 @@
{
return true;
}
@@ -4050,8 +4206,7 @@
@@ -4085,8 +4243,7 @@
*/
public boolean isBlockHighHumidity(int par1, int par2, int par3)
{
@ -784,7 +792,7 @@
}
/**
@@ -4126,7 +4281,7 @@
@@ -4161,7 +4318,7 @@
*/
public int getHeight()
{
@ -793,7 +801,7 @@
}
/**
@@ -4134,7 +4289,7 @@
@@ -4169,7 +4326,7 @@
*/
public int getActualHeight()
{
@ -802,7 +810,7 @@
}
public IUpdatePlayerListBox func_82735_a(EntityMinecart par1EntityMinecart)
@@ -4177,7 +4332,7 @@
@@ -4212,7 +4369,7 @@
*/
public double getHorizon()
{
@ -811,7 +819,7 @@
}
/**
@@ -4280,4 +4435,114 @@
@@ -4315,4 +4472,114 @@
{
return this.field_98181_L;
}

View File

@ -42,8 +42,8 @@
super(par2ISaveHandler, par3Str, par5WorldSettings, WorldProvider.getProviderForDimension(par4), par6Profiler, par7ILogAgent);
@@ -122,6 +136,7 @@
scoreboardsavedata.func_96499_a(this.field_96442_D);
((ServerScoreboard)this.field_96442_D).func_96547_a(scoreboardsavedata);
scoreboardsavedata.func_96499_a(this.worldScoreboard);
((ServerScoreboard)this.worldScoreboard).func_96547_a(scoreboardsavedata);
+ DimensionManager.setWorld(par4, this);
}
@ -124,7 +124,7 @@
{
this.updateLCG = this.updateLCG * 3 + 1013904223;
i1 = this.updateLCG >> 2;
@@ -430,6 +459,9 @@
@@ -433,6 +462,9 @@
public void func_82740_a(int par1, int par2, int par3, int par4, int par5, int par6)
{
NextTickListEntry nextticklistentry = new NextTickListEntry(par1, par2, par3, par4);
@ -134,7 +134,7 @@
byte b0 = 0;
if (this.scheduledUpdatesAreImmediate && par4 > 0)
@@ -493,7 +525,7 @@
@@ -496,7 +528,7 @@
*/
public void updateEntities()
{
@ -143,7 +143,7 @@
{
if (this.updateEntityTick++ >= 1200)
{
@@ -559,6 +591,9 @@
@@ -562,6 +594,9 @@
{
nextticklistentry = (NextTickListEntry)iterator.next();
iterator.remove();
@ -153,7 +153,7 @@
byte b0 = 0;
if (this.checkChunksExist(nextticklistentry.xCoord - b0, nextticklistentry.yCoord - b0, nextticklistentry.zCoord - b0, nextticklistentry.xCoord + b0, nextticklistentry.yCoord + b0, nextticklistentry.zCoord + b0))
@@ -702,16 +737,28 @@
@@ -705,16 +740,28 @@
{
ArrayList arraylist = new ArrayList();
@ -192,7 +192,7 @@
return arraylist;
}
@@ -719,6 +766,11 @@
@@ -722,6 +769,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)
@ -204,7 +204,7 @@
{
return !this.mcServer.func_96290_a(this, par2, par3, par4, par1EntityPlayer);
}
@@ -803,7 +855,7 @@
@@ -806,7 +858,7 @@
*/
protected void createBonusChest()
{
@ -213,7 +213,7 @@
for (int i = 0; i < 10; ++i)
{
@@ -846,6 +898,7 @@
@@ -849,6 +901,7 @@
}
this.chunkProvider.saveChunks(par1, par2IProgressUpdate);
@ -221,7 +221,7 @@
}
}
@@ -857,6 +910,7 @@
@@ -860,6 +913,7 @@
this.checkSessionLock();
this.saveHandler.saveWorldInfoWithPlayer(this.worldInfo, this.mcServer.getConfigurationManager().getHostPlayerData());
this.mapStorage.saveAllData();
@ -229,7 +229,7 @@
}
/**
@@ -1070,4 +1124,9 @@
@@ -1073,4 +1127,9 @@
{
return this.field_85177_Q;
}

View File

@ -11,7 +11,7 @@
public class Chunk
{
/**
@@ -144,7 +148,9 @@
@@ -146,7 +150,9 @@
{
for (int j1 = 0; j1 < k; ++j1)
{
@ -22,7 +22,7 @@
if (b0 != 0)
{
@@ -163,6 +169,90 @@
@@ -165,6 +171,90 @@
}
/**
@ -113,7 +113,7 @@
* Checks whether the chunk is at the X/Z location specified
*/
public boolean isAtLocation(int par1, int par2)
@@ -226,7 +316,7 @@
@@ -228,7 +318,7 @@
{
int i1 = this.getBlockID(j, l - 1, k);
@ -122,7 +122,7 @@
{
--l;
continue;
@@ -532,7 +622,10 @@
@@ -534,7 +624,10 @@
public int getBlockLightOpacity(int par1, int par2, int par3)
{
@ -134,7 +134,7 @@
}
/**
@@ -540,7 +633,7 @@
@@ -542,7 +635,7 @@
*/
public int getBlockID(int par1, int par2, int par3)
{
@ -143,7 +143,7 @@
{
return 0;
}
@@ -556,7 +649,7 @@
@@ -558,7 +651,7 @@
*/
public int getBlockMetadata(int par1, int par2, int par3)
{
@ -152,7 +152,7 @@
{
return 0;
}
@@ -589,6 +682,11 @@
@@ -591,6 +684,11 @@
}
else
{
@ -164,7 +164,7 @@
ExtendedBlockStorage extendedblockstorage = this.storageArrays[par2 >> 4];
boolean flag = false;
@@ -619,9 +717,13 @@
@@ -621,9 +719,13 @@
{
Block.blocksList[l1].breakBlock(this.worldObj, j2, par2, k2, l1, i2);
}
@ -181,7 +181,7 @@
}
}
@@ -639,7 +741,7 @@
@@ -641,7 +743,7 @@
}
else
{
@ -190,7 +190,7 @@
{
if (par2 >= k1)
{
@@ -663,29 +765,21 @@
@@ -665,29 +767,21 @@
Block.blocksList[par4].onBlockAdded(this.worldObj, j2, par2, k2);
}
@ -223,7 +223,7 @@
}
}
@@ -700,7 +794,7 @@
@@ -702,7 +796,7 @@
*/
public boolean setBlockMetadata(int par1, int par2, int par3, int par4)
{
@ -232,7 +232,7 @@
if (extendedblockstorage == null)
{
@@ -720,7 +814,7 @@
@@ -722,7 +816,7 @@
extendedblockstorage.setExtBlockMetadata(par1, par2 & 15, par3, par4);
int j1 = extendedblockstorage.getExtBlockID(par1, par2 & 15, par3);
@ -241,7 +241,7 @@
{
TileEntity tileentity = this.getChunkBlockTileEntity(par1, par2, par3);
@@ -741,7 +835,7 @@
@@ -743,7 +837,7 @@
*/
public int getSavedLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
{
@ -250,7 +250,7 @@
return extendedblockstorage == null ? (this.canBlockSeeTheSky(par2, par3, par4) ? par1EnumSkyBlock.defaultLightValue : 0) : (par1EnumSkyBlock == EnumSkyBlock.Sky ? (this.worldObj.provider.hasNoSky ? 0 : extendedblockstorage.getExtSkylightValue(par2, par3 & 15, par4)) : (par1EnumSkyBlock == EnumSkyBlock.Block ? extendedblockstorage.getExtBlocklightValue(par2, par3 & 15, par4) : par1EnumSkyBlock.defaultLightValue));
}
@@ -751,6 +845,11 @@
@@ -753,6 +847,11 @@
*/
public void setLightValue(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4, int par5)
{
@ -262,7 +262,7 @@
ExtendedBlockStorage extendedblockstorage = this.storageArrays[par3 >> 4];
if (extendedblockstorage == null)
@@ -779,7 +878,7 @@
@@ -781,7 +880,7 @@
*/
public int getBlockLightValue(int par1, int par2, int par3, int par4)
{
@ -271,7 +271,7 @@
if (extendedblockstorage == null)
{
@@ -832,7 +931,7 @@
@@ -834,7 +933,7 @@
{
k = this.entityLists.length - 1;
}
@ -280,7 +280,7 @@
par1Entity.addedToChunk = true;
par1Entity.chunkCoordX = this.xPosition;
par1Entity.chunkCoordY = k;
@@ -882,33 +981,32 @@
@@ -884,33 +983,32 @@
ChunkPosition chunkposition = new ChunkPosition(par1, par2, par3);
TileEntity tileentity = (TileEntity)this.chunkTileEntityMap.get(chunkposition);
@ -325,7 +325,7 @@
}
/**
@@ -923,7 +1021,7 @@
@@ -925,7 +1023,7 @@
if (this.isChunkLoaded)
{
@ -334,7 +334,7 @@
}
}
@@ -938,7 +1036,8 @@
@@ -940,7 +1038,8 @@
par4TileEntity.yCoord = par2;
par4TileEntity.zCoord = this.zPosition * 16 + par3;
@ -344,7 +344,7 @@
{
if (this.chunkTileEntityMap.containsKey(chunkposition))
{
@@ -980,6 +1079,7 @@
@@ -982,6 +1081,7 @@
{
this.worldObj.addLoadedEntities(this.entityLists[i]);
}
@ -352,7 +352,7 @@
}
/**
@@ -1000,6 +1100,7 @@
@@ -1002,6 +1102,7 @@
{
this.worldObj.unloadEntities(this.entityLists[i]);
}
@ -360,7 +360,7 @@
}
/**
@@ -1016,8 +1117,8 @@
@@ -1018,8 +1119,8 @@
*/
public void getEntitiesWithinAABBForEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB, List par3List, IEntitySelector par4IEntitySelector)
{
@ -371,7 +371,7 @@
if (i < 0)
{
@@ -1066,8 +1167,8 @@
@@ -1068,8 +1169,8 @@
*/
public void getEntitiesOfTypeWithinAAAB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, List par3List, IEntitySelector par4IEntitySelector)
{
@ -382,7 +382,7 @@
if (i < 0)
{
@@ -1250,6 +1351,15 @@
@@ -1252,6 +1353,15 @@
*/
public void fillChunk(byte[] par1ArrayOfByte, int par2, int par3, boolean par4)
{
@ -398,7 +398,7 @@
int k = 0;
boolean flag1 = !this.worldObj.provider.hasNoSky;
int l;
@@ -1350,12 +1460,26 @@
@@ -1352,12 +1462,26 @@
}
this.generateHeightMap();
@ -429,7 +429,7 @@
}
}
@@ -1464,4 +1588,18 @@
@@ -1466,4 +1590,18 @@
}
}
}

View File

@ -31,10 +31,10 @@
- if ((i1 == Block.grass.blockID || i1 == Block.dirt.blockID) && par4 < 256 - l - 1)
- {
- par1World.setBlockAndMetadataWithNotify(par3, par4 - 1, par5, Block.dirt.blockID, 0, 2);
- par1World.setBlockAndMetadataWithNotify(par3 + 1, par4 - 1, par5, Block.dirt.blockID, 0, 2);
- par1World.setBlockAndMetadataWithNotify(par3, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2);
- par1World.setBlockAndMetadataWithNotify(par3 + 1, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2);
- par1World.setBlock(par3, par4 - 1, par5, Block.dirt.blockID, 0, 2);
- par1World.setBlock(par3 + 1, par4 - 1, par5, Block.dirt.blockID, 0, 2);
- par1World.setBlock(par3, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2);
- par1World.setBlock(par3 + 1, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2);
+ Block soil = Block.blocksList[i1];
+ boolean isValidSoil = soil != null && soil.canSustainPlant(par1World, par3, par4 - 1, par5, ForgeDirection.UP, (BlockSapling)Block.sapling);
+

View File

@ -29,8 +29,8 @@
+ Block block = Block.blocksList[par1World.getBlockId(k2, l2, i3)];
+ if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && (block != null && block.isGenMineableReplaceable(par1World, k2, l2, i3, field_94523_c)))
{
- par1World.setBlockAndMetadataWithNotify(k2, l2, i3, this.minableBlockId, 0, 2);
+ par1World.setBlockAndMetadataWithNotify(k2, l2, i3, this.minableBlockId, minableBlockMeta, 2);
- par1World.setBlock(k2, l2, i3, this.minableBlockId, 0, 2);
+ par1World.setBlock(k2, l2, i3, this.minableBlockId, minableBlockMeta, 2);
}
}
}