96537dc - Fixup Item in hand rendering of textures > 16x
e88ddc5 - Make the exception print for headless servers if the Downloader cant initalize. f24ff07 - Remove a bunch of warning about javadoc, not a real fix, but no more warning. 3420ea7 - Update MCP Mapings 87104f0 - Makes GetModSrc check the common folder when attempting to extract source files 640446b - Tie parent/child containers together again. Should close #96 2cf4917 - Village mating produces added villagers, and the egg should place added villagers too. Closes #97. 6394ee8 - Clean up stale references to the Player stored in the NetworkRegistry, closes #100 7299e05 - Merge pull request #99 from CovertJaguar/patch-1 c4bd040 - More readable init logs
This commit is contained in:
parent
bb2ac4c448
commit
62700fa7a8
30 changed files with 172 additions and 175 deletions
|
@ -94,7 +94,7 @@ public class DimensionManager
|
|||
tmp.add(entry.getValue());
|
||||
}
|
||||
|
||||
MinecraftServer.getServer().theWorldServer = tmp.toArray(new WorldServer[0]);
|
||||
MinecraftServer.getServer().worldServers = tmp.toArray(new WorldServer[0]);
|
||||
MinecraftServer.getServer().worldTickTimes.put(id, new long[100]);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -16,32 +16,31 @@
|
|||
|
||||
public abstract class MinecraftServer implements Runnable, IPlayerUsage, ICommandSender
|
||||
{
|
||||
@@ -129,7 +131,10 @@
|
||||
@@ -137,7 +139,9 @@
|
||||
public final long[] tickTimeArray = new long[100];
|
||||
|
||||
/** stats are [dimension][tick%100] system.nanoTime is stored. */
|
||||
- public long[][] timeOfLastDimenstionTick;
|
||||
+ //public long[][] timeOfLastDimenstionTick;
|
||||
+ public List<WorldServer> worlds = new ArrayList<WorldServer>();
|
||||
/** Stats are [dimension][tick%100] system.nanoTime is stored. */
|
||||
- public long[][] timeOfLastDimensionTick;
|
||||
+ //public long[][] timeOfLastDimensionTick;
|
||||
+ public Hashtable<Integer, long[]> worldTickTimes = new Hashtable<Integer, long[]>();
|
||||
+ public int spawnProtectionSize = 16;
|
||||
private KeyPair serverKeyPair;
|
||||
|
||||
/** Username of the server owner (for integrated servers) */
|
||||
@@ -196,8 +201,6 @@
|
||||
@@ -204,8 +208,6 @@
|
||||
{
|
||||
this.convertMapIfNeeded(par1Str);
|
||||
this.setUserMessage("menu.loadingLevel");
|
||||
- this.theWorldServer = new WorldServer[3];
|
||||
- this.timeOfLastDimenstionTick = new long[this.theWorldServer.length][100];
|
||||
- this.worldServers = new WorldServer[3];
|
||||
- this.timeOfLastDimensionTick = new long[this.worldServers.length][100];
|
||||
ISaveHandler var6 = this.anvilConverterForAnvilFile.getSaveLoader(par1Str, true);
|
||||
WorldInfo var8 = var6.loadWorldInfo();
|
||||
WorldSettings var7;
|
||||
@@ -216,46 +219,18 @@
|
||||
@@ -224,46 +226,21 @@
|
||||
var7.enableBonusChest();
|
||||
}
|
||||
|
||||
- for (int var9 = 0; var9 < this.theWorldServer.length; ++var9)
|
||||
- for (int var9 = 0; var9 < this.worldServers.length; ++var9)
|
||||
- {
|
||||
- byte var10 = 0;
|
||||
-
|
||||
|
@ -59,79 +58,76 @@
|
|||
- {
|
||||
- if (this.isDemo())
|
||||
- {
|
||||
- this.theWorldServer[var9] = new DemoWorldServer(this, var6, par2Str, var10, this.theProfiler);
|
||||
- this.worldServers[var9] = new DemoWorldServer(this, var6, par2Str, var10, this.theProfiler);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- this.theWorldServer[var9] = new WorldServer(this, var6, par2Str, var10, var7, this.theProfiler);
|
||||
- this.worldServers[var9] = new WorldServer(this, var6, par2Str, var10, var7, this.theProfiler);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- this.theWorldServer[var9] = new WorldServerMulti(this, var6, par2Str, var10, var7, this.theWorldServer[0], this.theProfiler);
|
||||
- this.worldServers[var9] = new WorldServerMulti(this, var6, par2Str, var10, var7, this.worldServers[0], this.theProfiler);
|
||||
- }
|
||||
-
|
||||
- this.theWorldServer[var9].addWorldAccess(new WorldManager(this, this.theWorldServer[var9]));
|
||||
-
|
||||
- this.worldServers[var9].addWorldAccess(new WorldManager(this, this.worldServers[var9]));
|
||||
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, var6, par2Str, 0, theProfiler) : new WorldServer(this, var6, par2Str, 0, var7, theProfiler));
|
||||
+ for (int dim : DimensionManager.getIDs())
|
||||
+ {
|
||||
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, var6, par2Str, dim, var7, overWorld, theProfiler));
|
||||
+ world.addWorldAccess(new WorldManager(this, world));
|
||||
|
||||
if (!this.isSinglePlayer())
|
||||
{
|
||||
- this.theWorldServer[var9].getWorldInfo().setGameType(this.getGameType());
|
||||
- }
|
||||
-
|
||||
- this.serverConfigManager.setPlayerManager(this.theWorldServer);
|
||||
- }
|
||||
-
|
||||
- this.worldServers[var9].getWorldInfo().setGameType(this.getGameType());
|
||||
+ world.getWorldInfo().setGameType(this.getGameType());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
this.serverConfigManager.setPlayerManager(this.worldServers);
|
||||
}
|
||||
|
||||
+ this.serverConfigManager.setPlayerManager(new WorldServer[]{ overWorld });
|
||||
this.setDifficultyForAllDimensions(this.getDifficulty());
|
||||
this.setDifficultyForAllWorlds(this.getDifficulty());
|
||||
this.initialWorldChunkLoad();
|
||||
}
|
||||
@@ -611,13 +586,13 @@
|
||||
@@ -622,13 +599,13 @@
|
||||
{
|
||||
this.theProfiler.startSection("levels");
|
||||
|
||||
- for (int var1 = 0; var1 < this.theWorldServer.length; ++var1)
|
||||
- for (int var1 = 0; var1 < this.worldServers.length; ++var1)
|
||||
+ for (Integer id : DimensionManager.getIDs())
|
||||
{
|
||||
long var2 = System.nanoTime();
|
||||
|
||||
- if (var1 == 0 || this.getAllowNether())
|
||||
- {
|
||||
- WorldServer var4 = this.theWorldServer[var1];
|
||||
- WorldServer var4 = this.worldServers[var1];
|
||||
+ if (id == 0 || this.getAllowNether())
|
||||
+ {
|
||||
+ WorldServer var4 = DimensionManager.getWorld(id);
|
||||
this.theProfiler.startSection(var4.getWorldInfo().getWorldName());
|
||||
|
||||
if (this.tickCounter % 20 == 0)
|
||||
@@ -648,7 +623,7 @@
|
||||
@@ -659,7 +636,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- this.timeOfLastDimenstionTick[var1][this.tickCounter % 100] = System.nanoTime() - var2;
|
||||
- this.timeOfLastDimensionTick[var1][this.tickCounter % 100] = System.nanoTime() - var2;
|
||||
+ worldTickTimes.get(id)[this.tickCounter % 100] = System.nanoTime() - var2;
|
||||
}
|
||||
|
||||
this.theProfiler.endStartSection("connection");
|
||||
@@ -697,7 +672,8 @@
|
||||
|
||||
@@ -717,7 +694,8 @@
|
||||
*/
|
||||
public WorldServer worldServerForDimension(int par1)
|
||||
{
|
||||
- return par1 == -1 ? this.theWorldServer[1] : (par1 == 1 ? this.theWorldServer[2] : this.theWorldServer[0]);
|
||||
- return par1 == -1 ? this.worldServers[1] : (par1 == 1 ? this.worldServers[2] : this.worldServers[0]);
|
||||
+ WorldServer ret = DimensionManager.getWorld(par1);
|
||||
+ return (ret != null ? ret : DimensionManager.getWorld(0));
|
||||
}
|
||||
|
||||
@SideOnly(Side.SERVER)
|
||||
@@ -786,7 +762,7 @@
|
||||
@@ -830,7 +808,7 @@
|
||||
|
||||
public String getServerModName()
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
/**
|
||||
@@ -36,6 +36,12 @@
|
||||
* each class overrdies this to return a new <className>
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public abstract TileEntity createNewTileEntity(World var1);
|
||||
+
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- ../src_base/common/net/minecraft/src/DedicatedServer.java
|
||||
+++ ../src_work/common/net/minecraft/src/DedicatedServer.java
|
||||
@@ -67,6 +67,7 @@
|
||||
this.setAllowFlight(this.settings.getOrSetBoolProperty("allow-flight", false));
|
||||
this.setTexturePack(this.settings.getOrSetProperty("texture-pack", ""));
|
||||
this.setMOTD(this.settings.getOrSetProperty("motd", "A Minecraft Server"));
|
||||
+ spawnProtectionSize = this.settings.getOrSetIntProperty("spawn-protection-size", 16);
|
||||
this.canSpawnStructures = this.settings.getOrSetBoolProperty("generate-structures", true);
|
||||
int var2 = this.settings.getOrSetIntProperty("gamemode", EnumGameType.SURVIVAL.getID());
|
||||
this.setAllowFlight(this.settings.getBooleanProperty("allow-flight", false));
|
||||
this.setTexturePack(this.settings.getProperty("texture-pack", ""));
|
||||
this.setMOTD(this.settings.getProperty("motd", "A Minecraft Server"));
|
||||
+ spawnProtectionSize = this.settings.getIntProperty("spawn-protection-size", 16);
|
||||
this.canSpawnStructures = this.settings.getBooleanProperty("generate-structures", true);
|
||||
int var2 = this.settings.getIntProperty("gamemode", EnumGameType.SURVIVAL.getID());
|
||||
this.gameType = WorldSettings.getGameTypeById(var2);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
public abstract class EntityLiving extends Entity
|
||||
{
|
||||
@@ -314,6 +318,7 @@
|
||||
@@ -319,6 +323,7 @@
|
||||
public void setAttackTarget(EntityLiving par1EntityLiving)
|
||||
{
|
||||
this.attackTarget = par1EntityLiving;
|
||||
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
|
||||
public boolean isExplosiveMob(Class par1Class)
|
||||
@@ -370,6 +375,7 @@
|
||||
@@ -375,6 +380,7 @@
|
||||
{
|
||||
this.entityLivingToAttack = par1EntityLiving;
|
||||
this.revengeTimer = this.entityLivingToAttack != null ? 60 : 0;
|
||||
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
|
||||
protected void entityInit()
|
||||
@@ -656,6 +662,11 @@
|
||||
@@ -661,6 +667,11 @@
|
||||
*/
|
||||
public void onUpdate()
|
||||
{
|
||||
|
@ -39,7 +39,7 @@
|
|||
super.onUpdate();
|
||||
|
||||
if (this.arrowHitTempCounter > 0)
|
||||
@@ -823,6 +834,11 @@
|
||||
@@ -828,6 +839,11 @@
|
||||
*/
|
||||
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@
|
|||
if (this.worldObj.isRemote)
|
||||
{
|
||||
return false;
|
||||
@@ -1007,6 +1023,12 @@
|
||||
@@ -1012,6 +1028,12 @@
|
||||
*/
|
||||
protected void damageEntity(DamageSource par1DamageSource, int par2)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@
|
|||
par2 = this.applyArmorCalculations(par1DamageSource, par2);
|
||||
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
|
||||
this.health -= par2;
|
||||
@@ -1070,6 +1092,11 @@
|
||||
@@ -1075,6 +1097,11 @@
|
||||
*/
|
||||
public void onDeath(DamageSource par1DamageSource)
|
||||
{
|
||||
|
@ -76,7 +76,7 @@
|
|||
Entity var2 = par1DamageSource.getEntity();
|
||||
|
||||
if (this.scoreValue >= 0 && var2 != null)
|
||||
@@ -1093,13 +1120,17 @@
|
||||
@@ -1098,13 +1125,17 @@
|
||||
var3 = EnchantmentHelper.getLootingModifier(((EntityPlayer)var2).inventory);
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
|||
|
||||
if (var4 < 5)
|
||||
{
|
||||
@@ -1107,6 +1138,16 @@
|
||||
@@ -1112,6 +1143,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@
|
|||
}
|
||||
|
||||
this.worldObj.setEntityState(this, (byte)3);
|
||||
@@ -1150,6 +1191,12 @@
|
||||
@@ -1155,6 +1196,12 @@
|
||||
*/
|
||||
protected void fall(float par1)
|
||||
{
|
||||
|
@ -125,7 +125,7 @@
|
|||
super.fall(par1);
|
||||
int var2 = MathHelper.ceiling_float_int(par1 - 3.0F);
|
||||
|
||||
@@ -1337,7 +1384,7 @@
|
||||
@@ -1342,7 +1389,7 @@
|
||||
int var2 = MathHelper.floor_double(this.boundingBox.minY);
|
||||
int var3 = MathHelper.floor_double(this.posZ);
|
||||
int var4 = this.worldObj.getBlockId(var1, var2, var3);
|
||||
|
@ -134,7 +134,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -1600,6 +1647,7 @@
|
||||
@@ -1605,6 +1652,7 @@
|
||||
}
|
||||
|
||||
this.isAirBorne = true;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
public class EntityPlayerMP extends EntityPlayer implements ICrafting
|
||||
{
|
||||
@@ -78,17 +81,10 @@
|
||||
@@ -85,17 +88,10 @@
|
||||
par4ItemInWorldManager.thisPlayerMP = this;
|
||||
this.theItemInWorldManager = par4ItemInWorldManager;
|
||||
this.renderDistance = par1MinecraftServer.getConfigurationManager().getViewDistance();
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
this.setLocationAndAngles((double)var6 + 0.5D, (double)var8, (double)var7 + 0.5D, 0.0F, 0.0F);
|
||||
this.mcServer = par1MinecraftServer;
|
||||
@@ -329,8 +325,27 @@
|
||||
@@ -336,8 +332,27 @@
|
||||
*/
|
||||
public void onDeath(DamageSource par1DamageSource)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -589,6 +597,10 @@
|
||||
@@ -593,6 +601,10 @@
|
||||
float var18 = var15 * var16;
|
||||
float var20 = var14 * var16;
|
||||
double var21 = 5.0D;
|
||||
|
@ -37,7 +37,7 @@
|
|||
Vec3 var23 = var13.addVector((double)var18 * var21, (double)var17 * var21, (double)var20 * var21);
|
||||
return par1World.rayTraceBlocks_do_do(var13, var23, par3, !par3);
|
||||
}
|
||||
@@ -650,4 +662,240 @@
|
||||
@@ -654,4 +666,240 @@
|
||||
{
|
||||
StatList.initStats();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +33,8 @@
|
||||
@@ -36,7 +37,8 @@
|
||||
{
|
||||
par7 = 1;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
if (par7 == 0)
|
||||
{
|
||||
@@ -81,14 +83,8 @@
|
||||
@@ -85,14 +87,8 @@
|
||||
{
|
||||
Block var12 = Block.blocksList[this.blockID];
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), var12.stepSound.getStepSound(), (var12.stepSound.getVolume() + 1.0F) / 2.0F, var12.stepSound.getPitch() * 0.8F);
|
||||
--par1ItemStack.stackSize;
|
||||
}
|
||||
@@ -114,7 +110,8 @@
|
||||
@@ -118,7 +114,8 @@
|
||||
{
|
||||
par5 = 1;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
|||
{
|
||||
if (par5 == 0)
|
||||
{
|
||||
@@ -179,4 +176,28 @@
|
||||
@@ -183,4 +180,28 @@
|
||||
{
|
||||
Block.blocksList[this.blockID].getSubBlocks(par1, par2CreativeTabs, par3List);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
public class ItemDye extends Item
|
||||
{
|
||||
@@ -49,6 +53,21 @@
|
||||
@@ -53,6 +57,21 @@
|
||||
if (par1ItemStack.getItemDamage() == 15)
|
||||
{
|
||||
var11 = par3World.getBlockId(par4, par5, par6);
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
if (var11 == Block.sapling.blockID)
|
||||
{
|
||||
@@ -148,16 +167,9 @@
|
||||
@@ -152,16 +171,9 @@
|
||||
par3World.setBlockAndMetadataWithNotify(var13, var14, var15, Block.tallGrass.blockID, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
|
||||
@@ -24,6 +26,17 @@
|
||||
@@ -28,6 +30,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
/** The world object that this object is connected to. */
|
||||
public World theWorld;
|
||||
|
||||
@@ -222,7 +228,7 @@
|
||||
@@ -225,7 +231,7 @@
|
||||
var4.onBlockHarvested(this.theWorld, par1, par2, par3, var5, this.thisPlayerMP);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
if (var4 != null && var6)
|
||||
{
|
||||
@@ -243,19 +249,30 @@
|
||||
@@ -246,19 +252,30 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -41,7 +41,7 @@
|
|||
if (this.isCreative())
|
||||
{
|
||||
+ var6 = this.removeBlock(par1, par2, par3);
|
||||
this.thisPlayerMP.serverForThisPlayer.sendPacketToPlayer(new Packet53BlockChange(par1, par2, par3, this.theWorld));
|
||||
this.thisPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(par1, par2, par3, this.theWorld));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
if (var7 != null)
|
||||
{
|
||||
@@ -264,9 +281,11 @@
|
||||
@@ -267,9 +284,11 @@
|
||||
if (var7.stackSize == 0)
|
||||
{
|
||||
this.thisPlayerMP.destroyCurrentEquippedItem();
|
||||
|
@ -68,7 +68,7 @@
|
|||
if (var6 && var8)
|
||||
{
|
||||
Block.blocksList[var4].harvestBlock(this.theWorld, this.thisPlayerMP, par1, par2, par3, var5);
|
||||
@@ -303,6 +322,7 @@
|
||||
@@ -306,6 +325,7 @@
|
||||
if (var6.stackSize == 0)
|
||||
{
|
||||
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = null;
|
||||
|
@ -76,7 +76,7 @@
|
|||
}
|
||||
|
||||
return true;
|
||||
@@ -315,6 +335,12 @@
|
||||
@@ -318,6 +338,12 @@
|
||||
*/
|
||||
public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@
|
|||
int var11 = par2World.getBlockId(par4, par5, par6);
|
||||
|
||||
if (var11 > 0 && Block.blocksList[var11].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10))
|
||||
@@ -336,7 +362,15 @@
|
||||
@@ -339,7 +365,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -106,7 +106,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -347,4 +381,13 @@
|
||||
@@ -350,4 +384,13 @@
|
||||
{
|
||||
this.theWorld = par1WorldServer;
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
{
|
||||
@@ -12,13 +16,12 @@
|
||||
|
||||
public boolean func_77660_a(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
|
||||
{
|
||||
- if (par3 != Block.leaves.blockID && par3 != Block.web.blockID && par3 != Block.tallGrass.blockID && par3 != Block.vine.blockID && par3 != Block.tripWire.blockID)
|
||||
+ if (par3 != Block.leaves.blockID && par3 != Block.web.blockID && par3 != Block.tallGrass.blockID && par3 != Block.vine.blockID && par3 != Block.tripWire.blockID && !(Block.blocksList[par3] instanceof IShearable))
|
||||
{
|
||||
return super.func_77660_a(par1ItemStack, par2World, par3, par4, par5, par6, par7EntityLiving);
|
||||
return super.onBlockDestroyed(par1ItemStack, par2World, par3, par4, par5, par6, par7EntityLiving);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/common/net/minecraft/src/NetServerHandler.java
|
||||
+++ ../src_work/common/net/minecraft/src/NetServerHandler.java
|
||||
@@ -306,7 +306,7 @@
|
||||
@@ -310,7 +310,7 @@
|
||||
this.playerEntity.setPositionAndRotation(var5, var7, var9, var11, var12);
|
||||
boolean var32 = var2.getCollidingBoundingBoxes(this.playerEntity, this.playerEntity.boundingBox.copy().contract((double)var27, (double)var27, (double)var27)).isEmpty();
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
{
|
||||
this.setPlayerLocation(this.lastPosX, this.lastPosY, this.lastPosZ, var11, var12);
|
||||
return;
|
||||
@@ -314,7 +314,7 @@
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
AxisAlignedBB var33 = this.playerEntity.boundingBox.copy().expand((double)var27, (double)var27, (double)var27).addCoord(0.0D, -0.55D, 0.0D);
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
if (var29 >= -0.03125D)
|
||||
{
|
||||
@@ -388,7 +388,10 @@
|
||||
@@ -395,7 +395,10 @@
|
||||
double var12 = this.playerEntity.posZ - ((double)var7 + 0.5D);
|
||||
double var14 = var8 * var8 + var10 * var10 + var12 * var12;
|
||||
|
||||
|
@ -30,16 +30,16 @@
|
|||
{
|
||||
return;
|
||||
}
|
||||
@@ -410,7 +413,7 @@
|
||||
@@ -417,7 +420,7 @@
|
||||
|
||||
if (par1Packet14BlockDig.status == 0)
|
||||
{
|
||||
- if (var20 <= 16 && !var3)
|
||||
+ if (var20 <= mcServer.spawnProtectionSize && !var3)
|
||||
{
|
||||
this.playerEntity.serverForThisPlayer.sendPacketToPlayer(new Packet53BlockChange(var5, var6, var7, var2));
|
||||
this.playerEntity.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(var5, var6, var7, var2));
|
||||
}
|
||||
@@ -490,7 +493,9 @@
|
||||
@@ -497,7 +500,9 @@
|
||||
var12 = var11;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
{
|
||||
this.playerEntity.theItemInWorldManager.activateBlockOrUseItem(this.playerEntity, var2, var3, var5, var6, var7, var8, par1Packet15Place.getXOffset(), par1Packet15Place.getYOffset(), par1Packet15Place.getZOffset());
|
||||
}
|
||||
@@ -787,7 +792,7 @@
|
||||
@@ -798,7 +803,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
public abstract class ServerConfigurationManager
|
||||
{
|
||||
@@ -299,6 +300,12 @@
|
||||
@@ -303,6 +304,12 @@
|
||||
*/
|
||||
public EntityPlayerMP respawnPlayer(EntityPlayerMP par1EntityPlayerMP, int par2, boolean par3)
|
||||
{
|
||||
|
@ -21,15 +21,15 @@
|
|||
par1EntityPlayerMP.getServerForPlayer().getEntityTracker().removeAllTrackingPlayers(par1EntityPlayerMP);
|
||||
par1EntityPlayerMP.getServerForPlayer().getEntityTracker().removeEntityFromAllTrackingPlayers(par1EntityPlayerMP);
|
||||
par1EntityPlayerMP.getServerForPlayer().getPlayerManager().removePlayer(par1EntityPlayerMP);
|
||||
@@ -319,6 +326,7 @@
|
||||
@@ -323,6 +330,7 @@
|
||||
|
||||
EntityPlayerMP var6 = new EntityPlayerMP(this.mcServer, this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension), par1EntityPlayerMP.username, (ItemInWorldManager)var5);
|
||||
var6.clonePlayer(par1EntityPlayerMP, par3);
|
||||
+ var6.dimension = par2;
|
||||
var6.entityId = par1EntityPlayerMP.entityId;
|
||||
var6.serverForThisPlayer = par1EntityPlayerMP.serverForThisPlayer;
|
||||
var6.playerNetServerHandler = par1EntityPlayerMP.playerNetServerHandler;
|
||||
WorldServer var7 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension);
|
||||
@@ -362,6 +370,11 @@
|
||||
@@ -366,6 +374,11 @@
|
||||
|
||||
public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2)
|
||||
{
|
||||
|
@ -41,8 +41,8 @@
|
|||
int var3 = par1EntityPlayerMP.dimension;
|
||||
WorldServer var4 = this.mcServer.worldServerForDimension(par1EntityPlayerMP.dimension);
|
||||
par1EntityPlayerMP.dimension = par2;
|
||||
@@ -369,33 +382,14 @@
|
||||
par1EntityPlayerMP.serverForThisPlayer.sendPacketToPlayer(new Packet9Respawn(par1EntityPlayerMP.dimension, (byte)par1EntityPlayerMP.worldObj.difficultySetting, var5.getWorldInfo().getTerrainType(), var5.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType()));
|
||||
@@ -373,33 +386,14 @@
|
||||
par1EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet9Respawn(par1EntityPlayerMP.dimension, (byte)par1EntityPlayerMP.worldObj.difficultySetting, var5.getWorldInfo().getTerrainType(), var5.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType()));
|
||||
var4.removeEntity(par1EntityPlayerMP);
|
||||
par1EntityPlayerMP.isDead = false;
|
||||
- double var6 = par1EntityPlayerMP.posX;
|
||||
|
@ -83,7 +83,7 @@
|
|||
{
|
||||
ChunkCoordinates var12 = var5.getEntrancePortalLocation();
|
||||
var6 = (double)var12.posX;
|
||||
@@ -419,7 +413,7 @@
|
||||
@@ -423,7 +417,7 @@
|
||||
var5.spawnEntityInWorld(par1EntityPlayerMP);
|
||||
par1EntityPlayerMP.setLocationAndAngles(var6, par1EntityPlayerMP.posY, var8, par1EntityPlayerMP.rotationYaw, par1EntityPlayerMP.rotationPitch);
|
||||
var5.updateEntityWithOptionalForce(par1EntityPlayerMP, false);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../src_base/common/net/minecraft/src/TileEntity.java
|
||||
+++ ../src_work/common/net/minecraft/src/TileEntity.java
|
||||
@@ -250,4 +250,41 @@
|
||||
@@ -257,4 +257,41 @@
|
||||
addMapping(TileEntityEnchantmentTable.class, "EnchantTable");
|
||||
addMapping(TileEntityEndPortal.class, "Airportal");
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -1009,7 +1027,7 @@
|
||||
@@ -1012,7 +1030,7 @@
|
||||
int var12 = this.getBlockMetadata(var8, var9, var10);
|
||||
Block var13 = Block.blocksList[var11];
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
{
|
||||
MovingObjectPosition var14 = var13.collisionRayTrace(this, var8, var9, var10, par1Vec3, par2Vec3);
|
||||
|
||||
@@ -1209,6 +1227,12 @@
|
||||
@@ -1212,6 +1230,12 @@
|
||||
*/
|
||||
public void playSoundAtEntity(Entity par1Entity, String par2Str, float par3, float par4)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@
|
|||
if (par1Entity != null && par2Str != null)
|
||||
{
|
||||
Iterator var5 = this.worldAccesses.iterator();
|
||||
@@ -1309,6 +1333,11 @@
|
||||
@@ -1312,6 +1336,11 @@
|
||||
EntityPlayer var5 = (EntityPlayer)par1Entity;
|
||||
this.playerEntities.add(var5);
|
||||
this.updateAllPlayersSleepingFlag();
|
||||
|
@ -93,7 +93,7 @@
|
|||
}
|
||||
|
||||
this.getChunkFromChunkCoords(var2, var3).addEntity(par1Entity);
|
||||
@@ -1730,7 +1759,7 @@
|
||||
@@ -1736,7 +1765,7 @@
|
||||
{
|
||||
int var5 = var3.getBlockID(par1, var4, par2);
|
||||
|
||||
|
@ -102,7 +102,7 @@
|
|||
{
|
||||
return var4 + 1;
|
||||
}
|
||||
@@ -1887,7 +1916,7 @@
|
||||
@@ -1893,7 +1922,7 @@
|
||||
|
||||
if (var8 != null)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1897,6 +1926,10 @@
|
||||
@@ -1903,6 +1932,10 @@
|
||||
|
||||
if (!this.entityRemoval.isEmpty())
|
||||
{
|
||||
|
@ -122,7 +122,7 @@
|
|||
this.loadedTileEntityList.removeAll(this.entityRemoval);
|
||||
this.entityRemoval.clear();
|
||||
}
|
||||
@@ -1917,7 +1950,9 @@
|
||||
@@ -1923,7 +1956,9 @@
|
||||
{
|
||||
this.loadedTileEntityList.add(var9);
|
||||
}
|
||||
|
@ -133,7 +133,7 @@
|
|||
if (this.chunkExists(var9.xCoord >> 4, var9.zCoord >> 4))
|
||||
{
|
||||
Chunk var10 = this.getChunkFromChunkCoords(var9.xCoord >> 4, var9.zCoord >> 4);
|
||||
@@ -1927,8 +1962,6 @@
|
||||
@@ -1933,8 +1968,6 @@
|
||||
var10.setChunkBlockTileEntity(var9.xCoord & 15, var9.yCoord, var9.zCoord & 15, var9);
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1941,13 +1974,13 @@
|
||||
@@ -1947,13 +1980,13 @@
|
||||
|
||||
public void addTileEntity(Collection par1Collection)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1968,8 +2001,14 @@
|
||||
@@ -1974,8 +2007,14 @@
|
||||
int var3 = MathHelper.floor_double(par1Entity.posX);
|
||||
int var4 = MathHelper.floor_double(par1Entity.posZ);
|
||||
byte var5 = 32;
|
||||
|
@ -180,7 +180,7 @@
|
|||
{
|
||||
par1Entity.lastTickPosX = par1Entity.posX;
|
||||
par1Entity.lastTickPosY = par1Entity.posY;
|
||||
@@ -2204,6 +2243,14 @@
|
||||
@@ -2210,6 +2249,14 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -2510,25 +2557,21 @@
|
||||
@@ -2516,25 +2563,21 @@
|
||||
*/
|
||||
public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
|
||||
{
|
||||
|
@ -236,7 +236,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -2537,27 +2580,10 @@
|
||||
@@ -2543,27 +2586,10 @@
|
||||
*/
|
||||
public void removeBlockTileEntity(int par1, int par2, int par3)
|
||||
{
|
||||
|
@ -268,7 +268,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -2583,7 +2609,8 @@
|
||||
@@ -2589,7 +2615,8 @@
|
||||
*/
|
||||
public boolean isBlockNormalCube(int par1, int par2, int par3)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -2591,8 +2618,7 @@
|
||||
@@ -2597,8 +2624,7 @@
|
||||
*/
|
||||
public boolean doesBlockHaveSolidTopSurface(int par1, int par2, int par3)
|
||||
{
|
||||
|
@ -288,7 +288,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -2608,7 +2634,7 @@
|
||||
@@ -2614,7 +2640,7 @@
|
||||
if (var5 != null && !var5.isEmpty())
|
||||
{
|
||||
Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)];
|
||||
|
@ -297,7 +297,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -3035,7 +3061,7 @@
|
||||
@@ -3041,7 +3067,7 @@
|
||||
|
||||
private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6)
|
||||
{
|
||||
|
@ -306,7 +306,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;
|
||||
@@ -3303,10 +3329,10 @@
|
||||
@@ -3309,10 +3335,10 @@
|
||||
public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB)
|
||||
{
|
||||
this.entitiesWithinAABBExcludingEntity.clear();
|
||||
|
@ -321,7 +321,7 @@
|
|||
|
||||
for (int var7 = var3; var7 <= var4; ++var7)
|
||||
{
|
||||
@@ -3327,10 +3353,10 @@
|
||||
@@ -3333,10 +3359,10 @@
|
||||
*/
|
||||
public List getEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB)
|
||||
{
|
||||
|
@ -336,7 +336,7 @@
|
|||
ArrayList var7 = new ArrayList();
|
||||
|
||||
for (int var8 = var3; var8 <= var4; ++var8)
|
||||
@@ -3419,11 +3445,14 @@
|
||||
@@ -3425,11 +3451,14 @@
|
||||
*/
|
||||
public void addLoadedEntities(List par1List)
|
||||
{
|
||||
|
@ -354,7 +354,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -3460,7 +3489,10 @@
|
||||
@@ -3466,7 +3495,10 @@
|
||||
{
|
||||
var9 = null;
|
||||
}
|
||||
|
@ -366,7 +366,7 @@
|
|||
return par1 > 0 && var9 == null && var10.canPlaceBlockOnSide(this, par2, par3, par4, par6);
|
||||
}
|
||||
}
|
||||
@@ -3701,7 +3733,10 @@
|
||||
@@ -3707,7 +3739,10 @@
|
||||
|
||||
if (!this.loadedEntityList.contains(par1Entity))
|
||||
{
|
||||
|
@ -378,7 +378,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -3958,4 +3993,65 @@
|
||||
@@ -3964,4 +3999,65 @@
|
||||
var7.destroyBlockPartially(par1, par2, par3, par4, par5);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,10 +26,11 @@
|
|||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -251,4 +255,109 @@
|
||||
}
|
||||
|
||||
public abstract String func_80007_l();
|
||||
@@ -254,4 +258,110 @@
|
||||
* Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".
|
||||
*/
|
||||
public abstract String getDimensionName();
|
||||
+
|
||||
+
|
||||
+ /*======================================= Forge Start =========================================*/
|
||||
+ private int dimensionID = 0;
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
}
|
||||
|
||||
protected void initialize(WorldSettings par1WorldSettings)
|
||||
@@ -710,6 +726,7 @@
|
||||
@@ -713,6 +729,7 @@
|
||||
}
|
||||
|
||||
this.chunkProvider.saveChunks(par1, par2IProgressUpdate);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.Sys;
|
||||
@@ -2212,80 +2213,12 @@
|
||||
@@ -2221,80 +2222,12 @@
|
||||
if (this.objectMouseOver != null)
|
||||
{
|
||||
boolean var1 = this.thePlayer.capabilities.isCreativeMode;
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
+ }
|
||||
}
|
||||
|
||||
public void func_78872_b(Entity par1Entity, float par2)
|
||||
public void renderLitParticles(Entity par1Entity, float par2)
|
||||
@@ -144,6 +187,8 @@
|
||||
{
|
||||
this.fxLayers[var2].clear();
|
||||
|
|
|
@ -18,20 +18,20 @@
|
|||
this.displayStrings[0] = "Memory use: " + var1 / 1024L / 1024L + " mb (" + Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory() + "% free)";
|
||||
@@ -51,14 +53,17 @@
|
||||
|
||||
if (this.field_79017_e.theWorldServer != null)
|
||||
if (this.field_79017_e.worldServers != null)
|
||||
{
|
||||
- for (int var3 = 0; var3 < this.field_79017_e.theWorldServer.length; ++var3)
|
||||
- for (int var3 = 0; var3 < this.field_79017_e.worldServers.length; ++var3)
|
||||
+ int x = 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.timeOfLastDimenstionTick[var3]) * 1.0E-6D) + " ms";
|
||||
- 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 + x] = "Lvl " + id + " tick: " + field_79020_a.format(this.func_79015_a(this.field_79017_e.worldTickTimes.get(id)) * 1.0E-6D) + " ms";
|
||||
|
||||
- if (this.field_79017_e.theWorldServer[var3] != null && this.field_79017_e.theWorldServer[var3].theChunkProviderServer != null)
|
||||
- if (this.field_79017_e.worldServers[var3] != null && this.field_79017_e.worldServers[var3].theChunkProviderServer != null)
|
||||
+ WorldServer world = DimensionManager.getWorld(id);
|
||||
+ if (world != null && world.theChunkProviderServer != null)
|
||||
{
|
||||
- this.displayStrings[5 + var3] = this.displayStrings[5 + var3] + ", " + this.field_79017_e.theWorldServer[var3].theChunkProviderServer.makeString();
|
||||
- this.displayStrings[5 + var3] = this.displayStrings[5 + var3] + ", " + this.field_79017_e.worldServers[var3].theChunkProviderServer.makeString();
|
||||
+ this.displayStrings[5 + x] = this.displayStrings[5 + x] + ", " + world.theChunkProviderServer.makeString();
|
||||
}
|
||||
+ x++;
|
||||
|
|
|
@ -8,23 +8,23 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class IntegratedServer extends MinecraftServer
|
||||
@@ -46,44 +47,20 @@
|
||||
protected void loadAllDimensions(String par1Str, String par2Str, long par3, WorldType par5WorldType)
|
||||
@@ -48,44 +49,20 @@
|
||||
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType)
|
||||
{
|
||||
this.convertMapIfNeeded(par1Str);
|
||||
- this.theWorldServer = new WorldServer[3];
|
||||
- this.timeOfLastDimenstionTick = new long[this.theWorldServer.length][100];
|
||||
- this.worldServers = new WorldServer[3];
|
||||
- this.timeOfLastDimensionTick = new long[this.worldServers.length][100];
|
||||
ISaveHandler var6 = this.getActiveAnvilConverter().getSaveLoader(par1Str, true);
|
||||
|
||||
- for (int var7 = 0; var7 < this.theWorldServer.length; ++var7)
|
||||
- for (int var7 = 0; var7 < this.worldServers.length; ++var7)
|
||||
- {
|
||||
- byte var8 = 0;
|
||||
-
|
||||
- if (var7 == 1)
|
||||
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, var6, par2Str, 0, theProfiler) : new WorldServer(this, var6, par2Str, 0, field_71350_m, theProfiler));
|
||||
+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, var6, par2Str, 0, theProfiler) : new WorldServer(this, var6, par2Str, 0, theWorldSettings, theProfiler));
|
||||
+ for (int dim : DimensionManager.getIDs())
|
||||
+ {
|
||||
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, var6, par2Str, dim, field_71350_m, overWorld, theProfiler));
|
||||
+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, var6, par2Str, dim, theWorldSettings, overWorld, theProfiler));
|
||||
+ world.addWorldAccess(new WorldManager(this, world));
|
||||
+ if (!this.isSinglePlayer())
|
||||
{
|
||||
|
@ -41,31 +41,31 @@
|
|||
- {
|
||||
- if (this.isDemo())
|
||||
- {
|
||||
- this.theWorldServer[var7] = new DemoWorldServer(this, var6, par2Str, var8, this.theProfiler);
|
||||
- this.worldServers[var7] = new DemoWorldServer(this, var6, par2Str, var8, this.theProfiler);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- this.theWorldServer[var7] = new WorldServer(this, var6, par2Str, var8, this.field_71350_m, this.theProfiler);
|
||||
- this.worldServers[var7] = new WorldServer(this, var6, par2Str, var8, this.theWorldSettings, this.theProfiler);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- this.theWorldServer[var7] = new WorldServerMulti(this, var6, par2Str, var8, this.field_71350_m, this.theWorldServer[0], this.theProfiler);
|
||||
- this.worldServers[var7] = new WorldServerMulti(this, var6, par2Str, var8, this.theWorldSettings, this.worldServers[0], this.theProfiler);
|
||||
- }
|
||||
-
|
||||
- this.theWorldServer[var7].addWorldAccess(new WorldManager(this, this.theWorldServer[var7]));
|
||||
- this.getConfigurationManager().setPlayerManager(this.theWorldServer);
|
||||
- this.worldServers[var7].addWorldAccess(new WorldManager(this, this.worldServers[var7]));
|
||||
- this.getConfigurationManager().setPlayerManager(this.worldServers);
|
||||
- }
|
||||
-
|
||||
+ }
|
||||
+
|
||||
+ this.getConfigurationManager().setPlayerManager(new WorldServer[]{ overWorld });
|
||||
this.setDifficultyForAllDimensions(this.getDifficulty());
|
||||
this.setDifficultyForAllWorlds(this.getDifficulty());
|
||||
this.initialWorldChunkLoad();
|
||||
}
|
||||
@@ -104,6 +81,7 @@
|
||||
this.loadAllDimensions(this.getFolderName(), this.getWorldName(), this.field_71350_m.getSeed(), this.field_71350_m.getTerrainType());
|
||||
this.setMOTD(this.getServerOwner() + " - " + this.theWorldServer[0].getWorldInfo().getWorldName());
|
||||
@@ -106,6 +83,7 @@
|
||||
this.loadAllWorlds(this.getFolderName(), this.getWorldName(), this.theWorldSettings.getSeed(), this.theWorldSettings.getTerrainType());
|
||||
this.setMOTD(this.getServerOwner() + " - " + this.worldServers[0].getWorldInfo().getWorldName());
|
||||
FMLCommonHandler.instance().handleServerStarting(this);
|
||||
+ spawnProtectionSize = 0;
|
||||
return true;
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java
|
||||
@@ -5,6 +5,12 @@
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -7,6 +7,12 @@
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
+
|
||||
|
||||
+import net.minecraftforge.client.ForgeHooksClient;
|
||||
+import net.minecraftforge.client.IItemRenderer;
|
||||
+import net.minecraftforge.client.MinecraftForgeClient;
|
||||
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
|
||||
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
|
||||
|
||||
+
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemRenderer
|
||||
@@ -38,27 +44,21 @@
|
||||
{
|
||||
@@ -39,27 +45,21 @@
|
||||
public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
@ -53,7 +53,7 @@
|
|||
|
||||
Tessellator var5 = Tessellator.instance;
|
||||
int var6 = par1EntityLiving.getItemIcon(par2ItemStack, par3);
|
||||
@@ -257,8 +257,9 @@
|
||||
@@ -265,8 +265,9 @@
|
||||
Render var24;
|
||||
RenderPlayer var26;
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
|||
GL11.glPushMatrix();
|
||||
var7 = 0.8F;
|
||||
var20 = var3.getSwingProgress(par1);
|
||||
@@ -324,8 +325,15 @@
|
||||
@@ -332,8 +333,15 @@
|
||||
var28.addVertexWithUV((double)(128 + var27), (double)(0 - var27), 0.0D, 1.0D, 0.0D);
|
||||
var28.addVertexWithUV((double)(0 - var27), (double)(0 - var27), 0.0D, 0.0D, 0.0D);
|
||||
var28.draw();
|
||||
|
@ -83,7 +83,7 @@
|
|||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (var17 != null)
|
||||
@@ -426,12 +434,15 @@
|
||||
@@ -434,12 +442,15 @@
|
||||
if (var17.getItem().requiresMultipleRenderPasses())
|
||||
{
|
||||
this.renderItem(var3, var17, 0);
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -593,7 +598,7 @@
|
||||
@@ -597,7 +602,7 @@
|
||||
|
||||
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)
|
||||
{
|
||||
- this.netManager.networkShutdown("disconnect.kicked", new Object[0]);
|
||||
+ this.netManager.networkShutdown("disconnect.kicked", par1Packet255KickDisconnect.reason);
|
||||
this.field_72554_f = true;
|
||||
this.disconnected = true;
|
||||
this.mc.loadWorld((WorldClient)null);
|
||||
this.mc.displayGuiScreen(new GuiDisconnected("disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason}));
|
||||
@@ -659,7 +664,11 @@
|
||||
@@ -663,7 +668,11 @@
|
||||
public void handleChat(Packet3Chat par1Packet3Chat)
|
||||
{
|
||||
par1Packet3Chat = FMLNetworkHandler.handleChatMessage(this, par1Packet3Chat);
|
||||
|
@ -34,7 +34,7 @@
|
|||
}
|
||||
|
||||
public void handleAnimation(Packet18Animation par1Packet18Animation)
|
||||
@@ -1014,6 +1023,19 @@
|
||||
@@ -1018,6 +1027,19 @@
|
||||
{
|
||||
((TileEntityMobSpawner)var2).readFromNBT(par1Packet132TileEntityData.customParam1);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class PlayerControllerMP
|
||||
@@ -98,6 +101,11 @@
|
||||
@@ -104,6 +107,11 @@
|
||||
*/
|
||||
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
|||
if (this.currentGameType.isAdventure())
|
||||
{
|
||||
return false;
|
||||
@@ -115,7 +123,7 @@
|
||||
@@ -121,7 +129,7 @@
|
||||
{
|
||||
var5.playAuxSFX(2001, par1, par2, par3, var6.blockID + (var5.getBlockMetadata(par1, par2, par3) << 12));
|
||||
int var7 = var5.getBlockMetadata(par1, par2, par3);
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
if (var8)
|
||||
{
|
||||
@@ -298,6 +306,12 @@
|
||||
@@ -304,6 +312,12 @@
|
||||
float var11 = (float)par8Vec3.zCoord - (float)par6;
|
||||
boolean var12 = false;
|
||||
int var13 = par2World.getBlockId(par4, par5, par6);
|
||||
|
@ -44,7 +44,7 @@
|
|||
|
||||
if (var13 > 0 && Block.blocksList[var13].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, var9, var10, var11))
|
||||
{
|
||||
@@ -335,7 +349,15 @@
|
||||
@@ -341,7 +355,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -61,7 +61,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -357,9 +379,10 @@
|
||||
@@ -363,9 +385,10 @@
|
||||
{
|
||||
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = var5;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
float var9 = 0.5F;
|
||||
float var10 = 1.0F;
|
||||
float var11 = 0.8F;
|
||||
@@ -1959,7 +1960,7 @@
|
||||
@@ -1965,7 +1966,7 @@
|
||||
double var30;
|
||||
double var32;
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
{
|
||||
float var36 = 0.2F;
|
||||
float var19 = 0.0625F;
|
||||
@@ -1979,7 +1980,7 @@
|
||||
@@ -1985,7 +1986,7 @@
|
||||
var9 = var20;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
{
|
||||
var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13);
|
||||
var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 1), var11, var15);
|
||||
@@ -1991,7 +1992,7 @@
|
||||
@@ -1997,7 +1998,7 @@
|
||||
var5.addVertexWithUV((double)((float)par2 + var36), (double)((float)par3 + var17 + var19), (double)(par4 + 1), var11, var13);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
{
|
||||
var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13);
|
||||
var5.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var9, var15);
|
||||
@@ -2003,7 +2004,7 @@
|
||||
@@ -2009,7 +2010,7 @@
|
||||
var5.addVertexWithUV((double)((float)(par2 + 1) - var36), (double)((float)par3 + var17 + var19), (double)(par4 + 0), var9, var13);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
{
|
||||
var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13);
|
||||
var5.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + var19), (double)(par4 + 0), var11, var15);
|
||||
@@ -2015,7 +2016,7 @@
|
||||
@@ -2021,7 +2022,7 @@
|
||||
var5.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + var17 + var19), (double)((float)par4 + var36), var11, var13);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
{
|
||||
var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13);
|
||||
var5.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + var19), (double)(par4 + 1 - 0), var9, var15);
|
||||
@@ -2027,7 +2028,7 @@
|
||||
@@ -2033,7 +2034,7 @@
|
||||
var5.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + var17 + var19), (double)((float)(par4 + 1) - var36), var9, var13);
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
{
|
||||
var20 = (double)par2 + 0.5D + 0.5D;
|
||||
var22 = (double)par2 + 0.5D - 0.5D;
|
||||
@@ -4211,7 +4212,7 @@
|
||||
@@ -4220,7 +4221,7 @@
|
||||
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2);
|
||||
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
|||
{
|
||||
this.colorRedTopLeft *= par5;
|
||||
this.colorRedBottomLeft *= par5;
|
||||
@@ -4334,7 +4335,7 @@
|
||||
@@ -4343,7 +4344,7 @@
|
||||
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3);
|
||||
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3));
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
|||
{
|
||||
this.colorRedTopLeft *= par5;
|
||||
this.colorRedBottomLeft *= par5;
|
||||
@@ -4457,7 +4458,7 @@
|
||||
@@ -4466,7 +4467,7 @@
|
||||
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4);
|
||||
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
|
||||
|
||||
|
@ -102,7 +102,7 @@
|
|||
{
|
||||
this.colorRedTopLeft *= par5;
|
||||
this.colorRedBottomLeft *= par5;
|
||||
@@ -4580,7 +4581,7 @@
|
||||
@@ -4589,7 +4590,7 @@
|
||||
var27 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5);
|
||||
this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var27);
|
||||
|
||||
|
@ -111,7 +111,7 @@
|
|||
{
|
||||
this.colorRedTopLeft *= par5;
|
||||
this.colorRedBottomLeft *= par5;
|
||||
@@ -4692,7 +4693,7 @@
|
||||
@@ -4701,7 +4702,7 @@
|
||||
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 2);
|
||||
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
|||
{
|
||||
var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7);
|
||||
this.renderEastFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
|
||||
@@ -4708,7 +4709,7 @@
|
||||
@@ -4717,7 +4718,7 @@
|
||||
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 3);
|
||||
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
|
||||
|
||||
|
@ -129,7 +129,7 @@
|
|||
{
|
||||
var8.setColorOpaque_F(var18 * par5, var21 * par6, var24 * par7);
|
||||
this.renderWestFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
|
||||
@@ -4724,7 +4725,7 @@
|
||||
@@ -4733,7 +4734,7 @@
|
||||
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 4);
|
||||
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
|
||||
|
||||
|
@ -138,7 +138,7 @@
|
|||
{
|
||||
var8.setColorOpaque_F(var19 * par5, var22 * par6, var25 * par7);
|
||||
this.renderNorthFace(par1Block, (double)par2, (double)par3, (double)par4, 38);
|
||||
@@ -4740,7 +4741,7 @@
|
||||
@@ -4749,7 +4750,7 @@
|
||||
var28 = par1Block.getBlockTexture(this.blockAccess, par2, par3, par4, 5);
|
||||
this.renderSouthFace(par1Block, (double)par2, (double)par3, (double)par4, var28);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
+ skyProvider.render(par1, this.theWorld, mc);
|
||||
+ return;
|
||||
+ }
|
||||
if (this.mc.theWorld.provider.worldType == 1)
|
||||
if (this.mc.theWorld.provider.dimensionId == 1)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
@@ -1535,6 +1544,11 @@
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
import cpw.mods.fml.common.Side;
|
||||
import cpw.mods.fml.common.asm.SideOnly;
|
||||
@@ -22,12 +27,15 @@
|
||||
@@ -25,12 +30,15 @@
|
||||
super.renderEquippedItems(par1EntitySnowman, par2);
|
||||
ItemStack var3 = new ItemStack(Block.pumpkin, 1);
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
+ if (var3 != null && var3.getItem() instanceof ItemBlock)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
this.snowmanModel.field_78195_c.postRender(0.0625F);
|
||||
this.snowmanModel.head.postRender(0.0625F);
|
||||
|
||||
- if (RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType()))
|
||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var3, EQUIPPED);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
+ private int rawBufferSize = 0;
|
||||
+ public int textureID = 0;
|
||||
/**
|
||||
* Boolean used to check whether quads should be drawn as four triangles. Initialized to true and never changed.
|
||||
* Boolean used to check whether quads should be drawn as two triangles. Initialized to false and never changed.
|
||||
*/
|
||||
@@ -25,16 +33,16 @@
|
||||
private static boolean tryVBO = false;
|
||||
|
|
Loading…
Reference in a new issue