[ci-skip] there's some import tomfoolery happening in these patches...

This commit is contained in:
granny
2023-01-22 12:09:40 -08:00
parent d1bffa3efb
commit 5fd16185b5
4 changed files with 9 additions and 17 deletions

View File

@@ -5,24 +5,16 @@ Subject: [PATCH] Add turtle egg block options
diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
index 70d46aafa9c16921e5c5bed3d97b8f402e25038a..1cc3e156eb612a7dc0a771d38252525c1884eaea 100644
index 70d46aafa9c16921e5c5bed3d97b8f402e25038a..9925cfc1445d24bf673e273f81391a1dadfb677d 100644
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
@@ -10,7 +10,6 @@ import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
-import net.minecraft.world.entity.ambient.Bat;
import net.minecraft.world.entity.animal.Turtle;
import net.minecraft.world.entity.monster.Zombie;
import net.minecraft.world.entity.player.Player;
@@ -193,6 +192,25 @@ public class TurtleEggBlock extends Block {
@@ -193,6 +193,25 @@ public class TurtleEggBlock extends Block {
}
private boolean canDestroyEgg(Level world, Entity entity) {
- return !(entity instanceof Turtle) && !(entity instanceof Bat) ? (!(entity instanceof LivingEntity) ? false : entity instanceof Player || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) : false;
+ // Purpur start
+ if (entity instanceof Turtle || entity instanceof net.minecraft.world.entity.ambient.Bat) {
+ if (entity instanceof Turtle || entity instanceof Bat) {
+ return false;
+ }
+ if (!world.purpurConfig.turtleEggsBreakFromExpOrbs && entity instanceof net.minecraft.world.entity.ExperienceOrb) {