PaperSpigot 1.7.10

This commit is contained in:
Zach Brown
2014-07-08 22:05:35 -05:00
parent 99855abe10
commit fedd4511f5
9 changed files with 60 additions and 41 deletions

2
Bukkit

Submodule Bukkit updated: c18106bafa...677e082bc1

View File

@@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <artifactId>spigot</artifactId> - <artifactId>spigot</artifactId>
+ <artifactId>paperspigot</artifactId> + <artifactId>paperspigot</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.7.9-R0.3-SNAPSHOT</version> <version>1.7.10-R0.1-SNAPSHOT</version>
<name>Spigot</name> <name>Spigot</name>
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
<artifactId>gitdescribe-maven-plugin</artifactId> <artifactId>gitdescribe-maven-plugin</artifactId>

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Wed, 2 Jul 2014 22:26:16 -0500 Date: Tue, 8 Jul 2014 21:08:51 -0500
Subject: [PATCH] PaperSpigot config files Subject: [PATCH] PaperSpigot config files
@@ -9,16 +9,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init(); org.spigotmc.SpigotConfig.init();
org.spigotmc.SpigotConfig.registerCommands(); org.spigotmc.SpigotConfig.registerCommands();
// Spigot end // Spigot end
+ // PaperSpigot start + // PaperSpigot start
+ org.github.paperspigot.PaperSpigotConfig.init(); + org.github.paperspigot.PaperSpigotConfig.init();
+ org.github.paperspigot.PaperSpigotConfig.registerCommands(); + org.github.paperspigot.PaperSpigotConfig.registerCommands();
+ // PaperSpigot end + // PaperSpigot stop
i.info("Generating keypair"); i.info("Generating keypair");
this.a(MinecraftEncryption.b()); this.a(MinecraftEncryption.b());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java

View File

