Update to Minecraft 1.16.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-01-16 12:00:00 +11:00
parent 789c080552
commit 78ff16111e
27 changed files with 76 additions and 114 deletions

View File

@@ -14,7 +14,7 @@
@@ -25,6 +30,12 @@
private final int an;
private final int ao;
private final int lureLevel;
+ // CraftBukkit start - Extra variables to enable modification of fishing wait time, values are minecraft defaults
+ public int minWaitTime = 100;
@@ -26,7 +26,7 @@
super(EntityTypes.FISHING_BOBBER, world);
this.b = new Random();
@@ -253,6 +264,10 @@
this.ah = 0;
this.waitTime = 0;
this.ai = 0;
this.getDataWatcher().set(EntityFishingHook.f, false);
+ // CraftBukkit start
@@ -54,11 +54,11 @@
this.ai = MathHelper.nextInt(this.random, 20, 80);
}
} else {
- this.ah = MathHelper.nextInt(this.random, 100, 600);
- this.ah -= this.ao * 20 * 5;
- this.waitTime = MathHelper.nextInt(this.random, 100, 600);
- this.waitTime -= this.lureLevel * 20 * 5;
+ // CraftBukkit start - logic to modify fishing wait time
+ this.ah = MathHelper.nextInt(this.random, this.minWaitTime, this.maxWaitTime); // PAIL rename waitTime
+ this.ah -= (this.applyLure) ? this.ao * 20 * 5 : 0; // PAIL rename waitTime, lureLevel
+ this.waitTime = MathHelper.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
+ this.waitTime -= (this.applyLure) ? this.lureLevel * 20 * 5 : 0;
+ // CraftBukkit end
}
}