fix turtle egg break options

This commit is contained in:
granny
2023-01-22 23:56:01 -08:00
parent 5fd16185b5
commit 1dcc7bf149

View File

@@ -5,7 +5,7 @@ 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..9925cfc1445d24bf673e273f81391a1dadfb677d 100644
index 70d46aafa9c16921e5c5bed3d97b8f402e25038a..58fc57998f4715c42a842c4d91beb8f3b644f7f8 100644
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
@@ -193,6 +193,25 @@ public class TurtleEggBlock extends Block {
@@ -17,14 +17,14 @@ index 70d46aafa9c16921e5c5bed3d97b8f402e25038a..9925cfc1445d24bf673e273f81391a1d
+ if (entity instanceof Turtle || entity instanceof Bat) {
+ return false;
+ }
+ if (!world.purpurConfig.turtleEggsBreakFromExpOrbs && entity instanceof net.minecraft.world.entity.ExperienceOrb) {
+ return false;
+ if (world.purpurConfig.turtleEggsBreakFromExpOrbs && entity instanceof net.minecraft.world.entity.ExperienceOrb) {
+ return true;
+ }
+ if (!world.purpurConfig.turtleEggsBreakFromItems && entity instanceof net.minecraft.world.entity.item.ItemEntity) {
+ return false;
+ if (world.purpurConfig.turtleEggsBreakFromItems && entity instanceof net.minecraft.world.entity.item.ItemEntity) {
+ return true;
+ }
+ if (!world.purpurConfig.turtleEggsBreakFromMinecarts && entity instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) {
+ return false;
+ if (world.purpurConfig.turtleEggsBreakFromMinecarts && entity instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) {
+ return true;
+ }
+ if (!(entity instanceof LivingEntity)) {
+ return false;