@@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ f = (1.0F + f) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier + f = (1.0F + f) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier
} }
f = this.b(damagesource, f); f = this.applyArmorModifier(damagesource, f);
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com> From: gsand <gsandowns@gmail.com>
Date: Sun, 6 Jul 2014 06:42:49 -0400 Date: Tue, 8 Jul 2014 21:41:43 -0500
Subject: [PATCH] Player Exhaustion Multipliers Subject: [PATCH] Player Exhaustion Multipliers
@@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class Block { @@ -0,0 +0,0 @@ public class Block {
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
entityhuman.a(StatisticList.MINE_BLOCK_COUNT[b(this)], 1); entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1);
- entityhuman.a(0.025F); - entityhuman.applyExhaustion(0.025F);
+ entityhuman.a( PaperSpigotWorldConfig.playerExhaustionBlockBreak ); // PaperSpigot - Configurable block breaking exhaustion + entityhuman.a( PaperSpigotWorldConfig.playerExhaustionBlockBreak ); // PaperSpigot - Configurable block breaking exhaustion
if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) { if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
ItemStack itemstack = this.j(l); ItemStack itemstack = this.j(l);
@@ -34,19 +34,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
} }
- this.a(0.3F); - this.applyExhaustion(0.3F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionAttack ); // PaperSpigot - Configurable attack exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionAttack ); // PaperSpigot - Configurable attack exhaustion
} else if (flag1) { } else if (flag1) {
entity.extinguish(); entity.extinguish();
} }
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
super.bi(); super.bj();
this.a(StatisticList.r, 1); this.a(StatisticList.r, 1);
if (this.isSprinting()) { if (this.isSprinting()) {
- this.a(0.8F); - this.applyExhaustion(0.8F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionSprintJumping ); // PaperSpigot - Configurable sprint jumping exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionSprintJumping ); // PaperSpigot - Configurable sprint jumping exhaustion
} else { } else {
- this.a(0.2F); - this.applyExhaustion(0.2F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionJumping ); // PaperSpigot - Configurable jumping exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionJumping ); // PaperSpigot - Configurable jumping exhaustion
} }
} }
@@ -55,14 +55,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F); i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
if (i > 0) { if (i > 0) {
this.a(StatisticList.m, i); this.a(StatisticList.m, i);
- this.a(0.015F * (float) i * 0.01F); - this.applyExhaustion(0.015F * (float) i * 0.01F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion
} }
} else if (this.L()) { } else if (this.M()) {
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F); i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
if (i > 0) { if (i > 0) {
this.a(StatisticList.i, i); this.a(StatisticList.i, i);
- this.a(0.015F * (float) i * 0.01F); - this.applyExhaustion(0.015F * (float) i * 0.01F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion
} }
} else if (this.h_()) { } else if (this.h_()) {
@@ -71,10 +71,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (i > 0) { if (i > 0) {
this.a(StatisticList.h, i); this.a(StatisticList.h, i);
if (this.isSprinting()) { if (this.isSprinting()) {
- this.a(0.099999994F * (float) i * 0.01F); - this.applyExhaustion(0.099999994F * (float) i * 0.01F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionSprinting * (float) i * 0.01F); // PaperSpigot - Configurable sprinting exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionSprinting * (float) i * 0.01F); // PaperSpigot - Configurable sprinting exhaustion
} else { } else {
- this.a(0.01F * (float) i * 0.01F); - this.applyExhaustion(0.01F * (float) i * 0.01F);
+ this.a( PaperSpigotWorldConfig.playerExhaustionWalking * (float) i * 0.01F); // PaperSpigot - Configurable walking exhaustion + this.a( PaperSpigotWorldConfig.playerExhaustionWalking * (float) i * 0.01F); // PaperSpigot - Configurable walking exhaustion
} }
} }

View File

@@ -1,13 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Tue, 8 Jul 2014 19:21:28 -0400 Date: Tue, 8 Jul 2014 21:49:42 -0500
Subject: [PATCH] Revert Bukkit Damage API Behavior Subject: [PATCH] Revert Bukkit Damage API Behavior
This API is extremely broken and even updated plugins can not adequately restore their intended behavior with the existing API.
Until Bukkit comes up with an adequate solution, lets revert the change in behavior.
New plugins using the API will not error but will also not behave as intended, but there are likely no plugins using this new API.
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -17,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit start // CraftBukkit start
protected boolean d(DamageSource damagesource, float f) { // void -> boolean protected boolean d(DamageSource damagesource, float f) { // void -> boolean
if (!this.isInvulnerable()) { if (!this.isInvulnerable()) {
+ // PaperSpigot start - moved up from below to bring back old behavior. + // PaperSpigot start - moved up from below to bring back old behavior
+ EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, f, 0, 0, 0, 0, 0, 0); + EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, f, 0, 0, 0, 0, 0, 0);
+ +
+ if (event.isCancelled()) { + if (event.isCancelled()) {
@@ -31,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
float originalDamage = f; float originalDamage = f;
float preDamage = f; float preDamage = f;
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
f = Math.max(f - this.br(), 0.0F); f = Math.max(f - this.getAbsorptionHearts(), 0.0F);
float absorptionModifier = Math.max(f1 - f, 0.0F); float absorptionModifier = Math.max(f1 - f, 0.0F);
- EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, -hardHatModifier, -blockingModifier, -armorModifier, -resistanceModifier, -magicModifier, -absorptionModifier); - EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, -hardHatModifier, -blockingModifier, -armorModifier, -resistanceModifier, -magicModifier, -absorptionModifier);
@@ -39,17 +34,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- if (event.isCancelled()) { - if (event.isCancelled()) {
- return false; - return false;
+ // PaperSpigot start - Moved event call up + // PaperSpigot start - Moved event call up
+ event.setDamage(DamageModifier.ARMOR, -armorModifier); + event.setDamage(DamageModifier.ARMOR, -armorModifier);
+ if (damagesource == DamageSource.FALLING_BLOCK || damagesource == DamageSource.ANVIL) { + if (damagesource == DamageSource.FALLING_BLOCK || damagesource == DamageSource.ANVIL) {
+ event.setDamage(DamageModifier.HARD_HAT, -hardHatModifier); + event.setDamage(DamageModifier.HARD_HAT, -hardHatModifier);
} }
-
- f = (float) event.getFinalDamage(); - f = (float) event.getFinalDamage();
+ if (human) { + if (human) {
+ event.setDamage(DamageModifier.BLOCKING, -blockingModifier); + event.setDamage(DamageModifier.BLOCKING, -blockingModifier);
+ } + }
+ event.setDamage(DamageModifier.RESISTANCE, -resistanceModifier); + event.setDamage(DamageModifier.RESISTANCE, -resistanceModifier);
+ event.setDamage(DamageModifier.MAGIC, -magicModifier); + event.setDamage(DamageModifier.MAGIC, -magicModifier);
+ event.setDamage(DamageModifier.ABSORPTION, -absorptionModifier); + event.setDamage(DamageModifier.ABSORPTION, -absorptionModifier);
+ // PaperSpigot end + // PaperSpigot end

View File

@@ -11,7 +11,7 @@
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>minecraft-server-relocated</artifactId> <artifactId>minecraft-server-relocated</artifactId>
<version>1.7.9-SNAPSHOT</version> <version>1.7.10-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Minecraft Server Relocation</name> <name>Minecraft Server Relocation</name>

View File

@@ -11,7 +11,7 @@
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId> <artifactId>minecraft-server</artifactId>
<version>1.7.9-SNAPSHOT</version> <version>1.7.10-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>Minecraft Server</name> <name>Minecraft Server</name>
@@ -27,7 +27,13 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId> <artifactId>minecraft-server</artifactId>
<version>1.7.9</version> <version>1.7.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.0.21.Final</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@@ -46,6 +52,24 @@
</goals> </goals>
</execution> </execution>
</executions> </executions>
<configuration>
<filters>
<!-- Exclude old Netty version -->
<filter>
<artifact>org.bukkit:minecraft-server</artifact>
<excludes>
<exclude>net/minecraft/util/io/netty/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<!-- Relocate new version to the correct place -->
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>net.minecraft.util.io.netty</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>