mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@2040c1e Player Flying Fall Damage API (#5357) PaperMC/Paper@fa42c68 Expose pre-collision moving velocity to VehicleBlockCollisionEvent (#8457) PaperMC/Paper@90750a6 Rework filtering spawn egg and tile entity nbt config (#6613)
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 31 Dec 2021 06:18:54 -0600
|
||||
Subject: [PATCH] Turtle eggs random tick crack chance
|
||||
|
||||
|
||||
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 87bae3047c16428194eae82d52e2e0c2f293c4d2..a1c6d0bfc38f57737dcf885488c8bd7ffcab393a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
|
||||
@@ -11,13 +11,11 @@ import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.ExperienceOrb;
|
||||
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.item.ItemEntity;
|
||||
import net.minecraft.world.entity.monster.Zombie;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
-import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
@@ -164,7 +162,7 @@ public class TurtleEggBlock extends Block {
|
||||
private boolean shouldUpdateHatchLevel(Level world) {
|
||||
float f = world.getTimeOfDay(1.0F);
|
||||
|
||||
- return (double) f < 0.69D && (double) f > 0.65D ? true : world.random.nextInt(500) == 0;
|
||||
+ return (double) f < 0.69D && (double) f > 0.65D ? true : world.random.nextInt(world.purpurConfig.turtleEggsRandomTickCrackChance) == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 3c97e3df12897a8aee762314e91ebcd45ef6ce4c..847964d820f86867a4a6e7f5f37dbd3b852a6d4c 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -989,11 +989,13 @@ public class PurpurWorldConfig {
|
||||
public boolean turtleEggsBreakFromItems = true;
|
||||
public boolean turtleEggsBreakFromMinecarts = true;
|
||||
public boolean turtleEggsBypassMobGriefing = false;
|
||||
+ public int turtleEggsRandomTickCrackChance = 500;
|
||||
private void turtleEggSettings() {
|
||||
turtleEggsBreakFromExpOrbs = getBoolean("blocks.turtle_egg.break-from-exp-orbs", turtleEggsBreakFromExpOrbs);
|
||||
turtleEggsBreakFromItems = getBoolean("blocks.turtle_egg.break-from-items", turtleEggsBreakFromItems);
|
||||
turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
|
||||
turtleEggsBypassMobGriefing = getBoolean("blocks.turtle_egg.bypass-mob-griefing", turtleEggsBypassMobGriefing);
|
||||
+ turtleEggsRandomTickCrackChance = getInt("blocks.turtle_egg.random-tick-crack-chance", turtleEggsRandomTickCrackChance);
|
||||
}
|
||||
|
||||
public boolean waterInfinite = true;
|
||||
Reference in New Issue
Block a user