mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 22:52:13 -07:00
@@ -49,7 +49,7 @@
|
|||||||
+ // CraftBukkit start - handle the owner before the rest of things
|
+ // CraftBukkit start - handle the owner before the rest of things
|
||||||
+ this(type, x, y, z, world, stack, weapon, null);
|
+ this(type, x, y, z, world, stack, weapon, null);
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
+ protected AbstractArrow(EntityType<? extends AbstractArrow> entitytypes, double d0, double d1, double d2, Level world, ItemStack itemstack, @Nullable ItemStack itemstack1, @Nullable LivingEntity ownerEntity) {
|
+ protected AbstractArrow(EntityType<? extends AbstractArrow> entitytypes, double d0, double d1, double d2, Level world, ItemStack itemstack, @Nullable ItemStack itemstack1, @Nullable LivingEntity ownerEntity) {
|
||||||
+ this(entitytypes, world);
|
+ this(entitytypes, world);
|
||||||
+ this.setOwner(ownerEntity);
|
+ this.setOwner(ownerEntity);
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
+ this.pickupItemStack = itemstack.copy();
|
+ this.pickupItemStack = itemstack.copy();
|
||||||
+ this.setCustomName((Component) itemstack.get(DataComponents.CUSTOM_NAME));
|
+ this.setCustomName((Component) itemstack.get(DataComponents.CUSTOM_NAME));
|
||||||
+ Unit unit = (Unit) itemstack.remove(DataComponents.INTANGIBLE_PROJECTILE);
|
+ Unit unit = (Unit) itemstack.remove(DataComponents.INTANGIBLE_PROJECTILE);
|
||||||
|
+
|
||||||
if (unit != null) {
|
if (unit != null) {
|
||||||
this.pickup = AbstractArrow.Pickup.CREATIVE_ONLY;
|
this.pickup = AbstractArrow.Pickup.CREATIVE_ONLY;
|
||||||
}
|
}
|
||||||
@@ -107,11 +107,13 @@
|
|||||||
|
|
||||||
this.hasImpulse = true;
|
this.hasImpulse = true;
|
||||||
if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {
|
if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {
|
||||||
@@ -357,7 +381,7 @@
|
@@ -356,8 +380,8 @@
|
||||||
|
|
||||||
protected void tickDespawn() {
|
protected void tickDespawn() {
|
||||||
++this.life;
|
++this.life;
|
||||||
if (this.life >= 1200) {
|
- if (this.life >= 1200) {
|
||||||
- this.discard();
|
- this.discard();
|
||||||
|
+ if (this.life >= ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot
|
||||||
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -246,4 +246,13 @@ public class SpigotWorldConfig
|
|||||||
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
|
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
|
||||||
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
|
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int arrowDespawnRate;
|
||||||
|
public int tridentDespawnRate;
|
||||||
|
private void arrowDespawnRate()
|
||||||
|
{
|
||||||
|
this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 1200 );
|
||||||
|
this.tridentDespawnRate = this.getInt( "trident-despawn-rate", this.arrowDespawnRate );
|
||||||
|
this.log( "Arrow Despawn Rate: " + this.arrowDespawnRate + " Trident Respawn Rate:" + this.tridentDespawnRate );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user