summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPlayer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityPlayer.patch')
-rw-r--r--nms-patches/EntityPlayer.patch76
1 files changed, 38 insertions, 38 deletions
diff --git a/nms-patches/EntityPlayer.patch b/nms-patches/EntityPlayer.patch
index 59802e2b..32668f0a 100644
--- a/nms-patches/EntityPlayer.patch
+++ b/nms-patches/EntityPlayer.patch
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityPlayer.java
+++ b/net/minecraft/server/EntityPlayer.java
-@@ -12,10 +12,27 @@
+@@ -11,10 +11,27 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -24,12 +24,12 @@
public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bV = LogManager.getLogger();
-- private String locale = "en_US";
-+ public String locale = "en_us"; // PAIL: private -> public
+- public String locale = "en_US";
++ public String locale = "en_us"; // CraftBukkit - lowercase
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
-@@ -51,6 +68,19 @@
+@@ -50,6 +67,19 @@
public int ping;
public boolean viewingCredits;
@@ -49,7 +49,7 @@
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
super(worldserver, gameprofile);
playerinteractmanager.player = this;
-@@ -82,6 +112,11 @@
+@@ -81,6 +111,11 @@
this.setPosition(this.locX, this.locY + 1.0D, this.locZ);
}
@@ -61,7 +61,7 @@
}
public void a(NBTTagCompound nbttagcompound) {
-@@ -104,6 +139,7 @@
+@@ -103,6 +138,7 @@
if (nbttagcompound.hasKeyOfType("recipeBook", 10)) {
this.cr.a(nbttagcompound.getCompound("recipeBook"));
}
@@ -69,10 +69,10 @@
}
-@@ -150,8 +186,34 @@
+@@ -149,8 +185,34 @@
}
- nbttagcompound.set("recipeBook", this.cr.e());
+ nbttagcompound.set("recipeBook", this.cr.c());
+ this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit
}
@@ -104,7 +104,7 @@
public void levelDown(int i) {
super.levelDown(i);
this.lastSentExp = -1;
-@@ -185,6 +247,11 @@
+@@ -184,6 +246,11 @@
}
public void B_() {
@@ -116,7 +116,7 @@
this.playerInteractManager.a();
--this.invulnerableTicks;
if (this.noDamageTicks > 0) {
-@@ -250,7 +317,7 @@
+@@ -249,7 +316,7 @@
}
if (this.getHealth() != this.lastHealthSent || this.ch != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.ci) {
@@ -125,7 +125,7 @@
this.lastHealthSent = this.getHealth();
this.ch = this.foodData.getFoodLevel();
this.ci = this.foodData.getSaturationLevel() == 0.0F;
-@@ -271,6 +338,12 @@
+@@ -270,6 +337,12 @@
this.a(IScoreboardCriteria.i, MathHelper.f((float) this.cc));
}
@@ -138,7 +138,7 @@
if (this.getArmorStrength() != this.cd) {
this.cd = this.getArmorStrength();
this.a(IScoreboardCriteria.j, MathHelper.f((float) this.cd));
-@@ -295,6 +368,16 @@
+@@ -294,6 +367,16 @@
CriterionTriggers.o.a(this);
}
@@ -155,7 +155,7 @@
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked");
-@@ -305,12 +388,11 @@
+@@ -304,12 +387,11 @@
}
private void a(IScoreboardCriteria iscoreboardcriteria, int i) {
@@ -170,7 +170,7 @@
scoreboardscore.setScore(i);
}
-@@ -321,32 +403,62 @@
+@@ -320,32 +402,62 @@
boolean flag = this.world.getGameRules().getBoolean("showDeathMessages");
this.playerConnection.sendPacket(new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, flag));
@@ -247,7 +247,7 @@
scoreboardscore.incrementScore();
}
-@@ -374,29 +486,36 @@
+@@ -373,29 +485,36 @@
if (entity != this) {
super.a(entity, i, damagesource);
this.addScore(i);
@@ -290,8 +290,8 @@
String s = entity instanceof EntityHuman ? entity.getName() : entity.bl();
ScoreboardTeam scoreboardteam = this.getScoreboard().getPlayerTeam(this.getName());
-@@ -421,7 +540,10 @@
- int j = scoreboardteam1.m().b();
+@@ -420,7 +539,10 @@
+ int j = scoreboardteam1.getColor().b();
if (j >= 0 && j < IScoreboardCriteria.m.length) {
- return this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.m[j]);
@@ -302,7 +302,7 @@
}
}
-@@ -463,12 +585,14 @@
+@@ -462,12 +584,14 @@
}
private boolean canPvP() {
@@ -319,7 +319,7 @@
if (this.dimension == 0 && i == -1) {
this.cv = new Vec3D(this.locX, this.locY, this.locZ);
} else if (this.dimension != -1 && i != 0) {
-@@ -476,6 +600,7 @@
+@@ -475,6 +599,7 @@
}
if (this.dimension == 1 && i == 1) {
@@ -327,7 +327,7 @@
this.world.kill(this);
if (!this.viewingCredits) {
this.viewingCredits = true;
-@@ -489,7 +614,10 @@
+@@ -488,7 +613,10 @@
i = 1;
}
@@ -339,7 +339,7 @@
this.playerConnection.sendPacket(new PacketPlayOutWorldEvent(1032, BlockPosition.ZERO, 0, false));
this.lastSentExp = -1;
this.lastHealthSent = -1.0F;
-@@ -535,6 +663,7 @@
+@@ -534,6 +662,7 @@
}
public void a(boolean flag, boolean flag1, boolean flag2) {
@@ -347,7 +347,7 @@
if (this.isSleeping()) {
this.x().getTracker().sendPacketToEntity(this, new PacketPlayOutAnimation(this, 2));
}
-@@ -613,23 +742,55 @@
+@@ -612,23 +741,55 @@
this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
}
@@ -406,7 +406,7 @@
if (iinventory instanceof ILootable && ((ILootable) iinventory).b() != null && this.isSpectator()) {
this.a((new ChatMessage("container.spectatorCantOpen", new Object[0])).setChatModifier((new ChatModifier()).setColor(EnumChatFormat.RED)), true);
} else {
-@@ -643,18 +804,21 @@
+@@ -642,18 +803,21 @@
if (itileinventory.isLocked() && !this.a(itileinventory.getLock()) && !this.isSpectator()) {
this.playerConnection.sendPacket(new PacketPlayOutChat(new ChatMessage("container.isLocked", new Object[] { iinventory.getScoreboardDisplayName()}), ChatMessageType.GAME_INFO));
this.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.ab, SoundCategory.BLOCKS, this.locX, this.locY, this.locZ, 1.0F, 1.0F));
@@ -430,7 +430,7 @@
this.activeContainer.windowId = this.containerCounter;
this.activeContainer.addSlotListener(this);
-@@ -662,8 +826,14 @@
+@@ -661,8 +825,14 @@
}
public void openTrade(IMerchant imerchant) {
@@ -446,7 +446,7 @@
this.activeContainer.windowId = this.containerCounter;
this.activeContainer.addSlotListener(this);
InventoryMerchant inventorymerchant = ((ContainerMerchant) this.activeContainer).e();
-@@ -683,13 +853,20 @@
+@@ -682,13 +852,20 @@
}
public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) {
@@ -468,7 +468,7 @@
this.activeContainer.windowId = this.containerCounter;
this.activeContainer.addSlotListener(this);
}
-@@ -730,6 +907,11 @@
+@@ -729,6 +906,11 @@
public void a(Container container, NonNullList<ItemStack> nonnulllist) {
this.playerConnection.sendPacket(new PacketPlayOutWindowItems(container.windowId, nonnulllist));
this.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, this.inventory.getCarried()));
@@ -480,7 +480,7 @@
}
public void setContainerData(Container container, int i, int j) {
-@@ -744,6 +926,7 @@
+@@ -743,6 +925,7 @@
}
public void closeInventory() {
@@ -488,7 +488,7 @@
this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId));
this.r();
}
-@@ -818,7 +1001,7 @@
+@@ -817,7 +1000,7 @@
arraylist.add(CraftingManager.a(minecraftkey));
}
@@ -497,7 +497,7 @@
}
public void b(List<IRecipe> list) {
-@@ -840,7 +1023,16 @@
+@@ -839,7 +1022,16 @@
public void triggerHealthUpdate() {
this.lastHealthSent = -1.0E8F;
@@ -514,7 +514,7 @@
public void a(IChatBaseComponent ichatbasecomponent, boolean flag) {
this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent, flag ? ChatMessageType.GAME_INFO : ChatMessageType.CHAT));
-@@ -880,7 +1072,7 @@
+@@ -879,7 +1071,7 @@
this.lastSentExp = -1;
this.lastHealthSent = -1.0F;
this.ch = -1;
@@ -523,7 +523,7 @@
this.removeQueue.addAll(entityplayer.removeQueue);
this.cq = entityplayer.cq;
this.cv = entityplayer.cv;
-@@ -939,6 +1131,18 @@
+@@ -938,6 +1130,18 @@
}
public void a(EnumGamemode enumgamemode) {
@@ -542,7 +542,7 @@
this.playerInteractManager.setGameMode(enumgamemode);
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, (float) enumgamemode.getId()));
if (enumgamemode == EnumGamemode.SPECTATOR) {
-@@ -965,6 +1169,7 @@
+@@ -964,6 +1168,7 @@
}
public boolean a(int i, String s) {
@@ -550,7 +550,7 @@
if ("seed".equals(s) && !this.server.aa()) {
return true;
} else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) {
-@@ -978,6 +1183,15 @@
+@@ -977,6 +1182,15 @@
} else {
return true;
}
@@ -566,7 +566,7 @@
}
public String A() {
-@@ -989,6 +1203,16 @@
+@@ -988,6 +1202,16 @@
}
public void a(PacketPlayInSettings packetplayinsettings) {
@@ -583,7 +583,7 @@
this.locale = packetplayinsettings.a();
this.cl = packetplayinsettings.c();
this.cm = packetplayinsettings.d();
-@@ -1054,7 +1278,7 @@
+@@ -1053,7 +1277,7 @@
this.co = (Entity) (entity == null ? this : entity);
if (entity1 != this.co) {
this.playerConnection.sendPacket(new PacketPlayOutCamera(this.co));
@@ -592,7 +592,7 @@
}
}
-@@ -1081,7 +1305,7 @@
+@@ -1080,7 +1304,7 @@
@Nullable
public IChatBaseComponent getPlayerListName() {
@@ -601,7 +601,7 @@
}
public void a(EnumHand enumhand) {
-@@ -1098,12 +1322,17 @@
+@@ -1097,12 +1321,17 @@
}
public void N() {
@@ -619,7 +619,7 @@
}
public AdvancementDataPlayer getAdvancementData() {
-@@ -1114,4 +1343,139 @@
+@@ -1113,4 +1342,139 @@
public Vec3D Q() {
return this.cv;
}