mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
fix some compile errors
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Ridables
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index b37e0ff164a894d2033fb94bbbc2f630a0e66bcd..963031881bad29681d619d953ddac86aef07b98e 100644
|
||||
index b37e0ff164a894d2033fb94bbbc2f630a0e66bcd..ac335ec4f70830c7687ac4e0aa2a6cba9cb04ae1 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -41,6 +41,12 @@ public class BlockPos extends Vec3i {
|
||||
@@ -14,7 +14,7 @@ index b37e0ff164a894d2033fb94bbbc2f630a0e66bcd..963031881bad29681d619d953ddac86a
|
||||
|
||||
+ // Purpur start
|
||||
+ public BlockPos(net.minecraft.world.entity.Entity entity) {
|
||||
+ super(entity.getX(), entity.getY(), entity.getZ());
|
||||
+ super(entity.getBlockX(), entity.getBlockY(), entity.getBlockZ());
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Disable loot drops on death by cramming
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index d0437c2d10c44883c90861666dc2cd8805c4d5ab..6a2d0eb29c6d2785512302fccf61e675e5cf1926 100644
|
||||
index d0437c2d10c44883c90861666dc2cd8805c4d5ab..bf4d6413f90e7b6941acdfd78e52b7f97232a670 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1748,6 +1748,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
this.dropEquipment(); // CraftBukkit - from below
|
||||
if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
+ if (!(source == DamageSource.CRAMMING && level.purpurConfig.disableDropsOnCrammingDeath)) { // Purpur
|
||||
+ if (!(source.is(net.minecraft.world.damagesource.DamageTypes.CRAMMING) && level.purpurConfig.disableDropsOnCrammingDeath)) { // Purpur
|
||||
this.dropFromLootTable(source, flag);
|
||||
// Paper start
|
||||
final boolean prev = this.clearEquipmentSlots;
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Totems work in inventory
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f069cf9a4fe6a554291de2de41880ba569d0c86d..723dc56e14ea4b6192d576bab5ff2978ca45ad78 100644
|
||||
index d2d7511ababe945edc2f22038c2c5531ed1b8b7e..56781b5cf331400703bdda49508390651b506208 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1543,6 +1543,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -17,7 +17,7 @@ index f069cf9a4fe6a554291de2de41880ba569d0c86d..723dc56e14ea4b6192d576bab5ff2978
|
||||
+ for (ItemStack item : player.getInventory().items) {
|
||||
+ if (item.getItem() == Items.TOTEM_OF_UNDYING) {
|
||||
+ itemstack1 = item;
|
||||
+ itemstack = item.cloneItemStack(false);
|
||||
+ itemstack = item.copy();
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
@@ -87,20 +87,20 @@ index 0b80bf3e30a83c8c284d196980340542bfca3ded..7bbfa2f8ac29dd32b100d356b285b5e5
|
||||
damageTypeRegisterable.register(FALLING_ANVIL, new DamageType("anvil", 0.1F));
|
||||
damageTypeRegisterable.register(FALLING_STALACTITE, new DamageType("fallingStalactite", 0.1F));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index fb1555641047175060f381bf797c4a6fce75837a..15dabf8da91c003ee69934b7c59ef123a9ebc535 100644
|
||||
index fb1555641047175060f381bf797c4a6fce75837a..debba52be7ba896f5a96a2ffa4e502101627a576 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1133,6 +1133,10 @@ public class CraftEventFactory {
|
||||
@@ -1131,6 +1131,10 @@ public class CraftEventFactory {
|
||||
cause = DamageCause.DRYOUT;
|
||||
} else if (sourceType == DamageTypes.FREEZE) {
|
||||
cause = DamageCause.FREEZE;
|
||||
} else {
|
||||
cause = DamageCause.CUSTOM;
|
||||
+ // Purpur start
|
||||
+ } else if (source == DamageSource.SCISSORS) {
|
||||
+ } else if (sourceType == DamageTypes.SCISSORS) {
|
||||
+ cause = DamageCause.SUICIDE;
|
||||
+ // Purpur end
|
||||
} else {
|
||||
cause = DamageCause.CUSTOM;
|
||||
}
|
||||
|
||||
if (cause != null) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 5b0625955e2a65f689c8a128d73170bc1f0c8025..c8097ec7887ac8e689b6843d9ff7744d6a453478 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Player ridable in water option
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 456460e867626ffe4a895d4d78a6afd6526ef695..bc6aef5141ce87e96d2c267ad10a12fc2858a186 100644
|
||||
index 456460e867626ffe4a895d4d78a6afd6526ef695..b2b51b91459786b2004fdf5bf4ed6b24cabc384e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2071,6 +2071,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -13,8 +13,8 @@ index 456460e867626ffe4a895d4d78a6afd6526ef695..bc6aef5141ce87e96d2c267ad10a12fc
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean rideableUnderWater() {
|
||||
+ return this.level.purpurConfig.playerRidableInWater;
|
||||
+ public boolean dismountsUnderwater() {
|
||||
+ return !this.level.purpurConfig.playerRidableInWater || super.dismountsUnderwater();
|
||||
+ }
|
||||
+
|
||||
public boolean setEntityOnShoulder(CompoundTag entityNbt) {
|
||||
|
||||
Reference in New Issue
Block a user