mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Fix last commit :3
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 6ac97172d3fcd533dec614e4f4de61e4443d9cc0 Mon Sep 17 00:00:00 2001
|
||||
From c3c4a34f5faa408e46a5ace127d5574ade5aee80 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 9 May 2019 14:27:37 -0500
|
||||
Subject: [PATCH] Silk touch spawners
|
||||
@@ -8,8 +8,8 @@ Subject: [PATCH] Silk touch spawners
|
||||
.../net/minecraft/server/BlockMobSpawner.java | 35 +++++++++++++++++++
|
||||
.../net/minecraft/server/ItemSpawner.java | 23 ++++++++++++
|
||||
src/main/java/net/minecraft/server/Items.java | 2 +-
|
||||
.../net/pl3x/purpur/PurpurWorldConfig.java | 21 +++++++++++
|
||||
5 files changed, 81 insertions(+), 1 deletion(-)
|
||||
.../net/pl3x/purpur/PurpurWorldConfig.java | 23 ++++++++++++
|
||||
5 files changed, 83 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/main/java/net/minecraft/server/ItemSpawner.java
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -120,7 +120,7 @@ index 89a9eec99..619c40b27 100644
|
||||
public static final Item cy = a(Blocks.CHEST, CreativeModeTab.c);
|
||||
public static final Item cz = a(Blocks.DIAMOND_ORE, CreativeModeTab.b);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 644501d5e..6ddd3442f 100644
|
||||
index c7fb5a737..bb107a457 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1,6 +1,12 @@
|
||||
@@ -136,21 +136,23 @@ index 644501d5e..6ddd3442f 100644
|
||||
import java.util.List;
|
||||
import static net.pl3x.purpur.PurpurConfig.log;
|
||||
|
||||
@@ -75,6 +81,21 @@ public class PurpurWorldConfig {
|
||||
@@ -75,6 +81,23 @@ public class PurpurWorldConfig {
|
||||
playerInvulnerableWhileAcceptingResourcePack = getBoolean("gameplay-mechanics.player.invulnerable-while-accepting-resource-pack", playerInvulnerableWhileAcceptingResourcePack);
|
||||
}
|
||||
|
||||
+ public boolean silkTouchEnabled = false;
|
||||
+ public List<Item> silkTouchTools = new ArrayList<Item>(){{
|
||||
+ add(Items.IRON_PICKAXE);
|
||||
+ add(Items.GOLDEN_PICKAXE);
|
||||
+ add(Items.DIAMOND_PICKAXE);
|
||||
+ add(Items.NETHERITE_PICKAXE);
|
||||
+ }};
|
||||
+ public List<Item> silkTouchTools = new ArrayList<>();
|
||||
+ private void silkTouchSettings() {
|
||||
+ silkTouchEnabled = getBoolean("gameplay-mechanics.silk-touch.enabled", silkTouchEnabled);
|
||||
+ getList("gameplay-mechanics.silk-touch.tools", silkTouchTools).forEach(key -> {
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey((String) key));
|
||||
+ silkTouchTools.clear();
|
||||
+ getList("gameplay-mechanics.silk-touch.tools", new ArrayList<String>(){{
|
||||
+ add("minecraft:iron_pickaxe");
|
||||
+ add("minecraft:golden_pickaxe");
|
||||
+ add("minecraft:diamond_pickaxe");
|
||||
+ add("minecraft:netherite_pickaxe");
|
||||
+ }}).forEach(key -> {
|
||||
+ System.out.println(key);
|
||||
+ Item item = IRegistry.ITEM.get(new MinecraftKey(key.toString()));
|
||||
+ if (item != Items.AIR) silkTouchTools.add(item);
|
||||
+ });
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user