initial commit

This commit is contained in:
Christian Rendina 2022-07-11 15:36:50 +02:00
commit 638f62372e
11 changed files with 149377 additions and 0 deletions

109855
client2server_1.6.4_full.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
MinecraftServerGui.java
MinecraftServerGuiINNER1.java
MinecraftServerGuiINNER2.java
MinecraftServerGuiINNER3.java
PlayerListComponent.java
StatsComponent.java
StatsComponentINNER1.java
TextAreaLogHandler.java
TextAreaLogHandlerINNER1.java
ThreadDedicatedServer.java

File diff suppressed because it is too large Load Diff

171
mcp_hybrid_server.patch Normal file
View File

@ -0,0 +1,171 @@
*** mcp.cfg Fri Sep 20 23:29:06 2013
--- mcp.cfg Sat Feb 5 06:14:08 2022
***************
*** 147,163 ****
Fernflower = %(DirRuntime)s/bin/fernflower.jar
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
! CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
CmdJadretro = %s -jar %s {targetdir}
CmdFernflower = %s -jar %s -din=0 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
! CmdRecomp = %s -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
! CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
! CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
! CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
--- 147,165 ----
Fernflower = %(DirRuntime)s/bin/fernflower.jar
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
! #CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
! CmdAStyle = %s --suffix=none --options={conffile} {classes}
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
CmdJadretro = %s -jar %s {targetdir}
CmdFernflower = %s -jar %s -din=0 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
! CmdRecomp = %s -Xlint:-options -deprecation -g -source 1.8 -target 1.8 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
! CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.8 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
! CmdStartSrv = %s -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
! CmdStartClt = %s -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
! CmdStartHyb = %s -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} StartServer
*** commands.py Sat Feb 5 14:54:08 2022
--- commands.py Sat Feb 5 06:14:19 2022
***************
*** 394,403 ****
--- 394,404 ----
self.cmdrecompscala = None
else:
self.cmdrecompscala = self.config.get('COMMANDS', 'CmdRecompScala', raw=1) % self.cmdscalac
self.cmdstartsrv = self.config.get('COMMANDS', 'CmdStartSrv', raw=1) % self.cmdjava
self.cmdstartclt = self.config.get('COMMANDS', 'CmdStartClt', raw=1) % self.cmdjava
+ self.cmdstarthyb = self.config.get('COMMANDS', 'CmdStartHyb', raw=1) % self.cmdjava
def startlogger(self):
self.logger = logging.getLogger()
self.logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
***************
*** 1345,1354 ****
--- 1346,1364 ----
classpath = os.pathsep.join(classpath)
os.chdir(self.dirjars)
forkcmd = self.cmdstartsrv.format(classpath=classpath, mainclass=mainclass, extraargs=extraargs)
self.runmc(forkcmd)
+ def starthybridserver(self, mainclass, extraargs):
+ classpath = [self.binclient, self.srcclient] + self.cpathclient
+ classpath = [os.path.join('..', p) for p in classpath]
+ classpath = os.pathsep.join(classpath)
+ natives = os.path.join('..', self.dirnatives)
+ os.chdir(self.dirjars)
+ forkcmd = self.cmdstarthyb.format(classpath=classpath, natives=natives, mainclass=mainclass, extraargs=extraargs)
+ self.runmc(forkcmd)
+
def startclient(self, mainclass, extraargs):
classpath = [self.binclient, self.srcclient] + self.cpathclient
classpath = [os.path.join('..', p) for p in classpath]
classpath = os.pathsep.join(classpath)
natives = os.path.join('..', self.dirnatives)
***************
*** 1998,2003 ****
assert 'Unknown type %s' % line
if reverse:
for type,map in srg.items():
srg[type] = dict([[v,k] for k,v in map.items()])
! return srg
\ No newline at end of file
--- 2008,2013 ----
assert 'Unknown type %s' % line
if reverse:
for type,map in srg.items():
srg[type] = dict([[v,k] for k,v in map.items()])
! return srg
*** startserver.py Thu Jul 4 01:09:57 2013
--- startserver.py Sat Feb 5 06:11:56 2022
***************
*** 9,25 ****
import sys
import logging
import json
from optparse import OptionParser
! from commands import Commands, SERVER
def main():
parser = OptionParser(version='MCP %s' % Commands.fullversion())
parser.add_option('-c', '--config', dest='config', help='additional configuration file')
! parser.add_option('-m', '--main', dest='mainclass', help='Main class to start', default='net.minecraft.server.MinecraftServer')
parser.add_option('-j', '--json', dest='json',action='store_true', help='Use the json file to setup parameters', default=False)
options, _ = parser.parse_args()
startserver(options.config, options.mainclass, options.json)
--- 9,25 ----
import sys
import logging
import json
from optparse import OptionParser
! from commands import Commands, CLIENT
def main():
parser = OptionParser(version='MCP %s' % Commands.fullversion())
parser.add_option('-c', '--config', dest='config', help='additional configuration file')
! parser.add_option('-m', '--main', dest='mainclass', help='Main class to start', default='StartServer')
parser.add_option('-j', '--json', dest='json',action='store_true', help='Use the json file to setup parameters', default=False)
options, _ = parser.parse_args()
startserver(options.config, options.mainclass, options.json)
***************
*** 31,47 ****
# mainclass = "net.minecraft.server.MinecraftServer"
extraargs = ""
if jsonoverride:
jsonData = json.load(open(commands.jsonFile))
! mainclass = jsonData['mainClass']
extraargs = jsonData['minecraftArguments']
! if not commands.checkbins(SERVER):
commands.logger.warning('!! Can not find server bins !!')
sys.exit(1)
! commands.startserver(mainclass, extraargs)
except Exception: # pylint: disable-msg=W0703
logging.exception('FATAL ERROR')
sys.exit(1)
--- 31,47 ----
# mainclass = "net.minecraft.server.MinecraftServer"
extraargs = ""
if jsonoverride:
jsonData = json.load(open(commands.jsonFile))
! mainclass = jsonData['mainServerClass']
extraargs = jsonData['minecraftArguments']
! if not commands.checkbins(CLIENT):
commands.logger.warning('!! Can not find server bins !!')
sys.exit(1)
! commands.starthybridserver(mainclass, extraargs)
except Exception: # pylint: disable-msg=W0703
logging.exception('FATAL ERROR')
sys.exit(1)

