mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Silk touchable budding amethyst
This commit is contained in:
41
patches/server/0232-Silk-touchable-budding-amethyst.patch
Normal file
41
patches/server/0232-Silk-touchable-budding-amethyst.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 16 Jul 2021 22:00:17 -0500
|
||||
Subject: [PATCH] Silk touchable budding amethyst
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
index 02fc3ede12eadbf72e26e31b1c475c7f5b2ad73a..2288e727929ffb3a3bca138fb02894080d631594 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
@@ -53,4 +53,14 @@ public class BuddingAmethystBlock extends AmethystBlock {
|
||||
public static boolean canClusterGrowAtState(BlockState state) {
|
||||
return state.isAir() || state.is(Blocks.WATER) && state.getFluidState().getAmount() == 8;
|
||||
}
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public void playerDestroy(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, BlockPos pos, BlockState state, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.world.item.ItemStack stack) {
|
||||
+ if (level.purpurConfig.buddingAmethystSilkTouch && net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.SILK_TOUCH, stack) > 0) {
|
||||
+ popResource(level, pos, net.minecraft.world.item.Items.BUDDING_AMETHYST.getDefaultInstance());
|
||||
+ }
|
||||
+ super.playerDestroy(level, player, pos, state, blockEntity, stack);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 2c64ee0898414e3358bb105ca1c9f7e4fbe3deb3..303d23449cf7f47c7907cbabfaed8503ce98a324 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -706,6 +706,11 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean buddingAmethystSilkTouch = false;
|
||||
+ private void buddingAmethystSettings() {
|
||||
+ buddingAmethystSilkTouch = getBoolean("blocks.budding_amethyst.silk-touch", buddingAmethystSilkTouch);
|
||||
+ }
|
||||
+
|
||||
public double caveVinesGrowthModifier = 0.10D;
|
||||
public int caveVinesMaxGrowthAge = 25;
|
||||
private void caveVinesSettings() {
|
||||
Reference in New Issue
Block a user