mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
add back removed options
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/IceBlock.java
|
||||
+++ b/net/minecraft/world/level/block/IceBlock.java
|
||||
@@ -41,7 +_,7 @@
|
||||
public void afterDestroy(Level level, BlockPos pos, ItemStack stack) {
|
||||
// Paper end - Improve Block#breakNaturally API
|
||||
if (!EnchantmentHelper.hasTag(stack, EnchantmentTags.PREVENTS_ICE_MELTING)) {
|
||||
- if (level.environmentAttributes().getValue(EnvironmentAttributes.WATER_EVAPORATES, pos)) {
|
||||
+ if ((level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd) || level.environmentAttributes().getValue(EnvironmentAttributes.WATER_EVAPORATES, pos)) { // Purpur - Add allow water in end world option
|
||||
level.removeBlock(pos, false);
|
||||
return;
|
||||
}
|
||||
@@ -62,7 +_,7 @@
|
||||
|
||||
protected void melt(BlockState state, Level level, BlockPos pos) {
|
||||
// Paper start - call BlockFadeEvent
|
||||
- final boolean waterEvaporates = level.environmentAttributes().getValue(EnvironmentAttributes.WATER_EVAPORATES, pos);
|
||||
+ final boolean waterEvaporates = (level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd) || level.environmentAttributes().getValue(EnvironmentAttributes.WATER_EVAPORATES, pos); // Purpur - Add allow water in end
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(level, pos, waterEvaporates ? Blocks.AIR.defaultBlockState() : Blocks.WATER.defaultBlockState()).isCancelled()) {
|
||||
return;
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
--- a/net/minecraft/world/level/block/TurtleEggBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TurtleEggBlock.java
|
||||
@@ -156,7 +_,7 @@
|
||||
}
|
||||
|
||||
private boolean shouldUpdateHatchLevel(Level level, BlockPos pos) {
|
||||
- float value = level.environmentAttributes().getValue(EnvironmentAttributes.TURTLE_EGG_HATCH_CHANCE, pos);
|
||||
+ float value = level.purpurConfig.turtleEggsRandomTickCrackChance == 500 ? level.environmentAttributes().getValue(EnvironmentAttributes.TURTLE_EGG_HATCH_CHANCE, pos) : level.purpurConfig.turtleEggsRandomTickCrackChance; // Purpur - Turtle eggs random tick crack chance
|
||||
return value > 0.0F && level.random.nextFloat() < value;
|
||||
}
|
||||
|
||||
@@ -189,9 +_,32 @@
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user