View File

@ -0,0 +1,884 @@
*** net/minecraft/src/BlockCommandBlock.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/BlockCommandBlock.java Sat Feb 5 05:26:29 2022
***************
*** 49,59 ****
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
if (var6 != null && var6 instanceof TileEntityCommandBlock)
{
TileEntityCommandBlock var7 = (TileEntityCommandBlock)var6;
! var7.func_96102_a(var7.executeCommandOnPowered(par1World));
par1World.func_96440_m(par2, par3, par4, this.blockID);
}
}
/**
--- 49,59 ----
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
if (var6 != null && var6 instanceof TileEntityCommandBlock)
{
TileEntityCommandBlock var7 = (TileEntityCommandBlock)var6;
! var7.setSignalStrength(var7.executeCommandOnPowered(par1World));
par1World.func_96440_m(par2, par3, par4, this.blockID);
}
}
/**
***************
*** 93,103 ****
* strength when this block inputs to a comparator.
*/
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5)
{
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
! return var6 != null && var6 instanceof TileEntityCommandBlock ? ((TileEntityCommandBlock)var6).func_96103_d() : 0;
}
/**
* Called when the block is placed in the world.
*/
--- 93,103 ----
* strength when this block inputs to a comparator.
*/
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5)
{
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
! return var6 != null && var6 instanceof TileEntityCommandBlock ? ((TileEntityCommandBlock)var6).getSignalStrength() : 0;
}
/**
* Called when the block is placed in the world.
*/
*** net/minecraft/src/EntityAIAttackOnCollide.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/EntityAIAttackOnCollide.java Sat Feb 5 05:17:28 2022
***************
*** 7,17 ****
/**
* An amount of decrementing ticks that allows the entity to attack once the tick reaches 0.
*/
int attackTick;
! double field_75440_e;
/**
* When true, the mob will continue chasing its target, even if it can't find a path to them right now.
*/
boolean longMemory;
--- 7,19 ----
/**
* An amount of decrementing ticks that allows the entity to attack once the tick reaches 0.
*/
int attackTick;
!
! /** The speed with which the mob will approach the target */
! double speedTowardsTarget;
/**
* When true, the mob will continue chasing its target, even if it can't find a path to them right now.
*/
boolean longMemory;
***************
*** 29,39 ****
public EntityAIAttackOnCollide(EntityCreature par1EntityCreature, double par2, boolean par4)
{
this.attacker = par1EntityCreature;
this.worldObj = par1EntityCreature.worldObj;
! this.field_75440_e = par2;
this.longMemory = par4;
this.setMutexBits(3);
}
/**
--- 31,41 ----
public EntityAIAttackOnCollide(EntityCreature par1EntityCreature, double par2, boolean par4)
{
this.attacker = par1EntityCreature;
this.worldObj = par1EntityCreature.worldObj;
! this.speedTowardsTarget = par2;
this.longMemory = par4;
this.setMutexBits(3);
}
/**
***************
*** 74,84 ****
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting()
{
! this.attacker.getNavigator().setPath(this.entityPathEntity, this.field_75440_e);
this.field_75445_i = 0;
}
/**
* Resets the task
--- 76,86 ----
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting()
{
! this.attacker.getNavigator().setPath(this.entityPathEntity, this.speedTowardsTarget);
this.field_75445_i = 0;
}
/**
* Resets the task
***************
*** 97,107 ****
this.attacker.getLookHelper().setLookPositionWithEntity(var1, 30.0F, 30.0F);
if ((this.longMemory || this.attacker.getEntitySenses().canSee(var1)) && --this.field_75445_i <= 0)
{
this.field_75445_i = 4 + this.attacker.getRNG().nextInt(7);
! this.attacker.getNavigator().tryMoveToEntityLiving(var1, this.field_75440_e);
}
this.attackTick = Math.max(this.attackTick - 1, 0);
double var2 = (double)(this.attacker.width * 2.0F * this.attacker.width * 2.0F + var1.width);
--- 99,109 ----
this.attacker.getLookHelper().setLookPositionWithEntity(var1, 30.0F, 30.0F);
if ((this.longMemory || this.attacker.getEntitySenses().canSee(var1)) && --this.field_75445_i <= 0)
{
this.field_75445_i = 4 + this.attacker.getRNG().nextInt(7);
! this.attacker.getNavigator().tryMoveToEntityLiving(var1, this.speedTowardsTarget);
}
this.attackTick = Math.max(this.attackTick - 1, 0);
double var2 = (double)(this.attacker.width * 2.0F * this.attacker.width * 2.0F + var1.width);
*** net/minecraft/src/ILogAgent.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/ILogAgent.java Sat Feb 5 05:18:28 2022
***************
*** 1,11 ****
--- 1,21 ----
package net.minecraft.src;
+ import java.util.logging.Logger;
+
public interface ILogAgent
{
+ Logger getServerLogger();
+
+ /**
+ * Logs plain text message.
+ */
void logInfo(String var1);
+ /**
+ * Logs text as warning.
+ */
void logWarning(String var1);
void logWarningFormatted(String var1, Object ... var2);
void logWarningException(String var1, Throwable var2);
*** net/minecraft/src/LogAgent.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/LogAgent.java Sat Feb 5 05:18:30 2022
***************
*** 52,66 ****
--- 52,77 ----
{
this.serverLogger.log(Level.WARNING, "Failed to log " + this.loggerName + " to " + this.logFile, var5);
}
}
+ public Logger getServerLogger()
+ {
+ return this.serverLogger;
+ }
+
+ /**
+ * Logs plain text message.
+ */
public void logInfo(String par1Str)
{
this.serverLogger.log(Level.INFO, par1Str);
}
+ /**
+ * Logs text as warning.
+ */
public void logWarning(String par1Str)
{
this.serverLogger.log(Level.WARNING, par1Str);
}
*** net/minecraft/src/NetClientHandler.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/NetClientHandler.java Sat Feb 5 05:25:09 2022
***************
*** 1673,1694 ****
Scoreboard var2 = this.worldClient.getScoreboard();
ScorePlayerTeam var3;
if (par1Packet209SetPlayerTeam.mode == 0)
{
! var3 = var2.func_96527_f(par1Packet209SetPlayerTeam.teamName);
}
else
{
var3 = var2.func_96508_e(par1Packet209SetPlayerTeam.teamName);
}
if (par1Packet209SetPlayerTeam.mode == 0 || par1Packet209SetPlayerTeam.mode == 2)
{
! var3.func_96664_a(par1Packet209SetPlayerTeam.teamDisplayName);
! var3.func_96666_b(par1Packet209SetPlayerTeam.teamPrefix);
! var3.func_96662_c(par1Packet209SetPlayerTeam.teamSuffix);
var3.func_98298_a(par1Packet209SetPlayerTeam.friendlyFire);
}
Iterator var4;
String var5;
--- 1673,1694 ----
Scoreboard var2 = this.worldClient.getScoreboard();
ScorePlayerTeam var3;
if (par1Packet209SetPlayerTeam.mode == 0)
{
! var3 = var2.createTeam(par1Packet209SetPlayerTeam.teamName);
}
else
{
var3 = var2.func_96508_e(par1Packet209SetPlayerTeam.teamName);
}
if (par1Packet209SetPlayerTeam.mode == 0 || par1Packet209SetPlayerTeam.mode == 2)
{
! var3.setTeamName(par1Packet209SetPlayerTeam.teamDisplayName);
! var3.setNamePrefix(par1Packet209SetPlayerTeam.teamPrefix);
! var3.setNameSuffix(par1Packet209SetPlayerTeam.teamSuffix);
var3.func_98298_a(par1Packet209SetPlayerTeam.friendlyFire);
}
Iterator var4;
String var5;
***************
*** 1698,1708 ****
var4 = par1Packet209SetPlayerTeam.playerNames.iterator();
while (var4.hasNext())
{
var5 = (String)var4.next();
! var2.func_96521_a(var5, var3);
}
}
if (par1Packet209SetPlayerTeam.mode == 4)
{
--- 1698,1708 ----
var4 = par1Packet209SetPlayerTeam.playerNames.iterator();
while (var4.hasNext())
{
var5 = (String)var4.next();
! var2.addPlayerToTeam(var5, var3);
}
}
if (par1Packet209SetPlayerTeam.mode == 4)
{
*** net/minecraft/src/PathNavigate.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/PathNavigate.java Sat Feb 5 05:23:04 2022
***************
*** 105,125 ****
public void setCanSwim(boolean par1)
{
this.canSwim = par1;
}
! public float func_111269_d()
{
return (float)this.pathSearchRange.getAttributeValue();
}
/**
* Returns the path to the given coordinates
*/
public PathEntity getPathToXYZ(double par1, double par3, double par5)
{
! return !this.canNavigate() ? null : this.worldObj.getEntityPathToXYZ(this.theEntity, MathHelper.floor_double(par1), (int)par3, MathHelper.floor_double(par5), this.func_111269_d(), this.canPassOpenWoodenDoors, this.canPassClosedWoodenDoors, this.avoidsWater, this.canSwim);
}
/**
* Try to find and set a path to XYZ. Returns true if successful.
*/
--- 105,128 ----
public void setCanSwim(boolean par1)
{
this.canSwim = par1;
}
! /**
! * Gets the maximum distance that the path finding will search in.
! */
! public float getPathSearchRange()
{
return (float)this.pathSearchRange.getAttributeValue();
}
/**
* Returns the path to the given coordinates
*/
public PathEntity getPathToXYZ(double par1, double par3, double par5)
{
! return !this.canNavigate() ? null : this.worldObj.getEntityPathToXYZ(this.theEntity, MathHelper.floor_double(par1), (int)par3, MathHelper.floor_double(par5), this.getPathSearchRange(), this.canPassOpenWoodenDoors, this.canPassClosedWoodenDoors, this.avoidsWater, this.canSwim);
}
/**
* Try to find and set a path to XYZ. Returns true if successful.
*/
***************
*** 132,142 ****
/**
* Returns the path to the given EntityLiving
*/
public PathEntity getPathToEntityLiving(Entity par1Entity)
{
! return !this.canNavigate() ? null : this.worldObj.getPathEntityToEntity(this.theEntity, par1Entity, this.func_111269_d(), this.canPassOpenWoodenDoors, this.canPassClosedWoodenDoors, this.avoidsWater, this.canSwim);
}
/**
* Try to find and set a path to EntityLiving. Returns true if successful.
*/
--- 135,145 ----
/**
* Returns the path to the given EntityLiving
*/
public PathEntity getPathToEntityLiving(Entity par1Entity)
{
! return !this.canNavigate() ? null : this.worldObj.getPathEntityToEntity(this.theEntity, par1Entity, this.getPathSearchRange(), this.canPassOpenWoodenDoors, this.canPassClosedWoodenDoors, this.avoidsWater, this.canSwim);
}
/**
* Try to find and set a path to EntityLiving. Returns true if successful.
*/
*** net/minecraft/src/Scoreboard.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/Scoreboard.java Sat Feb 5 05:21:53 2022
***************
*** 191,201 ****
public ScorePlayerTeam func_96508_e(String par1Str)
{
return (ScorePlayerTeam)this.field_96542_e.get(par1Str);
}
! public ScorePlayerTeam func_96527_f(String par1Str)
{
ScorePlayerTeam var2 = this.func_96508_e(par1Str);
if (var2 != null)
{
--- 191,201 ----
public ScorePlayerTeam func_96508_e(String par1Str)
{
return (ScorePlayerTeam)this.field_96542_e.get(par1Str);
}
! public ScorePlayerTeam createTeam(String par1Str)
{
ScorePlayerTeam var2 = this.func_96508_e(par1Str);
if (var2 != null)
{
***************
*** 222,243 ****
}
this.func_96513_c(par1ScorePlayerTeam);
}
! public void func_96521_a(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
if (this.getPlayersTeam(par1Str) != null)
{
! this.func_96524_g(par1Str);
}
this.teamMemberships.put(par1Str, par2ScorePlayerTeam);
par2ScorePlayerTeam.getMembershipCollection().add(par1Str);
}
! public boolean func_96524_g(String par1Str)
{
ScorePlayerTeam var2 = this.getPlayersTeam(par1Str);
if (var2 != null)
{
--- 222,243 ----
}
this.func_96513_c(par1ScorePlayerTeam);
}
! public void addPlayerToTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
if (this.getPlayersTeam(par1Str) != null)
{
! this.removePlayerFromTeams(par1Str);
}
this.teamMemberships.put(par1Str, par2ScorePlayerTeam);
par2ScorePlayerTeam.getMembershipCollection().add(par1Str);
}
! public boolean removePlayerFromTeams(String par1Str)
{
ScorePlayerTeam var2 = this.getPlayersTeam(par1Str);
if (var2 != null)
{
*** net/minecraft/src/ScoreboardSaveData.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/ScoreboardSaveData.java Sat Feb 5 05:25:45 2022
***************
*** 58,91 ****
protected void func_96498_a(NBTTagList par1NBTTagList)
{
for (int var2 = 0; var2 < par1NBTTagList.tagCount(); ++var2)
{
NBTTagCompound var3 = (NBTTagCompound)par1NBTTagList.tagAt(var2);
! ScorePlayerTeam var4 = this.theScoreboard.func_96527_f(var3.getString("Name"));
! var4.func_96664_a(var3.getString("DisplayName"));
! var4.func_96666_b(var3.getString("Prefix"));
! var4.func_96662_c(var3.getString("Suffix"));
if (var3.hasKey("AllowFriendlyFire"))
{
var4.setAllowFriendlyFire(var3.getBoolean("AllowFriendlyFire"));
}
if (var3.hasKey("SeeFriendlyInvisibles"))
{
! var4.func_98300_b(var3.getBoolean("SeeFriendlyInvisibles"));
}
this.func_96502_a(var4, var3.getTagList("Players"));
}
}
protected void func_96502_a(ScorePlayerTeam par1ScorePlayerTeam, NBTTagList par2NBTTagList)
{
for (int var3 = 0; var3 < par2NBTTagList.tagCount(); ++var3)
{
! this.theScoreboard.func_96521_a(((NBTTagString)par2NBTTagList.tagAt(var3)).data, par1ScorePlayerTeam);
}
}
protected void func_96504_c(NBTTagCompound par1NBTTagCompound)
{
--- 58,91 ----
protected void func_96498_a(NBTTagList par1NBTTagList)
{
for (int var2 = 0; var2 < par1NBTTagList.tagCount(); ++var2)
{
NBTTagCompound var3 = (NBTTagCompound)par1NBTTagList.tagAt(var2);
! ScorePlayerTeam var4 = this.theScoreboard.createTeam(var3.getString("Name"));
! var4.setTeamName(var3.getString("DisplayName"));
! var4.setNamePrefix(var3.getString("Prefix"));
! var4.setNameSuffix(var3.getString("Suffix"));
if (var3.hasKey("AllowFriendlyFire"))
{
var4.setAllowFriendlyFire(var3.getBoolean("AllowFriendlyFire"));
}
if (var3.hasKey("SeeFriendlyInvisibles"))
{
! var4.setSeeFriendlyInvisiblesEnabled(var3.getBoolean("SeeFriendlyInvisibles"));
}
this.func_96502_a(var4, var3.getTagList("Players"));
}
}
protected void func_96502_a(ScorePlayerTeam par1ScorePlayerTeam, NBTTagList par2NBTTagList)
{
for (int var3 = 0; var3 < par2NBTTagList.tagCount(); ++var3)
{
! this.theScoreboard.addPlayerToTeam(((NBTTagString)par2NBTTagList.tagAt(var3)).data, par1ScorePlayerTeam);
}
}
protected void func_96504_c(NBTTagCompound par1NBTTagCompound)
{
*** net/minecraft/src/ScorePlayerTeam.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/ScorePlayerTeam.java Sat Feb 5 05:22:18 2022
***************
*** 32,42 ****
public String func_96669_c()
{
return this.field_96673_d;
}
! public void func_96664_a(String par1Str)
{
if (par1Str == null)
{
throw new IllegalArgumentException("Name cannot be null");
}
--- 32,42 ----
public String func_96669_c()
{
return this.field_96673_d;
}
! public void setTeamName(String par1Str)
{
if (par1Str == null)
{
throw new IllegalArgumentException("Name cannot be null");
}
***************
*** 58,68 ****
public String getColorPrefix()
{
return this.field_96674_e;
}
! public void func_96666_b(String par1Str)
{
if (par1Str == null)
{
throw new IllegalArgumentException("Prefix cannot be null");
}
--- 58,68 ----
public String getColorPrefix()
{
return this.field_96674_e;
}
! public void setNamePrefix(String par1Str)
{
if (par1Str == null)
{
throw new IllegalArgumentException("Prefix cannot be null");
}
***************
*** 79,89 ****
public String getColorSuffix()
{
return this.colorSuffix;
}
! public void func_96662_c(String par1Str)
{
if (par1Str == null)
{
throw new IllegalArgumentException("Suffix cannot be null");
}
--- 79,89 ----
public String getColorSuffix()
{
return this.colorSuffix;
}
! public void setNameSuffix(String par1Str)
{
if (par1Str == null)
{
throw new IllegalArgumentException("Suffix cannot be null");
}
***************
*** 121,131 ****
public boolean func_98297_h()
{
return this.field_98301_h;
}
! public void func_98300_b(boolean par1)
{
this.field_98301_h = par1;
this.theScoreboard.func_96538_b(this);
}
--- 121,131 ----
public boolean func_98297_h()
{
return this.field_98301_h;
}
! public void setSeeFriendlyInvisiblesEnabled(boolean par1)
{
this.field_98301_h = par1;
this.theScoreboard.func_96538_b(this);
}
***************
*** 147,154 ****
}
public void func_98298_a(int par1)
{
this.setAllowFriendlyFire((par1 & 1) > 0);
! this.func_98300_b((par1 & 2) > 0);
}
}
--- 147,154 ----
}
public void func_98298_a(int par1)
{
this.setAllowFriendlyFire((par1 & 1) > 0);
! this.setSeeFriendlyInvisiblesEnabled((par1 & 2) > 0);
}
}
*** net/minecraft/src/ServerCommandScoreboard.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/ServerCommandScoreboard.java Sat Feb 5 05:20:47 2022
***************
*** 358,377 ****
throw new SyntaxErrorException("commands.scoreboard.teams.add.displayTooLong", new Object[] {var6, Integer.valueOf(32)});
}
if (var6.length() > 0)
{
! var5.func_96527_f(var4).func_96664_a(var6);
}
else
{
! var5.func_96527_f(var4);
}
}
else
{
! var5.func_96527_f(var4);
}
notifyAdmins(par1ICommandSender, "commands.scoreboard.teams.add.success", new Object[] {var4});
}
}
--- 358,377 ----
throw new SyntaxErrorException("commands.scoreboard.teams.add.displayTooLong", new Object[] {var6, Integer.valueOf(32)});
}
if (var6.length() > 0)
{
! var5.createTeam(var4).setTeamName(var6);
}
else
{
! var5.createTeam(var4);
}
}
else
{
! var5.createTeam(var4);
}
notifyAdmins(par1ICommandSender, "commands.scoreboard.teams.add.success", new Object[] {var4});
}
}
***************
*** 414,425 ****
if (var6 == null)
{
throw new WrongUsageException("commands.scoreboard.teams.option.noValue", new Object[] {var5, func_96333_a(EnumChatFormatting.func_96296_a(true, false))});
}
! var4.func_96666_b(var7.toString());
! var4.func_96662_c(EnumChatFormatting.RESET.toString());
}
else if (var5.equalsIgnoreCase("friendlyfire"))
{
if (!var6.equalsIgnoreCase("true") && !var6.equalsIgnoreCase("false"))
{
--- 414,425 ----
if (var6 == null)
{
throw new WrongUsageException("commands.scoreboard.teams.option.noValue", new Object[] {var5, func_96333_a(EnumChatFormatting.func_96296_a(true, false))});
}
! var4.setNamePrefix(var7.toString());
! var4.setNameSuffix(EnumChatFormatting.RESET.toString());
}
else if (var5.equalsIgnoreCase("friendlyfire"))
{
if (!var6.equalsIgnoreCase("true") && !var6.equalsIgnoreCase("false"))
{
***************
*** 433,443 ****
if (!var6.equalsIgnoreCase("true") && !var6.equalsIgnoreCase("false"))
{
throw new WrongUsageException("commands.scoreboard.teams.option.noValue", new Object[] {var5, func_96333_a(Arrays.asList(new String[]{"true", "false"}))});
}
! var4.func_98300_b(var6.equalsIgnoreCase("true"));
}
notifyAdmins(par1ICommandSender, "commands.scoreboard.teams.option.success", new Object[] {var5, var4.func_96661_b(), var6});
}
}
--- 433,443 ----
if (!var6.equalsIgnoreCase("true") && !var6.equalsIgnoreCase("false"))
{
throw new WrongUsageException("commands.scoreboard.teams.option.noValue", new Object[] {var5, func_96333_a(Arrays.asList(new String[]{"true", "false"}))});
}
! var4.setSeeFriendlyInvisiblesEnabled(var6.equalsIgnoreCase("true"));
}
notifyAdmins(par1ICommandSender, "commands.scoreboard.teams.option.success", new Object[] {var5, var4.func_96661_b(), var6});
}
}
***************
*** 504,522 ****
String var7;
if (par1ICommandSender instanceof EntityPlayer && par3 == par2ArrayOfStr.length)
{
var7 = getCommandSenderAsPlayer(par1ICommandSender).getEntityName();
! var4.func_96521_a(var7, var5);
var6.add(var7);
}
else
{
while (par3 < par2ArrayOfStr.length)
{
var7 = func_96332_d(par1ICommandSender, par2ArrayOfStr[par3++]);
! var4.func_96521_a(var7, var5);
var6.add(var7);
}
}
if (!var6.isEmpty())
--- 504,522 ----
String var7;
if (par1ICommandSender instanceof EntityPlayer && par3 == par2ArrayOfStr.length)
{
var7 = getCommandSenderAsPlayer(par1ICommandSender).getEntityName();
! var4.addPlayerToTeam(var7, var5);
var6.add(var7);
}
else
{
while (par3 < par2ArrayOfStr.length)
{
var7 = func_96332_d(par1ICommandSender, par2ArrayOfStr[par3++]);
! var4.addPlayerToTeam(var7, var5);
var6.add(var7);
}
}
if (!var6.isEmpty())
***************
*** 537,547 ****
if (par1ICommandSender instanceof EntityPlayer && par3 == par2ArrayOfStr.length)
{
var7 = getCommandSenderAsPlayer(par1ICommandSender).getEntityName();
! if (var4.func_96524_g(var7))
{
var5.add(var7);
}
else
{
--- 537,547 ----
if (par1ICommandSender instanceof EntityPlayer && par3 == par2ArrayOfStr.length)
{
var7 = getCommandSenderAsPlayer(par1ICommandSender).getEntityName();
! if (var4.removePlayerFromTeams(var7))
{
var5.add(var7);
}
else
{
***************
*** 552,562 ****
{
while (par3 < par2ArrayOfStr.length)
{
var7 = func_96332_d(par1ICommandSender, par2ArrayOfStr[par3++]);
! if (var4.func_96524_g(var7))
{
var5.add(var7);
}
else
{
--- 552,562 ----
{
while (par3 < par2ArrayOfStr.length)
{
var7 = func_96332_d(par1ICommandSender, par2ArrayOfStr[par3++]);
! if (var4.removePlayerFromTeams(var7))
{
var5.add(var7);
}
else
{
*** net/minecraft/src/ServerScoreboard.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/ServerScoreboard.java Sat Feb 5 05:19:39 2022
***************
*** 68,80 ****
}
this.func_96551_b();
}
! public void func_96521_a(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
! super.func_96521_a(par1Str, par2ScorePlayerTeam);
this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 3));
this.func_96551_b();
}
/**
--- 68,80 ----
}
this.func_96551_b();
}
! public void addPlayerToTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
! super.addPlayerToTeam(par1Str, par2ScorePlayerTeam);
this.field_96555_a.getConfigurationManager().sendPacketToAllPlayers(new Packet209SetPlayerTeam(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 3));
this.func_96551_b();
}
/**
*** net/minecraft/src/TileEntityCommandBlock.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/TileEntityCommandBlock.java Sat Feb 5 05:19:20 2022
***************
*** 127,141 ****
NBTTagCompound var1 = new NBTTagCompound();
this.writeToNBT(var1);
return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 2, var1);
}
! public int func_96103_d()
{
return this.succesCount;
}
! public void func_96102_a(int par1)
{
this.succesCount = par1;
}
}
--- 127,141 ----
NBTTagCompound var1 = new NBTTagCompound();
this.writeToNBT(var1);
return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 2, var1);
}
! public int getSignalStrength()
{
return this.succesCount;
}
! public void setSignalStrength(int par1)
{
this.succesCount = par1;
}
}

View File

@ -0,0 +1,24 @@
*** net/minecraft/src/DedicatedServer.java Fri Feb 4 19:29:58 2022
--- net/minecraft/src/DedicatedServer.java Sat Feb 5 05:33:35 2022
***************
*** 356,365 ****
--- 356,374 ----
{
return this.guiIsEnabled;
}
/**
+ * Custom patch to avoid exposing MinecraftServerGui to the client
+ * @param b Whenever or not you want to enable the GUI
+ */
+ public void setGuiEnabled(boolean b)
+ {
+ this.guiIsEnabled = b;
+ }
+
+ /**
* On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections.
*/
public String shareToLAN(EnumGameType par1EnumGameType, boolean par2)
{
return "";

View File

@ -0,0 +1,135 @@
*** I:/mine/tmcw5_src_original/net/minecraft/server/MinecraftServer.java Fri Feb 4 19:29:58 2022
--- I:/mine/tmcw5/src/minecraft/net/minecraft/server/MinecraftServer.java Sat Feb 5 05:47:44 2022
***************
*** 8,60 ****
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
! import net.minecraft.src.AnvilSaveConverter;
! import net.minecraft.src.AxisAlignedBB;
! import net.minecraft.src.BlocksMined;
! import net.minecraft.src.CallableIsServerModded;
! import net.minecraft.src.CallableServerMemoryStats;
! import net.minecraft.src.CallableServerProfiler;
! import net.minecraft.src.ChatMessageComponent;
! import net.minecraft.src.ChunkCoordinates;
! import net.minecraft.src.CommandBase;
! import net.minecraft.src.CrashReport;
! import net.minecraft.src.DemoWorldServer;
! import net.minecraft.src.DispenserBehaviors;
! import net.minecraft.src.EntityPlayer;
! import net.minecraft.src.EnumGameType;
! import net.minecraft.src.GuiIngameTMCW;
! import net.minecraft.src.ICommandManager;
! import net.minecraft.src.ICommandSender;
! import net.minecraft.src.ILogAgent;
! import net.minecraft.src.IPlayerUsage;
! import net.minecraft.src.IProgressUpdate;
! import net.minecraft.src.ISaveFormat;
! import net.minecraft.src.ISaveHandler;
! import net.minecraft.src.IUpdatePlayerListBox;
! import net.minecraft.src.MathHelper;
! import net.minecraft.src.MinecraftException;
! import net.minecraft.src.NetworkListenThread;
! import net.minecraft.src.Packet;
! import net.minecraft.src.Packet4UpdateTime;
! import net.minecraft.src.PlayerManager;
! import net.minecraft.src.PlayerUsageSnooper;
! import net.minecraft.src.Profiler;
! import net.minecraft.src.RConConsoleSource;
! import net.minecraft.src.ReportedException;
! import net.minecraft.src.ServerCommandManager;
! import net.minecraft.src.ServerConfigurationManager;
! import net.minecraft.src.ThreadMinecraftServer;
! import net.minecraft.src.World;
! import net.minecraft.src.WorldInfo;
! import net.minecraft.src.WorldManager;
! import net.minecraft.src.WorldServer;
! import net.minecraft.src.WorldServerMulti;
! import net.minecraft.src.WorldSettings;
! import net.minecraft.src.WorldType;
public abstract class MinecraftServer implements ICommandSender, Runnable, IPlayerUsage
{
/** Instance of Minecraft Server. */
private static MinecraftServer mcServer;
--- 8,19 ----
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
!
! import net.minecraft.src.*;
public abstract class MinecraftServer implements ICommandSender, Runnable, IPlayerUsage
{
/** Instance of Minecraft Server. */
private static MinecraftServer mcServer;
***************
*** 131,141 ****
public long[][] timeOfLastDimensionTick;
public final long[] sentPacketCountArray = new long[100];
public final long[] sentPacketSizeArray = new long[100];
public final long[] receivedPacketCountArray = new long[100];
public final long[] receivedPacketSizeArray = new long[100];
! private final int[] tickTimeArray = new int[100];
private KeyPair serverKeyPair;
/** Username of the server owner (for integrated servers) */
private String serverOwner;
private String folderName;
--- 90,100 ----
public long[][] timeOfLastDimensionTick;
public final long[] sentPacketCountArray = new long[100];
public final long[] sentPacketSizeArray = new long[100];
public final long[] receivedPacketCountArray = new long[100];
public final long[] receivedPacketSizeArray = new long[100];
! public final int[] tickTimeArray = new int[100]; // need public for server
private KeyPair serverKeyPair;
/** Username of the server owner (for integrated servers) */
private String serverOwner;
private String folderName;
***************
*** 832,842 ****
}
}
public String getServerModName()
{
! return "vanilla";
}
/**
* Adds the server info, including from theWorldServer, to the crash report.
*/
--- 791,801 ----
}
}
public String getServerModName()
{
! return Minecraft.VERSION;
}
/**
* Adds the server info, including from theWorldServer, to the crash report.
*/
***************
*** 1390,1396 ****
--- 1349,1360 ----
}
public static final long getCachedSystemTime()
{
return cachedTime;
+ }
+
+ public void func_82010_a(IUpdatePlayerListBox par1IUpdatePlayerListBox)
+ {
+ this.tickables.add(par1IUpdatePlayerListBox);
}
}

View File

@ -0,0 +1,25 @@
*** I:/mine/tmcw5_src_original/net/minecraft/client/ClientBrandRetriever.java Fri Feb 4 19:29:58 2022
--- I:/mine/tmcw5/src/minecraft/net/minecraft/client/ClientBrandRetriever.java Sat Feb 5 05:46:59 2022
***************
*** 1,9 ****
package net.minecraft.client;
public class ClientBrandRetriever
{
public static String getClientModName()
{
! return "vanilla";
}
}
--- 1,11 ----
package net.minecraft.client;
+ import net.minecraft.src.Minecraft;
+
public class ClientBrandRetriever
{
public static String getClientModName()
{
! return Minecraft.VERSION;
}
}

View File

@ -0,0 +1,27 @@
*** I:/mine/tmcw5_src_original/net/minecraft/src/Minecraft.java Fri Feb 4 19:29:58 2022
--- I:/mine/tmcw5/src/minecraft/net/minecraft/src/Minecraft.java Sat Feb 5 05:50:37 2022
***************
*** 31,41 ****
import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU;
public class Minecraft implements IPlayerUsage
{
! private static final String WINDOW_TITLE = "TheMasterCaver\'s World (version 5)";
public static final String VERSION = "TMCWv5";
public static final String VERSION_ID_STRING = "DEC5";
private CustomKeyHelper customKeyHelper;
private static int MAX_TEXTURE_SIZE;
private long lastAttackTime;
--- 31,41 ----
import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU;
public class Minecraft implements IPlayerUsage
{
! public static final String WINDOW_TITLE = "TheMasterCaver\'s World (version 5)";
public static final String VERSION = "TMCWv5";
public static final String VERSION_ID_STRING = "DEC5";
private CustomKeyHelper customKeyHelper;
private static int MAX_TEXTURE_SIZE;
private long lastAttackTime;

48
real_difs.txt Normal file
View File

@ -0,0 +1,48 @@
BlockCommandBlock OK
DedicatedServer NO
EntityAIAttackOnCollite OK
ILogAgent OK
LogAgent OK
PathNatigate OK
Scoreboard OK
ScorePlayerTeam OK
ServerCommandScoreboard OK
ServerScorboard OK
TileEntityCommandBlock OK
NOTE: can we avoid DedicatedServer.func_120011_ar?
SAME:
* var6.getBlockBoundsMinX() - -> var6.getMinX() - (do
SAME:
* this.logicWorld.setBlockMetadataWithNotify -> this.logicWorld.setBlockMetadata
SAME:
var2 = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(par1Str); ->
var2 = MinecraftServer.getServer().getConfigurationManager().getPlayerEntity(par1Str);
SAME:
this.startTime = MinecraftServer.getSystemTimeMillis(); ->
this.startTime = MinecraftServer.getCurrentTimeMillis();
SAME:
double var6 = (double)var5.getPlayerCoordinates().posX; ->
double var6 = (double)var5.getCommandSenderPosition().posX;
var5.playerNetServerHandler.sendPacketToPlayer(new Packet62LevelSound(var4, var30, var32, var34, (float)var16, (float)var14));
->
var5.playerNetServerHandler.sendPacket(new Packet62LevelSound(var4, var30, var32, var34, (float)var16, (float)var14));
.kickPlayerFromServer( ->
var3.playerNetServerHandler.kickPlayer("You
s.worldObj).getAllTileEntityInBox( ->
var8.addAll(((WorldServer)this.worldObj).getTileEntityList(var9.chunkXPos * 16, 0, var9.chunkZPos * 16, var9.chunkXPos * 16 + 16, 256, var9.chunkZPos * 16 + 16));
}
OK:
this.sendTileEntityToPlayer(var5);
->
this.getTileEntityInfo(var5);

1772
tmcv5_hybrid_server.patch Normal file

File diff suppressed because it is too large Load Diff