mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-29 03:31:27 +01:00
even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even
more work
This commit is contained in:
parent
1c0fdc2824
commit
6d2c131449
@ -29,16 +29,16 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerGamePacketListener {
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
switch (packet.getAction()) {
|
switch (packet.getAction()) {
|
||||||
case PRESS_SHIFT_KEY:
|
case PRESS_SHIFT_KEY:
|
||||||
this.player.setShiftKeyDown(true);
|
this.player.setShiftKeyDown(true);
|
||||||
+
|
+
|
||||||
+ // Paper start - Hang on!
|
+ // Paper start - Hang on!
|
||||||
+ if (this.player.level.paperConfig.parrotsHangOnBetter) {
|
+ if (this.player.level.paperConfig.parrotsHangOnBetter) {
|
||||||
+ this.player.removeEntitiesOnShoulder();
|
+ this.player.removeEntitiesOnShoulder();
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
break;
|
break;
|
||||||
case RELEASE_SHIFT_KEY:
|
case RELEASE_SHIFT_KEY:
|
||||||
@ -50,9 +50,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
||||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||||
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping()) {
|
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
||||||
- this.removeEntitiesOnShoulder();
|
- this.removeEntitiesOnShoulder();
|
||||||
+ if (!this.level.paperConfig.parrotsHangOnBetter) this.removeEntitiesOnShoulder(); // Paper - Hang on!
|
+ if (!this.level.paperConfig.parrotsHangOnBetter) this.removeEntitiesOnShoulder(); // Paper - Hang on!
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- protected void removeEntitiesOnShoulder() {
|
||||||
|
+ public void removeEntitiesOnShoulder() { // Paper - protected -> public
|
||||||
|
if (this.timeEntitySatOnShoulder + 20L < this.level.getGameTime()) {
|
||||||
|
// CraftBukkit start
|
||||||
|
if (this.spawnEntityFromShoulder(this.getShoulderEntityLeft())) {
|
@ -26,8 +26,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (title == null) {
|
if (title == null) {
|
||||||
this.title = null;
|
this.title = null;
|
||||||
return true;
|
return true;
|
||||||
- } else if (title.length() > MAX_TITLE_LENGTH) {
|
- } else if (title.length() > CraftMetaBook.MAX_TITLE_LENGTH) {
|
||||||
+ } else if (title.length() > MAX_TITLE_LENGTH && !OVERRIDE_CHECKS) { // Paper - Add override
|
+ } else if (title.length() > CraftMetaBook.MAX_TITLE_LENGTH && !CraftMetaBook.OVERRIDE_CHECKS) { // Paper - Add override
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,8 +35,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
String validatePage(String page) {
|
String validatePage(String page) {
|
||||||
if (page == null) {
|
if (page == null) {
|
||||||
page = "";
|
page = "";
|
||||||
- } else if (page.length() > MAX_PAGE_LENGTH) {
|
- } else if (page.length() > CraftMetaBook.MAX_PAGE_LENGTH) {
|
||||||
+ } else if (page.length() > MAX_PAGE_LENGTH && !OVERRIDE_CHECKS) { // Paper - Add override
|
+ } else if (page.length() > CraftMetaBook.MAX_PAGE_LENGTH && !CraftMetaBook.OVERRIDE_CHECKS) { // Paper - Add override
|
||||||
page = page.substring(0, MAX_PAGE_LENGTH);
|
page = page.substring(0, MAX_PAGE_LENGTH);
|
||||||
}
|
}
|
||||||
return page;
|
return page;
|
||||||
@ -44,8 +44,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
// asserted: page != null
|
// asserted: page != null
|
||||||
if (this.pages == null) {
|
if (this.pages == null) {
|
||||||
this.pages = new ArrayList<String>();
|
this.pages = new ArrayList<String>();
|
||||||
- } else if (this.pages.size() >= MAX_PAGES) {
|
- } else if (this.pages.size() >= CraftMetaBook.MAX_PAGES) {
|
||||||
+ } else if (this.pages.size() >= MAX_PAGES && !OVERRIDE_CHECKS) {// Paper - Add override
|
+ } else if (this.pages.size() >= CraftMetaBook.MAX_PAGES && !CraftMetaBook.OVERRIDE_CHECKS) { // Paper - Add override
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.pages.add(page);
|
this.pages.add(page);
|
Loading…
Reference in New Issue
Block a user