mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 20:16:19 +01:00
Updated Upstream (Bukkit/CraftBukkit) (#8832)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 37262de8 PR-812: Add Registry#match(String) d6b40162 SPIGOT-4569: Add more BlockData API f9691891 PR-809: Throw a more clear error for BlockIterators with zero direction, add Vector#isZero() 91e79e19 PR-804: Added methods to get translation keys for materials, itemstacks and more 426b00d3 PR-795: Add new BiomeParameterPoint passed to BiomeProvider#getBiome 0e91ea52 SPIGOT-7224: Add events for brewing stands and campfires starting their actions CraftBukkit Changes: a50301aa5 Fix issues with fluid tag conversion and fluid #isTagged 6aeb5e4c3 SPIGOT-4569: Implement more BlockData API 7dbf862c2 PR-1131: Added methods to get translation keys for materials, itemstacks and more 7167588b1 PR-1117: Add new BiomeParameterPoint passed to BiomeProvider#getBiome 7c44152eb SPIGOT-7224: Add events for brewing stands and campfires starting their actions
This commit is contained in:
parent
afe633df08
commit
03a4e7ac75
@ -1384,10 +1384,10 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 01e11f882abb6c631f810584aa23646042688435..4f339debf113d103ffe0b5fdb03dfc82eafd1bd5 100644
|
index ba69db36a2a7640fc2a63a1d9fd1b204e00d7ce7..876072a6c91bd02c9c7de53556419b8e1ac48f27 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -22,6 +22,15 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
@@ -23,6 +23,15 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface UnsafeValues {
|
public interface UnsafeValues {
|
||||||
@ -3705,21 +3705,21 @@ index f89d71b77d1200314df6ca23614d5ca6fb15ceb3..af4a7ce37eb10bab06eadb6583c7894b
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 7b904dd2c0a660df8874d4800919e16981877163..d168a836d655b369f67200d7afe101b56ff815b1 100644
|
index d80b0a52968920b990a75cff85e436a16d782500..9da047582e9648d84875b6d3c136960bbb97b70e 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -22,7 +22,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* use this class to encapsulate Materials for which {@link Material#isItem()}
|
* use this class to encapsulate Materials for which {@link Material#isItem()}
|
||||||
* returns false.</b>
|
* returns false.</b>
|
||||||
*/
|
*/
|
||||||
-public class ItemStack implements Cloneable, ConfigurationSerializable {
|
-public class ItemStack implements Cloneable, ConfigurationSerializable, Translatable {
|
||||||
+public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowItem> { // Paper
|
+public class ItemStack implements Cloneable, ConfigurationSerializable, Translatable, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowItem> { // Paper
|
||||||
private Material type = Material.AIR;
|
private Material type = Material.AIR;
|
||||||
private int amount = 0;
|
private int amount = 0;
|
||||||
private MaterialData data = null;
|
private MaterialData data = null;
|
||||||
@@ -595,4 +595,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
@@ -602,4 +602,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
|
public String getTranslationKey() {
|
||||||
return true;
|
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -2834,10 +2834,10 @@ index 892e03189957b0072827be4fd485dd98352334e8..ac087402c90dad4b3c499fcf8507e50e
|
|||||||
* Sends the component to the player
|
* Sends the component to the player
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 4f339debf113d103ffe0b5fdb03dfc82eafd1bd5..d45cc92ca30e79173f30aae10724beeec6d22398 100644
|
index 876072a6c91bd02c9c7de53556419b8e1ac48f27..33c005a11e1ee241c1146e2cc291d523b1dd744e 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -32,6 +32,7 @@ public interface UnsafeValues {
|
@@ -33,6 +33,7 @@ public interface UnsafeValues {
|
||||||
net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
|
net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@ -2845,10 +2845,10 @@ index 4f339debf113d103ffe0b5fdb03dfc82eafd1bd5..d45cc92ca30e79173f30aae10724beee
|
|||||||
Material toLegacy(Material material);
|
Material toLegacy(Material material);
|
||||||
|
|
||||||
Material fromLegacy(Material material);
|
Material fromLegacy(Material material);
|
||||||
@@ -87,4 +88,12 @@ public interface UnsafeValues {
|
@@ -96,4 +97,12 @@ public interface UnsafeValues {
|
||||||
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot);
|
String getTranslationKey(EntityType entityType);
|
||||||
|
|
||||||
CreativeCategory getCreativeCategory(Material material);
|
String getTranslationKey(ItemStack itemStack);
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index d45cc92ca30e79173f30aae10724beeec6d22398..c67d2e96e30261e480f1df96464befac03d78a69 100644
|
index 33c005a11e1ee241c1146e2cc291d523b1dd744e..5183d3b1893fdcad9a475b747cb34df5653774fd 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -95,5 +95,12 @@ public interface UnsafeValues {
|
@@ -104,5 +104,12 @@ public interface UnsafeValues {
|
||||||
* @return name
|
* @return name
|
||||||
*/
|
*/
|
||||||
String getTimingsServerName();
|
String getTimingsServerName();
|
||||||
|
@ -32,10 +32,10 @@ index af4a7ce37eb10bab06eadb6583c7894b3ec55ae6..159e5a908b35b84b7fabc36581e093d9
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index d168a836d655b369f67200d7afe101b56ff815b1..edf5cd3734011de9130139e542ebc44bcc67f396 100644
|
index 9da047582e9648d84875b6d3c136960bbb97b70e..87f7942082ad943a97058f58c09ea2fe9caf5bfe 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -611,5 +611,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -618,5 +618,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
public @NotNull net.kyori.adventure.text.Component displayName() {
|
public @NotNull net.kyori.adventure.text.Component displayName() {
|
||||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,10 @@ index 159e5a908b35b84b7fabc36581e093d9aa4c4b67..66ffc658dba85942f179760dc6c50258
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index edf5cd3734011de9130139e542ebc44bcc67f396..8b76d7ca596ea261c0ca3b9fe2fbf5507c3883e3 100644
|
index 87f7942082ad943a97058f58c09ea2fe9caf5bfe..9d32283ee612a50b8a2bfe5151f42c9f181ede4c 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -537,7 +537,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ index edf5cd3734011de9130139e542ebc44bcc67f396..8b76d7ca596ea261c0ca3b9fe2fbf550
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -612,6 +612,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -619,6 +619,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ on the real tile entity.
|
|||||||
This is useful for where performance is needed
|
This is useful for where performance is needed
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index b4094e042c1619cfcdd68c27f82979a7562ddf55..d29bdc125dba0128d93d57e8d9393b970e6c00a9 100644
|
index f8e12868f2e629cdf4784f0157fdb2f8e7b01f99..61ce341daec63392f040b70cd12662379b2f1ebd 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -271,6 +271,16 @@ public interface Block extends Metadatable {
|
@@ -272,6 +272,16 @@ public interface Block extends Metadatable, Translatable {
|
||||||
@NotNull
|
@NotNull
|
||||||
BlockState getState();
|
BlockState getState();
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
|||||||
Allows you to determine how long it takes to use a usable/consumable item
|
Allows you to determine how long it takes to use a usable/consumable item
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 8b76d7ca596ea261c0ca3b9fe2fbf5507c3883e3..54d7c4b78f7fb01d8c11c19f038642b155334770 100644
|
index 9d32283ee612a50b8a2bfe5151f42c9f181ede4c..53d99d214652ae1636f28a179a5b66edc0f8f229 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -639,5 +639,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -646,5 +646,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
public String getI18NDisplayName() {
|
public String getI18NDisplayName() {
|
||||||
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 54d7c4b78f7fb01d8c11c19f038642b155334770..7559f75dcc6665fa3d19d6e53a141a214407d1c5 100644
|
index 53d99d214652ae1636f28a179a5b66edc0f8f229..a70de962712c14cb895708e89ad3811041728935 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||||
@ -16,7 +16,7 @@ index 54d7c4b78f7fb01d8c11c19f038642b155334770..7559f75dcc6665fa3d19d6e53a141a21
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@@ -647,5 +648,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -654,5 +655,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
// Requires access to NMS
|
// Requires access to NMS
|
||||||
return ensureServerConversions().getMaxItemUseDuration();
|
return ensureServerConversions().getMaxItemUseDuration();
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,10 @@ Not here to name and shame, only so server admins can be aware of which
|
|||||||
plugins have and haven't been updated.
|
plugins have and haven't been updated.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index c67d2e96e30261e480f1df96464befac03d78a69..81da1def96d18704303cadd72261a1b2fcbb9fc5 100644
|
index 5183d3b1893fdcad9a475b747cb34df5653774fd..4af059f9b32d2a0913e6d88c6a93e101018e88a2 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -102,5 +102,11 @@ public interface UnsafeValues {
|
@@ -111,5 +111,11 @@ public interface UnsafeValues {
|
||||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ index 943c3364f6b931fe11f9a6099504590b2da34657..16a604b6315daff228c827fe02b1234c
|
|||||||
* @return A new location where X/Y/Z are the center of the block
|
* @return A new location where X/Y/Z are the center of the block
|
||||||
*/
|
*/
|
||||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||||
index 8c71be9c39ec6aae07b088a63e71cc2ae44b0412..25e38f0f4fe36193dcc968ef7619bc8c0e705fb2 100644
|
index 7d6c923ea603a3193865e6a34b41617ac7016d19..00651d5486f1de886df7a4a01aaf272ceb0fa82a 100644
|
||||||
--- a/src/main/java/org/bukkit/World.java
|
--- a/src/main/java/org/bukkit/World.java
|
||||||
+++ b/src/main/java/org/bukkit/World.java
|
+++ b/src/main/java/org/bukkit/World.java
|
||||||
@@ -95,6 +95,40 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
@@ -95,6 +95,40 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||||
@ -95,10 +95,10 @@ index 8c71be9c39ec6aae07b088a63e71cc2ae44b0412..25e38f0f4fe36193dcc968ef7619bc8c
|
|||||||
* Gets the highest non-empty (impassable) coordinate at the given
|
* Gets the highest non-empty (impassable) coordinate at the given
|
||||||
* coordinates.
|
* coordinates.
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index d29bdc125dba0128d93d57e8d9393b970e6c00a9..b101f5264bdde8bd14913d5161c1047020830f8d 100644
|
index 61ce341daec63392f040b70cd12662379b2f1ebd..0be73b2f45c9aab6e73bcb7a76136ec6e2428163 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -155,6 +155,82 @@ public interface Block extends Metadatable {
|
@@ -156,6 +156,82 @@ public interface Block extends Metadatable, Translatable {
|
||||||
*/
|
*/
|
||||||
int getZ();
|
int getZ();
|
||||||
|
|
||||||
|
@ -37,23 +37,22 @@ index ac3b24c5c99eeb1435d785efade728dd40947da5..dbdf3dbe9517b09a7965cf9d65cae1ed
|
|||||||
@Override
|
@Override
|
||||||
public FurnaceInventory getInventory();
|
public FurnaceInventory getInventory();
|
||||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||||
index 533a33dbd4c4c3c07fe759206dc288efec5cd531..f13f1b4daa99fb86b60acc94d0406dcd8cb4d98b 100644
|
index 1440c6115520d692faf75455df35b92aa8734491..1e55f50f04de78ae0b8832a8021ffc7327676e8e 100644
|
||||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
--- a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||||
@@ -13,11 +13,18 @@ public class FurnaceStartSmeltEvent extends BlockEvent {
|
@@ -15,10 +15,17 @@ public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||||
private final CookingRecipe<?> recipe;
|
private final CookingRecipe<?> recipe;
|
||||||
private int totalCookTime;
|
private int totalCookTime;
|
||||||
|
|
||||||
+ @Deprecated // Paper - furnace cook speed multiplier
|
+ @Deprecated // Paper - furnace cook speed multiplier
|
||||||
public FurnaceStartSmeltEvent(@NotNull final Block furnace, @NotNull ItemStack source, @NotNull final CookingRecipe<?> recipe) {
|
public FurnaceStartSmeltEvent(@NotNull final Block furnace, @NotNull ItemStack source, @NotNull final CookingRecipe<?> recipe) {
|
||||||
+ // Paper start - furnace cook speed multiplier
|
+ // Paper start
|
||||||
+ this(furnace, source, recipe, recipe.getCookingTime());
|
+ this(furnace, source, recipe, recipe.getCookingTime());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public FurnaceStartSmeltEvent(@NotNull final Block furnace, @NotNull ItemStack source, @NotNull CookingRecipe<?> recipe, int cookingTime) {
|
+ public FurnaceStartSmeltEvent(final @NotNull Block furnace, final @NotNull ItemStack source, final @NotNull CookingRecipe<?> recipe, final int cookingTime) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
super(furnace);
|
super(furnace, source);
|
||||||
this.source = source;
|
|
||||||
this.recipe = recipe;
|
this.recipe = recipe;
|
||||||
- this.totalCookTime = recipe.getCookingTime();
|
- this.totalCookTime = recipe.getCookingTime();
|
||||||
+ this.totalCookTime = cookingTime; // Paper - furnace cook speed multiplier
|
+ this.totalCookTime = cookingTime; // Paper - furnace cook speed multiplier
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Material API additions
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index bcf746a611fbfa66b12b31a12710c423ba39d42c..cd09fa22e6322770bcb582ba00a384c5ca0fd8d8 100644
|
index d1cb98a43e1135c53fd4ae544272ff6225f387f6..a4a85c62e87c18e38ba16e3966a41e6631ec8add 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -112,6 +112,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -112,6 +112,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
@ -13,10 +13,10 @@ index bcf746a611fbfa66b12b31a12710c423ba39d42c..cd09fa22e6322770bcb582ba00a384c5
|
|||||||
* An enum of all material IDs accepted by the official server and client
|
* An enum of all material IDs accepted by the official server and client
|
||||||
*/
|
*/
|
||||||
+@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
+@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
||||||
public enum Material implements Keyed {
|
public enum Material implements Keyed, Translatable {
|
||||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||||
AIR(9648, 0),
|
AIR(9648, 0),
|
||||||
@@ -4273,6 +4274,22 @@ public enum Material implements Keyed {
|
@@ -4273,6 +4274,22 @@ public enum Material implements Keyed, Translatable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,10 +79,10 @@ index 20978b269a7757a561d6b872cc77898b44bbd272..2b9a117804a8ca54b47e51e23359bd6e
|
|||||||
if (this.world == null) {
|
if (this.world == null) {
|
||||||
return null;
|
return null;
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index cd09fa22e6322770bcb582ba00a384c5ca0fd8d8..a7d36ef22724f0ce3add61ab314e09e6465077d4 100644
|
index a4a85c62e87c18e38ba16e3966a41e6631ec8add..e883bb46461eb40b018ebe8c07caff96046fd11d 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4303,11 +4303,11 @@ public enum Material implements Keyed {
|
@@ -4303,11 +4303,11 @@ public enum Material implements Keyed, Translatable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,7 +96,7 @@ index cd09fa22e6322770bcb582ba00a384c5ca0fd8d8..a7d36ef22724f0ce3add61ab314e09e6
|
|||||||
public boolean isLegacy() {
|
public boolean isLegacy() {
|
||||||
return legacy;
|
return legacy;
|
||||||
}
|
}
|
||||||
@@ -4378,8 +4378,10 @@ public enum Material implements Keyed {
|
@@ -4378,8 +4378,10 @@ public enum Material implements Keyed, Translatable {
|
||||||
* Gets the MaterialData class associated with this Material
|
* Gets the MaterialData class associated with this Material
|
||||||
*
|
*
|
||||||
* @return MaterialData associated with this Material
|
* @return MaterialData associated with this Material
|
||||||
@ -144,6 +144,22 @@ index f43209cf7b752c26718c303ca8c3e1c7d9912ad3..f0094e6fb05e526736629ad3181c8d2c
|
|||||||
public enum NetherWartsState {
|
public enum NetherWartsState {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
|
index ea80520c19cd3dd6aa25665c748d96fd4a3f6e40..ff1fcdaccbca81602278a0b52670f7b895ba22b7 100644
|
||||||
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
|
@@ -229,8 +229,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
|
*
|
||||||
|
* @param input non-null input
|
||||||
|
* @return registered object or null if does not exist
|
||||||
|
+ * @deprecated this method's behavior is broken and not useful. If you want to get an object
|
||||||
|
+ * based on its vanilla name, or a key, wrap it in a {@link NamespacedKey} object and use {@link #get(NamespacedKey)}
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
+ @Deprecated(forRemoval = true) // Paper
|
||||||
|
default T match(@NotNull String input) {
|
||||||
|
Preconditions.checkArgument(input != null, "input must not be null");
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/SandstoneType.java b/src/main/java/org/bukkit/SandstoneType.java
|
diff --git a/src/main/java/org/bukkit/SandstoneType.java b/src/main/java/org/bukkit/SandstoneType.java
|
||||||
index 6277451c3c6c551078c237cd767b6d70c4f585ea..10f5cfb1885833a1d2c1027c03974da45ab28e2f 100644
|
index 6277451c3c6c551078c237cd767b6d70c4f585ea..10f5cfb1885833a1d2c1027c03974da45ab28e2f 100644
|
||||||
--- a/src/main/java/org/bukkit/SandstoneType.java
|
--- a/src/main/java/org/bukkit/SandstoneType.java
|
||||||
@ -671,18 +687,18 @@ index 66ffc658dba85942f179760dc6c50258e24ab903..50fe28b48d885c782278bdb53a0bbae3
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 7559f75dcc6665fa3d19d6e53a141a214407d1c5..515f623b3b6e76dbf24ec1d204f7983adb100858 100644
|
index a70de962712c14cb895708e89ad3811041728935..b15645cd56c245214bb5b87b36395fbc8e86e3d3 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -7,6 +7,7 @@ import java.util.List; // Paper
|
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||||
import java.util.Map;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Translatable;
|
||||||
+import org.bukkit.UndefinedNullability;
|
+import org.bukkit.UndefinedNullability;
|
||||||
import org.bukkit.Utility;
|
import org.bukkit.Utility;
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
@@ -67,6 +68,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -68,6 +69,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
* @param damage durability / damage
|
* @param damage durability / damage
|
||||||
* @deprecated see {@link #setDurability(short)}
|
* @deprecated see {@link #setDurability(short)}
|
||||||
*/
|
*/
|
||||||
@ -690,7 +706,7 @@ index 7559f75dcc6665fa3d19d6e53a141a214407d1c5..515f623b3b6e76dbf24ec1d204f7983a
|
|||||||
public ItemStack(@NotNull final Material type, final int amount, final short damage) {
|
public ItemStack(@NotNull final Material type, final int amount, final short damage) {
|
||||||
this(type, amount, damage, null);
|
this(type, amount, damage, null);
|
||||||
}
|
}
|
||||||
@@ -168,8 +170,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -169,8 +171,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
* Gets the MaterialData for this stack of items
|
* Gets the MaterialData for this stack of items
|
||||||
*
|
*
|
||||||
* @return MaterialData for this item
|
* @return MaterialData for this item
|
||||||
@ -701,7 +717,7 @@ index 7559f75dcc6665fa3d19d6e53a141a214407d1c5..515f623b3b6e76dbf24ec1d204f7983a
|
|||||||
public MaterialData getData() {
|
public MaterialData getData() {
|
||||||
Material mat = Bukkit.getUnsafe().toLegacy(getType());
|
Material mat = Bukkit.getUnsafe().toLegacy(getType());
|
||||||
if (data == null && mat != null && mat.getData() != null) {
|
if (data == null && mat != null && mat.getData() != null) {
|
||||||
@@ -183,7 +187,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -184,7 +188,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
* Sets the MaterialData for this stack of items
|
* Sets the MaterialData for this stack of items
|
||||||
*
|
*
|
||||||
* @param data New MaterialData for this item
|
* @param data New MaterialData for this item
|
||||||
@ -711,7 +727,7 @@ index 7559f75dcc6665fa3d19d6e53a141a214407d1c5..515f623b3b6e76dbf24ec1d204f7983a
|
|||||||
public void setData(@Nullable MaterialData data) {
|
public void setData(@Nullable MaterialData data) {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
@@ -545,7 +551,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -546,7 +552,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
*
|
*
|
||||||
* @return a copy of the current ItemStack's ItemData
|
* @return a copy of the current ItemStack's ItemData
|
||||||
*/
|
*/
|
||||||
|
@ -76,10 +76,10 @@ index 0000000000000000000000000000000000000000..ec36942128cbacae171584c89480b4aa
|
|||||||
+ Sound getFallSound();
|
+ Sound getFallSound();
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index b101f5264bdde8bd14913d5161c1047020830f8d..db441e463b02ee734f85c855f5538cd41041dbae 100644
|
index 0be73b2f45c9aab6e73bcb7a76136ec6e2428163..3107abe94bb94b03b2e285c75ab0b7fdc7c0bc87 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -606,4 +606,25 @@ public interface Block extends Metadatable {
|
@@ -607,4 +607,25 @@ public interface Block extends Metadatable, Translatable {
|
||||||
* @return <code>true</code> if the block data can be placed here
|
* @return <code>true</code> if the block data can be placed here
|
||||||
*/
|
*/
|
||||||
boolean canPlace(@NotNull BlockData data);
|
boolean canPlace(@NotNull BlockData data);
|
||||||
|
@ -10,10 +10,10 @@ Adds bool param to trigger exp drops for blocks
|
|||||||
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index db441e463b02ee734f85c855f5538cd41041dbae..af705e45204975a342e1454156ba143ed52cecdc 100644
|
index 3107abe94bb94b03b2e285c75ab0b7fdc7c0bc87..06ef9e133125d80127e1dbd6ae0eda89fa08a1d7 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -480,6 +480,52 @@ public interface Block extends Metadatable {
|
@@ -481,6 +481,52 @@ public interface Block extends Metadatable, Translatable {
|
||||||
*/
|
*/
|
||||||
boolean breakNaturally(@Nullable ItemStack tool);
|
boolean breakNaturally(@Nullable ItemStack tool);
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
|||||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 81da1def96d18704303cadd72261a1b2fcbb9fc5..5453b2ae459b2d5171ef7129c29891b721ee8e0b 100644
|
index 4af059f9b32d2a0913e6d88c6a93e101018e88a2..bdc68e164a8d25a068bc51c04ba17b65a558ba78 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -108,5 +108,9 @@ public interface UnsafeValues {
|
@@ -117,5 +117,9 @@ public interface UnsafeValues {
|
||||||
static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
|
static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
|
||||||
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
||||||
}
|
}
|
||||||
@ -20,10 +20,10 @@ index 81da1def96d18704303cadd72261a1b2fcbb9fc5..5453b2ae459b2d5171ef7129c29891b7
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 515f623b3b6e76dbf24ec1d204f7983adb100858..d3334c62bf39abf17ee7f3e68e106fd637ffdf00 100644
|
index b15645cd56c245214bb5b87b36395fbc8e86e3d3..7c280d7beeb42dca52e36e77bbd41742b2572710 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -632,6 +632,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -639,6 +639,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
|
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,80 +144,68 @@ index 0a66077d152a3c89fa7a277663969767798eb100..b02490737409eb80a2d2fb275c9a60b6
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index a7d36ef22724f0ce3add61ab314e09e6465077d4..4d496c7c088a75b79a25e7397b47600a8c104cf4 100644
|
index e883bb46461eb40b018ebe8c07caff96046fd11d..89af89e5fb49e202e80ea7688c62f8e119f4ddfe 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -113,7 +113,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -113,7 +113,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* An enum of all material IDs accepted by the official server and client
|
* An enum of all material IDs accepted by the official server and client
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
||||||
-public enum Material implements Keyed {
|
-public enum Material implements Keyed, Translatable {
|
||||||
+public enum Material implements Keyed, net.kyori.adventure.translation.Translatable { // Paper
|
+public enum Material implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper
|
||||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||||
AIR(9648, 0),
|
AIR(9648, 0),
|
||||||
STONE(22948),
|
STONE(22948),
|
||||||
@@ -4288,6 +4288,23 @@ public enum Material implements Keyed {
|
@@ -4288,6 +4288,15 @@ public enum Material implements Keyed, Translatable {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /**
|
|
||||||
+ * Return the translation key for the Material, so the client can translate it into the active
|
|
||||||
+ * locale when using a TranslatableComponent.
|
|
||||||
+ * @return the translation key
|
|
||||||
+ * @deprecated use {@link #translationKey()}
|
|
||||||
+ */
|
|
||||||
+ @NotNull
|
|
||||||
+ @Deprecated
|
|
||||||
+ public String getTranslationKey() {
|
|
||||||
+ return this.translationKey();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public @NotNull String translationKey() {
|
+ public @NotNull String translationKey() {
|
||||||
+ return Bukkit.getUnsafe().getTranslationKey(this);
|
+ if (this.isItem()) {
|
||||||
|
+ return Bukkit.getUnsafe().getItemTranslationKey(this);
|
||||||
|
+ } else {
|
||||||
|
+ return Bukkit.getUnsafe().getBlockTranslationKey(this);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
@@ -10596,9 +10605,11 @@ public enum Material implements Keyed, Translatable {
|
||||||
index 5453b2ae459b2d5171ef7129c29891b721ee8e0b..b518720355d8a8dcd55cb755e4e1fa9fc3dfc52b 100644
|
* material
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
* @see #getBlockTranslationKey()
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
* @see #getItemTranslationKey()
|
||||||
@@ -112,5 +112,34 @@ public interface UnsafeValues {
|
+ * @deprecated use {@link #translationKey()}
|
||||||
byte[] serializeItem(ItemStack item);
|
*/
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
+ @Deprecated(forRemoval = true) // Paper
|
||||||
|
public String getTranslationKey() {
|
||||||
|
if (this.isItem()) {
|
||||||
|
return Bukkit.getUnsafe().getItemTranslationKey(this);
|
||||||
|
diff --git a/src/main/java/org/bukkit/Translatable.java b/src/main/java/org/bukkit/Translatable.java
|
||||||
|
index e3faa2c675c85a9cbdbbb1debec0ff81c58a1bbd..fd1629c2d2028a88fb3d56b0aeb833d17235080a 100644
|
||||||
|
--- a/src/main/java/org/bukkit/Translatable.java
|
||||||
|
+++ b/src/main/java/org/bukkit/Translatable.java
|
||||||
|
@@ -5,14 +5,18 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
/**
|
||||||
|
* Represents an object with a text representation that can be translated by the
|
||||||
|
* Minecraft client.
|
||||||
|
+ * @deprecated use {@link net.kyori.adventure.translation.Translatable}
|
||||||
|
*/
|
||||||
|
+@Deprecated(forRemoval = true) // Paper
|
||||||
|
public interface Translatable {
|
||||||
|
|
||||||
ItemStack deserializeItem(byte[] data);
|
/**
|
||||||
+
|
* Get the translation key, suitable for use in a translation component.
|
||||||
+ /**
|
*
|
||||||
+ * Return the translation key for the Material, so the client can translate it into the active
|
* @return the translation key
|
||||||
+ * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
|
+ * @deprecated look for a {@code translationKey()} method instead
|
||||||
+ * @return the translation key
|
*/
|
||||||
+ */
|
@NotNull
|
||||||
+ String getTranslationKey(Material mat);
|
+ @Deprecated(forRemoval = true) // Paper
|
||||||
+
|
String getTranslationKey();
|
||||||
+ /**
|
|
||||||
+ * Return the translation key for the Block, so the client can translate it into the active
|
|
||||||
+ * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
|
|
||||||
+ * @return the translation key
|
|
||||||
+ */
|
|
||||||
+ String getTranslationKey(org.bukkit.block.Block block);
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Return the translation key for the EntityType, so the client can translate it into the active
|
|
||||||
+ * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.<br>
|
|
||||||
+ * This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
|
|
||||||
+ * @return the translation key
|
|
||||||
+ */
|
|
||||||
+ String getTranslationKey(org.bukkit.entity.EntityType type);
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Return the translation key for the ItemStack, so the client can translate it into the active
|
|
||||||
+ * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.<br>
|
|
||||||
+ * @return the translation key
|
|
||||||
+ */
|
|
||||||
+ String getTranslationKey(ItemStack itemStack);
|
|
||||||
// Paper end
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
|
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
|
||||||
index 13eac9ad2c1672051635d1c35cc49239252e7a61..107e36ef02a9481954bd770ce9a55a0b1e84be7a 100644
|
index 13eac9ad2c1672051635d1c35cc49239252e7a61..107e36ef02a9481954bd770ce9a55a0b1e84be7a 100644
|
||||||
@ -269,31 +257,28 @@ index 02c5fcbc76b2db6bf4eb7580456b5658c08272b4..d56e1b50dd7da18f40278cec4bfdc941
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index af705e45204975a342e1454156ba143ed52cecdc..ce3b81c5d83c9747ea0e3410c932460d11bf5c55 100644
|
index 06ef9e133125d80127e1dbd6ae0eda89fa08a1d7..35ed58bce2589bb097dd0f6bf2a6ebd76dc31fcd 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* (i.e. lighting and power) may not be able to be safely accessed during world
|
* (i.e. lighting and power) may not be able to be safely accessed during world
|
||||||
* generation when used in cases like BlockPhysicsEvent!!!!
|
* generation when used in cases like BlockPhysicsEvent!!!!
|
||||||
*/
|
*/
|
||||||
-public interface Block extends Metadatable {
|
-public interface Block extends Metadatable, Translatable {
|
||||||
+public interface Block extends Metadatable, net.kyori.adventure.translation.Translatable { // Paper - translatable
|
+public interface Block extends Metadatable, Translatable, net.kyori.adventure.translation.Translatable { // Paper - translatable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the metadata for this block
|
* Gets the metadata for this block
|
||||||
@@ -672,5 +672,15 @@ public interface Block extends Metadatable {
|
@@ -673,5 +673,12 @@ public interface Block extends Metadatable, Translatable {
|
||||||
* @return the sound group for this block
|
* @return the sound group for this block
|
||||||
*/
|
*/
|
||||||
@NotNull org.bukkit.SoundGroup getBlockSoundGroup();
|
@NotNull org.bukkit.SoundGroup getBlockSoundGroup();
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Return the translation key for the Block, so the client can translate it into the active
|
|
||||||
+ * locale when using a TranslatableComponent.
|
|
||||||
+ * @return the translation key
|
|
||||||
+ * @deprecated use {@link #translationKey()}
|
+ * @deprecated use {@link #translationKey()}
|
||||||
+ */
|
+ */
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ @Deprecated
|
+ @Deprecated(forRemoval = true)
|
||||||
+ String getTranslationKey();
|
+ String getTranslationKey();
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
@ -326,36 +311,28 @@ index 4d5f0837bd0e02a30c943d8969fb6b13452322e0..a39f9c078f42451bd122f3e3729d10ca
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
index df9d315cfaf968527fc8bc26dadd88f64a408cde..50d9442ffafdfabd4904dafae7daaeadcedee75b 100644
|
index 2caa5f82e206b231fd9e9f5508c3713816e5a0e4..80897ed8641a2bdc4e3557e20f3a8ae4b8c5da69 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.Contract;
|
@@ -22,7 +22,7 @@ import org.jetbrains.annotations.Contract;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
-public enum EntityType implements Keyed {
|
-public enum EntityType implements Keyed, Translatable {
|
||||||
+public enum EntityType implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translatable
|
+public enum EntityType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - translatable
|
||||||
|
|
||||||
// These strings MUST match the strings in nms.EntityTypes and are case sensitive.
|
// These strings MUST match the strings in nms.EntityTypes and are case sensitive.
|
||||||
/**
|
/**
|
||||||
@@ -425,4 +425,27 @@ public enum EntityType implements Keyed {
|
@@ -430,7 +430,19 @@ public enum EntityType implements Keyed, Translatable {
|
||||||
public boolean isAlive() {
|
|
||||||
return living;
|
@Override
|
||||||
|
@NotNull
|
||||||
|
+ @Deprecated(forRemoval = true) // Paper
|
||||||
|
public String getTranslationKey() {
|
||||||
|
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||||
}
|
}
|
||||||
+ // Paper start
|
|
||||||
+ /**
|
|
||||||
+ * Return the translation key for the EntityType, so the client can translate it into the active
|
|
||||||
+ * locale when using a TranslatableComponent.<br>
|
|
||||||
+ * This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
|
|
||||||
+ * @return the translation key
|
|
||||||
+ * @deprecated use {@link #translationKey()}
|
|
||||||
+ */
|
|
||||||
+ @Deprecated
|
|
||||||
+ @Nullable
|
|
||||||
+ public String getTranslationKey() {
|
|
||||||
+ return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
|
+ // Paper start
|
||||||
+ /**
|
+ /**
|
||||||
+ * @throws IllegalArgumentException if the entity does not have a translation key (is probably a custom entity)
|
+ * @throws IllegalArgumentException if the entity does not have a translation key (is probably a custom entity)
|
||||||
+ */
|
+ */
|
||||||
@ -473,38 +450,32 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
|
|||||||
+
|
+
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index d3334c62bf39abf17ee7f3e68e106fd637ffdf00..d6eafaa58b19ab44dfdef1baa58fa89c5b761b65 100644
|
index 7c280d7beeb42dca52e36e77bbd41742b2572710..03a15727c85a08c0c79965be249373a11f31ce6e 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* use this class to encapsulate Materials for which {@link Material#isItem()}
|
* use this class to encapsulate Materials for which {@link Material#isItem()}
|
||||||
* returns false.</b>
|
* returns false.</b>
|
||||||
*/
|
*/
|
||||||
-public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowItem> { // Paper
|
-public class ItemStack implements Cloneable, ConfigurationSerializable, Translatable, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowItem> { // Paper
|
||||||
+public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowItem>, net.kyori.adventure.translation.Translatable { // Paper
|
+public class ItemStack implements Cloneable, ConfigurationSerializable, Translatable, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowItem>, net.kyori.adventure.translation.Translatable { // Paper
|
||||||
private Material type = Material.AIR;
|
private Material type = Material.AIR;
|
||||||
private int amount = 0;
|
private int amount = 0;
|
||||||
private MaterialData data = null;
|
private MaterialData data = null;
|
||||||
@@ -858,5 +858,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -606,6 +606,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@NotNull
|
||||||
|
+ @Deprecated(forRemoval = true) // Paper
|
||||||
|
public String getTranslationKey() {
|
||||||
|
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||||
|
}
|
||||||
|
@@ -865,5 +866,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
ItemMeta itemMeta = getItemMeta();
|
ItemMeta itemMeta = getItemMeta();
|
||||||
return itemMeta != null && itemMeta.hasItemFlag(flag);
|
return itemMeta != null && itemMeta.hasItemFlag(flag);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Gets the translation key for this itemstack.
|
|
||||||
+ * This is not the same as getting the translation key
|
|
||||||
+ * for the material of this itemstack.
|
|
||||||
+ *
|
|
||||||
+ * @return the translation key
|
|
||||||
+ * @deprecated use {@link #translationKey()}
|
|
||||||
+ */
|
|
||||||
+ @NotNull
|
|
||||||
+ @Deprecated
|
|
||||||
+ public String getTranslationKey() {
|
|
||||||
+ return this.translationKey();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * {@inheritDoc}
|
+ * {@inheritDoc}
|
||||||
+ * <p>
|
+ * <p>
|
||||||
+ * This is not the same as getting the translation key
|
+ * This is not the same as getting the translation key
|
||||||
|
@ -6,13 +6,13 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index b518720355d8a8dcd55cb755e4e1fa9fc3dfc52b..824833a04df15551c8dd9ddfa8d4c1c9cf6d49c0 100644
|
index bdc68e164a8d25a068bc51c04ba17b65a558ba78..7a6c22b9845798580635a938c28adf01908e04a0 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -141,5 +141,12 @@ public interface UnsafeValues {
|
@@ -121,5 +121,12 @@ public interface UnsafeValues {
|
||||||
* @return the translation key
|
byte[] serializeItem(ItemStack item);
|
||||||
*/
|
|
||||||
String getTranslationKey(ItemStack itemStack);
|
ItemStack deserializeItem(byte[] data);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Creates and returns the next EntityId available.
|
+ * Creates and returns the next EntityId available.
|
||||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Add Destroy Speed API
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index 2c837ea822f3b0c4ec312f0c956fe1b778cbd5e9..4a408361ac86b8c490942686c2709817338f4f59 100644
|
index 35ed58bce2589bb097dd0f6bf2a6ebd76dc31fcd..ded1daaef53882a80e618f4ed97b50fd0ee4786c 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -682,5 +682,29 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@@ -680,5 +680,29 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
@NotNull
|
@NotNull
|
||||||
@Deprecated
|
@Deprecated(forRemoval = true)
|
||||||
String getTranslationKey();
|
String getTranslationKey();
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -9,10 +9,10 @@ process to do this in the Bukkit API
|
|||||||
Adds API for buildable, replaceable, burnable too.
|
Adds API for buildable, replaceable, burnable too.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index 4a408361ac86b8c490942686c2709817338f4f59..43a0e57a6db702b2a40e151f151bfaa63b9d95d5 100644
|
index ded1daaef53882a80e618f4ed97b50fd0ee4786c..4abd16a4e99ae0380b67c86b9744d71423053b5e 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -438,6 +438,42 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@@ -439,6 +439,42 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
*/
|
*/
|
||||||
boolean isLiquid();
|
boolean isLiquid();
|
||||||
|
|
||||||
|
@ -91,10 +91,10 @@ index 0000000000000000000000000000000000000000..f29e76a6b66ddfec12ddf8db6dcb2df6
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 824833a04df15551c8dd9ddfa8d4c1c9cf6d49c0..3d5185a1a3a5e5e1b1428ddbedec38f908f5870a 100644
|
index 7a6c22b9845798580635a938c28adf01908e04a0..1b6fe8fadcf4860cd3411c0433bc775de3a870ad 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -148,5 +148,15 @@ public interface UnsafeValues {
|
@@ -128,5 +128,15 @@ public interface UnsafeValues {
|
||||||
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
||||||
*/
|
*/
|
||||||
public int nextEntityId();
|
public int nextEntityId();
|
||||||
|
@ -443,10 +443,10 @@ index 0000000000000000000000000000000000000000..5a43e40b7311ed2acb51f6ba8b12d1f3
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index a77320257b691c3a380f7c59c350382c0c0fe863..ec59aa76488a1500ab3df46c98ba7b1d4179df4e 100644
|
index ff1fcdaccbca81602278a0b52670f7b895ba22b7..9e39c028b3d7bea4f2998d6ed8d53d88361ccfcd 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -210,6 +210,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -211,6 +211,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
return GameEvent.getByKey(key);
|
return GameEvent.getByKey(key);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache the result of Material#isBlock
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 4d496c7c088a75b79a25e7397b47600a8c104cf4..b1214775680099c8255b45ed0285568572f12895 100644
|
index 89af89e5fb49e202e80ea7688c62f8e119f4ddfe..7e447f8be7dc9768df487e1f7f4b9aafedb33e2d 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4232,6 +4232,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4232,6 +4232,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
public final Class<?> data;
|
public final Class<?> data;
|
||||||
private final boolean legacy;
|
private final boolean legacy;
|
||||||
private final NamespacedKey key;
|
private final NamespacedKey key;
|
||||||
@ -16,7 +16,7 @@ index 4d496c7c088a75b79a25e7397b47600a8c104cf4..b1214775680099c8255b45ed02855685
|
|||||||
|
|
||||||
private Material(final int id) {
|
private Material(final int id) {
|
||||||
this(id, 64);
|
this(id, 64);
|
||||||
@@ -4438,6 +4439,11 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4430,6 +4431,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
* @return true if this material is a block
|
* @return true if this material is a block
|
||||||
*/
|
*/
|
||||||
public boolean isBlock() {
|
public boolean isBlock() {
|
||||||
@ -28,7 +28,7 @@ index 4d496c7c088a75b79a25e7397b47600a8c104cf4..b1214775680099c8255b45ed02855685
|
|||||||
switch (this) {
|
switch (this) {
|
||||||
//<editor-fold defaultstate="collapsed" desc="isBlock">
|
//<editor-fold defaultstate="collapsed" desc="isBlock">
|
||||||
case ACACIA_BUTTON:
|
case ACACIA_BUTTON:
|
||||||
@@ -5593,6 +5599,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -5585,6 +5591,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
static {
|
static {
|
||||||
for (Material material : values()) {
|
for (Material material : values()) {
|
||||||
BY_NAME.put(material.name(), material);
|
BY_NAME.put(material.name(), material);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Block#isValidTool
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index 43a0e57a6db702b2a40e151f151bfaa63b9d95d5..c847bc83c0911007d226f1a8c6f1d0cefa9a1689 100644
|
index 4abd16a4e99ae0380b67c86b9744d71423053b5e..96a3466181a6829e1868b5f5249349e8fd2cdd09 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -229,6 +229,15 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@@ -230,6 +230,15 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
public static int getBlockKeyZ(long packed) {
|
public static int getBlockKeyZ(long packed) {
|
||||||
return (int) ((packed << 10) >> 37);
|
return (int) ((packed << 10) >> 37);
|
||||||
}
|
}
|
||||||
|
@ -78,10 +78,10 @@ index 02b898d441c42771903d5839c3cde544b1a25778..1a3b4f20c7126caf8a34040028f73508
|
|||||||
* Create a new virtual {@link WorldBorder}.
|
* Create a new virtual {@link WorldBorder}.
|
||||||
* <p>
|
* <p>
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 3d5185a1a3a5e5e1b1428ddbedec38f908f5870a..b359a7bff658c4b3ff569e78e0751dc07437bb48 100644
|
index 1b6fe8fadcf4860cd3411c0433bc775de3a870ad..027bbfe33011f26914852750b6f0a7200818dc95 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -158,5 +158,10 @@ public interface UnsafeValues {
|
@@ -138,5 +138,10 @@ public interface UnsafeValues {
|
||||||
* @throws IllegalArgumentException if there isn't a registry for that type
|
* @throws IllegalArgumentException if there isn't a registry for that type
|
||||||
*/
|
*/
|
||||||
<T extends Keyed> @org.jetbrains.annotations.NotNull Registry<T> registryFor(Class<T> classOfT);
|
<T extends Keyed> @org.jetbrains.annotations.NotNull Registry<T> registryFor(Class<T> classOfT);
|
||||||
|
@ -39,12 +39,12 @@ index 0000000000000000000000000000000000000000..74ef8395cc040ce488c2acaa416db202
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index b1214775680099c8255b45ed0285568572f12895..6fbbc3525574abd5189c9032f7d64dc55c0dfa80 100644
|
index 7e447f8be7dc9768df487e1f7f4b9aafedb33e2d..eb8aa093148eea3b2fcafe06e8f1277ebbe2f275 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4306,6 +4306,17 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4298,6 +4298,17 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
public @NotNull String translationKey() {
|
return Bukkit.getUnsafe().getBlockTranslationKey(this);
|
||||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
@ -61,10 +61,10 @@ index b1214775680099c8255b45ed0285568572f12895..6fbbc3525574abd5189c9032f7d64dc5
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index b359a7bff658c4b3ff569e78e0751dc07437bb48..bc8e86f83423a0abdfe3516076636b02192e7501 100644
|
index 027bbfe33011f26914852750b6f0a7200818dc95..2768aee1ec52037c32a7873a3018e659604175ce 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -163,5 +163,22 @@ public interface UnsafeValues {
|
@@ -143,5 +143,22 @@ public interface UnsafeValues {
|
||||||
* Just don't use it.
|
* Just don't use it.
|
||||||
*/
|
*/
|
||||||
@org.jetbrains.annotations.NotNull String getMainLevelName();
|
@org.jetbrains.annotations.NotNull String getMainLevelName();
|
||||||
@ -88,10 +88,10 @@ index b359a7bff658c4b3ff569e78e0751dc07437bb48..bc8e86f83423a0abdfe3516076636b02
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index d6eafaa58b19ab44dfdef1baa58fa89c5b761b65..75bd1f7a5a30d21ae61836072ec057a95b7c288b 100644
|
index 03a15727c85a08c0c79965be249373a11f31ce6e..c6378a880eac9f444c66f640260e8d410efd015b 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -883,5 +883,15 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -877,5 +877,15 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
public @NotNull String translationKey() {
|
public @NotNull String translationKey() {
|
||||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index bc8e86f83423a0abdfe3516076636b02192e7501..8650d5b9bd322f0b67382fcd7900f922c5134a97 100644
|
index 2768aee1ec52037c32a7873a3018e659604175ce..c63de60fd3c6b5c2cf3b5b01288d8309d9e6d02b 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -180,5 +180,12 @@ public interface UnsafeValues {
|
@@ -160,5 +160,12 @@ public interface UnsafeValues {
|
||||||
* @return the itemstack rarity
|
* @return the itemstack rarity
|
||||||
*/
|
*/
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 8650d5b9bd322f0b67382fcd7900f922c5134a97..6f4e02065bcb4130f5a30de01f3adbe3513c1d70 100644
|
index c63de60fd3c6b5c2cf3b5b01288d8309d9e6d02b..ee20f8cd7c260540f4fa9235343841ddd6e72eba 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -181,6 +181,16 @@ public interface UnsafeValues {
|
@@ -161,6 +161,16 @@ public interface UnsafeValues {
|
||||||
*/
|
*/
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||||
|
|
||||||
@ -26,10 +26,10 @@ index 8650d5b9bd322f0b67382fcd7900f922c5134a97..6f4e02065bcb4130f5a30de01f3adbe3
|
|||||||
* Returns the server's protocol version.
|
* Returns the server's protocol version.
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 75bd1f7a5a30d21ae61836072ec057a95b7c288b..0d0d7bda2d4fafffd3e80a359019626ab44031d0 100644
|
index c6378a880eac9f444c66f640260e8d410efd015b..b731ac4f6cd82d8476e4040a2204f58b0f63a0d3 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -893,5 +893,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -887,5 +887,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
public io.papermc.paper.inventory.ItemRarity getRarity() {
|
public io.papermc.paper.inventory.ItemRarity getRarity() {
|
||||||
return Bukkit.getUnsafe().getItemStackRarity(this);
|
return Bukkit.getUnsafe().getItemStackRarity(this);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack#editMeta
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 0d0d7bda2d4fafffd3e80a359019626ab44031d0..77ef41527a05e2d7899633ef7fa813774dd15bd9 100644
|
index b731ac4f6cd82d8476e4040a2204f58b0f63a0d3..84ea952cdee1eaec5572641e09fdd85930ddeb47 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -546,6 +546,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -547,6 +547,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
return result.ensureServerConversions(); // Paper
|
return result.ensureServerConversions(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 6fbbc3525574abd5189c9032f7d64dc55c0dfa80..bdc51797e3e3c8ffb1db842e29ddb86beeec48ec 100644
|
index eb8aa093148eea3b2fcafe06e8f1277ebbe2f275..9c6291531d3081bf601364815fdd0a9b801eee50 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4317,6 +4317,21 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4309,6 +4309,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
|
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
|
||||||
return Bukkit.getUnsafe().getItemRarity(this);
|
return Bukkit.getUnsafe().getItemRarity(this);
|
||||||
}
|
}
|
||||||
@ -31,10 +31,10 @@ index 6fbbc3525574abd5189c9032f7d64dc55c0dfa80..bdc51797e3e3c8ffb1db842e29ddb86b
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 6f4e02065bcb4130f5a30de01f3adbe3513c1d70..4e3eac5f06a6ded0f152f1744fcebfeef6b48814 100644
|
index ee20f8cd7c260540f4fa9235343841ddd6e72eba..dc1dc789c6f8eebc026ca990ed44fa7c6cb88f19 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -191,6 +191,18 @@ public interface UnsafeValues {
|
@@ -171,6 +171,18 @@ public interface UnsafeValues {
|
||||||
*/
|
*/
|
||||||
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 4e3eac5f06a6ded0f152f1744fcebfeef6b48814..68b560af277d4913306fb1b9c88c2fadcd2f446a 100644
|
index dc1dc789c6f8eebc026ca990ed44fa7c6cb88f19..edcf0ca00aaf9d9ad26eb7fb04075fba101169fd 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -209,5 +209,22 @@ public interface UnsafeValues {
|
@@ -189,5 +189,22 @@ public interface UnsafeValues {
|
||||||
* @return the server's protocol version
|
* @return the server's protocol version
|
||||||
*/
|
*/
|
||||||
int getProtocolVersion();
|
int getProtocolVersion();
|
||||||
@ -32,10 +32,10 @@ index 4e3eac5f06a6ded0f152f1744fcebfeef6b48814..68b560af277d4913306fb1b9c88c2fad
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
index 50d9442ffafdfabd4904dafae7daaeadcedee75b..5a0c96875d9c3bd32b4649a3fccd43af1ccb195b 100644
|
index 80897ed8641a2bdc4e3557e20f3a8ae4b8c5da69..4915c1064a9b6bf1d485f9e6e42b9f6e4e12f236 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
@@ -447,5 +447,24 @@ public enum EntityType implements Keyed, net.kyori.adventure.translation.Transla
|
@@ -444,5 +444,24 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||||
Preconditions.checkArgument(this != UNKNOWN, "UNKNOWN entities do not have translation keys");
|
Preconditions.checkArgument(this != UNKNOWN, "UNKNOWN entities do not have translation keys");
|
||||||
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index bdc51797e3e3c8ffb1db842e29ddb86beeec48ec..56459876a7736bd3a015e0aba511313997f9ec65 100644
|
index 9c6291531d3081bf601364815fdd0a9b801eee50..33371518fc8c5d97625f3d528ba8fee25d8c9c00 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4332,6 +4332,16 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4324,6 +4324,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
||||||
return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
|
return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
|
||||||
}
|
}
|
||||||
@ -26,10 +26,10 @@ index bdc51797e3e3c8ffb1db842e29ddb86beeec48ec..56459876a7736bd3a015e0aba5113139
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 68b560af277d4913306fb1b9c88c2fadcd2f446a..9fd64aa7f2487b07fe0a6873bd57a0ed483499a3 100644
|
index edcf0ca00aaf9d9ad26eb7fb04075fba101169fd..4b0b1afcf3f8fa8929311dae47df91d0b7dd6fdc 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -226,5 +226,14 @@ public interface UnsafeValues {
|
@@ -206,5 +206,14 @@ public interface UnsafeValues {
|
||||||
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
||||||
*/
|
*/
|
||||||
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
||||||
@ -45,10 +45,10 @@ index 68b560af277d4913306fb1b9c88c2fadcd2f446a..9fd64aa7f2487b07fe0a6873bd57a0ed
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index c847bc83c0911007d226f1a8c6f1d0cefa9a1689..cff39708e66208921da15d12d94407d6b6950298 100644
|
index 96a3466181a6829e1868b5f5249349e8fd2cdd09..cda6e7d8e032b3edc919995141dc260b1ea82810 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -481,6 +481,13 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@@ -482,6 +482,13 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
* @return true if block is solid
|
* @return true if block is solid
|
||||||
*/
|
*/
|
||||||
boolean isSolid();
|
boolean isSolid();
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 9fd64aa7f2487b07fe0a6873bd57a0ed483499a3..aa252abe42c184914d6b50ad1f94ba7ada22d7df 100644
|
index 4b0b1afcf3f8fa8929311dae47df91d0b7dd6fdc..dda436f61b174bf1bd94033a09468626f099ee3a 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -113,6 +113,14 @@ public interface UnsafeValues {
|
@@ -122,6 +122,14 @@ public interface UnsafeValues {
|
||||||
|
|
||||||
ItemStack deserializeItem(byte[] data);
|
ItemStack deserializeItem(byte[] data);
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ index 9fd64aa7f2487b07fe0a6873bd57a0ed483499a3..aa252abe42c184914d6b50ad1f94ba7a
|
|||||||
+ org.bukkit.entity.Entity deserializeEntity(byte[] data, World world, boolean preserveUUID);
|
+ org.bukkit.entity.Entity deserializeEntity(byte[] data, World world, boolean preserveUUID);
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
* Return the translation key for the Material, so the client can translate it into the active
|
* Creates and returns the next EntityId available.
|
||||||
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
|
* <p>
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
index e3218b5c170e1916a991aa1fae6a4f4e26dc034d..570d446869022008d01ba382e85ec69fcb25f99d 100644
|
index e3218b5c170e1916a991aa1fae6a4f4e26dc034d..570d446869022008d01ba382e85ec69fcb25f99d 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index ec59aa76488a1500ab3df46c98ba7b1d4179df4e..56a90dbf1a61dce615ee0f712851bf01de06b28c 100644
|
index 9e39c028b3d7bea4f2998d6ed8d53d88361ccfcd..3dc747080b7bfea4b04b5a47cc7ae4698c758802 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -216,6 +216,25 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -217,6 +217,25 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
* @see io.papermc.paper.world.structure.ConfiguredStructure
|
* @see io.papermc.paper.world.structure.ConfiguredStructure
|
||||||
*/
|
*/
|
||||||
Registry<io.papermc.paper.world.structure.ConfiguredStructure> CONFIGURED_STRUCTURE = Bukkit.getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class);
|
Registry<io.papermc.paper.world.structure.ConfiguredStructure> CONFIGURED_STRUCTURE = Bukkit.getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class);
|
||||||
|
@ -51,10 +51,10 @@ index 43b53c21af01e0f496c8aaacff82dfdfadaf40f6..3f7e860de4e28745fcdf8d2f41f4a8c2
|
|||||||
* Sets the {@link Biome} at the given {@link Location}.
|
* Sets the {@link Biome} at the given {@link Location}.
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index cff39708e66208921da15d12d94407d6b6950298..e405c279f6135c94c775a856ab88fd3cace6bd5c 100644
|
index cda6e7d8e032b3edc919995141dc260b1ea82810..13485933b8b897b5a9b35f337b43eab5c968f13a 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -370,10 +370,22 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@@ -371,10 +371,22 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
* Returns the biome that this block resides in
|
* Returns the biome that this block resides in
|
||||||
*
|
*
|
||||||
* @return Biome type containing this block
|
* @return Biome type containing this block
|
||||||
|
@ -32,10 +32,10 @@ index 2acafae468fcbb7213d6b6c30803a3924a3bbc30..40edff7c93b6bf75de81102326667135
|
|||||||
* Creates a hover event for the given item.
|
* Creates a hover event for the given item.
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index 77ef41527a05e2d7899633ef7fa813774dd15bd9..b8a344fd900dcbd4b28085a54b85b16c742e9c6f 100644
|
index 84ea952cdee1eaec5572641e09fdd85930ddeb47..6f33145f1ccc7645616f310a68676207318c2a58 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -648,6 +648,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -656,6 +656,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Block Ticking API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||||
index 0b02bfce9ee01c6beb14348129ab86c751c01e54..aba40431c5a1ae43106a678445483e0653e130d1 100644
|
index 13485933b8b897b5a9b35f337b43eab5c968f13a..390a2a2611df35a9ea6f1eb996b47e2aa4597ff0 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Block.java
|
--- a/src/main/java/org/bukkit/block/Block.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||||
@@ -588,6 +588,21 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@@ -589,6 +589,21 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||||
* @return true if the block was destroyed
|
* @return true if the block was destroyed
|
||||||
*/
|
*/
|
||||||
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);
|
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);
|
||||||
@ -31,10 +31,10 @@ index 0b02bfce9ee01c6beb14348129ab86c751c01e54..aba40431c5a1ae43106a678445483e06
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
|
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
|
||||||
index 62273e32e87b0dbc568747a67156366d4d4972bd..bd987bd0a29618dfe07de50b194fd6fa694628ec 100644
|
index e7ea3f9a60968f257c631bbefcc31653e6ae3728..dcfd515af841cbb957a9a651b6350c88840c041e 100644
|
||||||
--- a/src/main/java/org/bukkit/block/data/BlockData.java
|
--- a/src/main/java/org/bukkit/block/data/BlockData.java
|
||||||
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
|
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
|
||||||
@@ -151,4 +151,14 @@ public interface BlockData extends Cloneable {
|
@@ -199,4 +199,14 @@ public interface BlockData extends Cloneable {
|
||||||
* @return true if the face is sturdy and can support a block, false otherwise
|
* @return true if the face is sturdy and can support a block, false otherwise
|
||||||
*/
|
*/
|
||||||
boolean isFaceSturdy(@NotNull BlockFace face, @NotNull BlockSupport support);
|
boolean isFaceSturdy(@NotNull BlockFace face, @NotNull BlockSupport support);
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
|
|||||||
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index aa252abe42c184914d6b50ad1f94ba7ada22d7df..854be548e5a645e7312e6e9390d5255f8b1d61e6 100644
|
index dda436f61b174bf1bd94033a09468626f099ee3a..0f4a642a851eace1f3694b9bc0027c2ffdff3695 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -243,5 +243,32 @@ public interface UnsafeValues {
|
@@ -223,5 +223,32 @@ public interface UnsafeValues {
|
||||||
* @throws IllegalArgumentException if {@link Material#isBlock()} is false
|
* @throws IllegalArgumentException if {@link Material#isBlock()} is false
|
||||||
*/
|
*/
|
||||||
boolean isCollidable(@org.jetbrains.annotations.NotNull Material material);
|
boolean isCollidable(@org.jetbrains.annotations.NotNull Material material);
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: MelnCat <melncatuwu@gmail.com>
|
From: MelnCat <melncatuwu@gmail.com>
|
||||||
Date: Fri, 12 Aug 2022 23:24:53 -0700
|
Date: Fri, 12 Aug 2022 23:24:53 -0700
|
||||||
Subject: [PATCH] Add getDrops to BlockState and isPreferredTool to BlockData
|
Subject: [PATCH] Add getDrops to BlockState
|
||||||
|
|
||||||
|
Originally added isPreferredTool to BlockData but
|
||||||
|
upstream added that.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
|
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
|
||||||
index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..37ca7b6b0fcee8bec12026ec3715dcc47400cc11 100644
|
index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..37ca7b6b0fcee8bec12026ec3715dcc47400cc11 100644
|
||||||
@ -43,24 +45,3 @@ index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..37ca7b6b0fcee8bec12026ec3715dcc4
|
|||||||
+ java.util.@org.jetbrains.annotations.Unmodifiable Collection<org.bukkit.inventory.ItemStack> getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity);
|
+ java.util.@org.jetbrains.annotations.Unmodifiable Collection<org.bukkit.inventory.ItemStack> getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity);
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
|
|
||||||
index bd987bd0a29618dfe07de50b194fd6fa694628ec..b166d053b3c44f06cb1f5b643e7f7e117eb21d17 100644
|
|
||||||
--- a/src/main/java/org/bukkit/block/data/BlockData.java
|
|
||||||
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
|
|
||||||
@@ -160,5 +160,16 @@ public interface BlockData extends Cloneable {
|
|
||||||
* @return is ticked randomly
|
|
||||||
*/
|
|
||||||
boolean isRandomlyTicked();
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Returns if the given item is a preferred choice to break this block.
|
|
||||||
+ *
|
|
||||||
+ * In some cases this determines if a block will drop anything or extra
|
|
||||||
+ * loot.
|
|
||||||
+ *
|
|
||||||
+ * @param tool The tool or item used for breaking this block
|
|
||||||
+ * @return true if the tool is preferred for breaking this block
|
|
||||||
+ */
|
|
||||||
+ boolean isPreferredTool(@NotNull org.bukkit.inventory.ItemStack tool);
|
|
||||||
// Paper end
|
|
||||||
}
|
|
@ -8,7 +8,7 @@ to simulate damage done to an itemstack and all
|
|||||||
the logic associated with damaging them
|
the logic associated with damaging them
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index b18a833019c81b8e46535a1b4c42ba3987a97c90..717c7419d872286e38b6919503ab0e6537c55387 100644
|
index f5a4160afb75549dd56a237cf99ec733efef9b4c..285b4028eb45439c052d6a2e9001a8c0bfacd49a 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -1082,5 +1082,48 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -1082,5 +1082,48 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
@ -61,10 +61,10 @@ index b18a833019c81b8e46535a1b4c42ba3987a97c90..717c7419d872286e38b6919503ab0e65
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
index b8a344fd900dcbd4b28085a54b85b16c742e9c6f..870c0ddd101094a3bce1ebf5ec4d42c51053db84 100644
|
index 6f33145f1ccc7645616f310a68676207318c2a58..449d6e1995eedbfaeffdc5d1f1c2295378006aa8 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||||
@@ -977,5 +977,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
@@ -971,5 +971,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||||
public boolean canRepair(@NotNull ItemStack toBeRepaired) {
|
public boolean canRepair(@NotNull ItemStack toBeRepaired) {
|
||||||
return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this);
|
return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Mark experimental api as such
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe08b0b9906 100644
|
index 33371518fc8c5d97625f3d528ba8fee25d8c9c00..7eb5413ea1d94ddacd98edb57074611dac94a41c 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -154,9 +154,11 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -154,9 +154,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
ACACIA_PLANKS(31312),
|
ACACIA_PLANKS(31312),
|
||||||
DARK_OAK_PLANKS(20869),
|
DARK_OAK_PLANKS(20869),
|
||||||
MANGROVE_PLANKS(7078),
|
MANGROVE_PLANKS(7078),
|
||||||
@ -20,7 +20,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_MOSAIC(10715),
|
BAMBOO_MOSAIC(10715),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Sapling}
|
* BlockData: {@link Sapling}
|
||||||
@@ -352,6 +354,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -352,6 +354,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Orientable}
|
* BlockData: {@link Orientable}
|
||||||
*/
|
*/
|
||||||
@ -28,7 +28,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_BLOCK(20770, Orientable.class),
|
BAMBOO_BLOCK(20770, Orientable.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Orientable}
|
* BlockData: {@link Orientable}
|
||||||
@@ -428,6 +431,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -428,6 +431,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Orientable}
|
* BlockData: {@link Orientable}
|
||||||
*/
|
*/
|
||||||
@ -36,7 +36,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
STRIPPED_BAMBOO_BLOCK(14799, Orientable.class),
|
STRIPPED_BAMBOO_BLOCK(14799, Orientable.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Orientable}
|
* BlockData: {@link Orientable}
|
||||||
@@ -622,10 +626,12 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -622,10 +626,12 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Slab}
|
* BlockData: {@link Slab}
|
||||||
*/
|
*/
|
||||||
@ -49,7 +49,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_MOSAIC_SLAB(22118, Slab.class),
|
BAMBOO_MOSAIC_SLAB(22118, Slab.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Slab}
|
* BlockData: {@link Slab}
|
||||||
@@ -712,6 +718,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -712,6 +718,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link ChiseledBookshelf}
|
* BlockData: {@link ChiseledBookshelf}
|
||||||
*/
|
*/
|
||||||
@ -57,7 +57,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
CHISELED_BOOKSHELF(8099, ChiseledBookshelf.class),
|
CHISELED_BOOKSHELF(8099, ChiseledBookshelf.class),
|
||||||
MOSSY_COBBLESTONE(21900),
|
MOSSY_COBBLESTONE(21900),
|
||||||
OBSIDIAN(32723),
|
OBSIDIAN(32723),
|
||||||
@@ -805,6 +812,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -805,6 +812,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Fence}
|
* BlockData: {@link Fence}
|
||||||
*/
|
*/
|
||||||
@ -65,7 +65,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_FENCE(17207, Fence.class),
|
BAMBOO_FENCE(17207, Fence.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Fence}
|
* BlockData: {@link Fence}
|
||||||
@@ -981,10 +989,12 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -981,10 +989,12 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Stairs}
|
* BlockData: {@link Stairs}
|
||||||
*/
|
*/
|
||||||
@ -78,7 +78,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_MOSAIC_STAIRS(20977, Stairs.class),
|
BAMBOO_MOSAIC_STAIRS(20977, Stairs.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Stairs}
|
* BlockData: {@link Stairs}
|
||||||
@@ -1828,6 +1838,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -1828,6 +1838,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Switch}
|
* BlockData: {@link Switch}
|
||||||
*/
|
*/
|
||||||
@ -86,7 +86,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_BUTTON(21810, Switch.class),
|
BAMBOO_BUTTON(21810, Switch.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Switch}
|
* BlockData: {@link Switch}
|
||||||
@@ -1884,6 +1895,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -1884,6 +1895,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Powerable}
|
* BlockData: {@link Powerable}
|
||||||
*/
|
*/
|
||||||
@ -94,7 +94,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_PRESSURE_PLATE(26740, Powerable.class),
|
BAMBOO_PRESSURE_PLATE(26740, Powerable.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Powerable}
|
* BlockData: {@link Powerable}
|
||||||
@@ -1928,6 +1940,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -1928,6 +1940,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Door}
|
* BlockData: {@link Door}
|
||||||
*/
|
*/
|
||||||
@ -102,7 +102,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_DOOR(19971, Door.class),
|
BAMBOO_DOOR(19971, Door.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Door}
|
* BlockData: {@link Door}
|
||||||
@@ -1972,6 +1985,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -1972,6 +1985,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link TrapDoor}
|
* BlockData: {@link TrapDoor}
|
||||||
*/
|
*/
|
||||||
@ -110,7 +110,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_TRAPDOOR(9174, TrapDoor.class),
|
BAMBOO_TRAPDOOR(9174, TrapDoor.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link TrapDoor}
|
* BlockData: {@link TrapDoor}
|
||||||
@@ -2012,6 +2026,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2012,6 +2026,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Gate}
|
* BlockData: {@link Gate}
|
||||||
*/
|
*/
|
||||||
@ -118,7 +118,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_FENCE_GATE(14290, Gate.class),
|
BAMBOO_FENCE_GATE(14290, Gate.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Gate}
|
* BlockData: {@link Gate}
|
||||||
@@ -2060,7 +2075,9 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2060,7 +2075,9 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
DARK_OAK_CHEST_BOAT(8733, 1),
|
DARK_OAK_CHEST_BOAT(8733, 1),
|
||||||
MANGROVE_BOAT(20792, 1),
|
MANGROVE_BOAT(20792, 1),
|
||||||
MANGROVE_CHEST_BOAT(18572, 1),
|
MANGROVE_CHEST_BOAT(18572, 1),
|
||||||
@ -128,7 +128,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_CHEST_RAFT(20056, 1),
|
BAMBOO_CHEST_RAFT(20056, 1),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link StructureBlock}
|
* BlockData: {@link StructureBlock}
|
||||||
@@ -2194,6 +2211,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2194,6 +2211,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Sign}
|
* BlockData: {@link Sign}
|
||||||
*/
|
*/
|
||||||
@ -136,7 +136,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_SIGN(26139, 16, Sign.class),
|
BAMBOO_SIGN(26139, 16, Sign.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Sign}
|
* BlockData: {@link Sign}
|
||||||
@@ -2206,42 +2224,52 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2206,42 +2224,52 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link HangingSign}
|
* BlockData: {@link HangingSign}
|
||||||
*/
|
*/
|
||||||
@ -189,7 +189,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
WARPED_HANGING_SIGN(8195, 16, HangingSign.class),
|
WARPED_HANGING_SIGN(8195, 16, HangingSign.class),
|
||||||
BUCKET(15215, 16),
|
BUCKET(15215, 16),
|
||||||
WATER_BUCKET(8802, 1),
|
WATER_BUCKET(8802, 1),
|
||||||
@@ -2265,6 +2293,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2265,6 +2293,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
EGG(21603, 16),
|
EGG(21603, 16),
|
||||||
COMPASS(24139),
|
COMPASS(24139),
|
||||||
RECOVERY_COMPASS(12710),
|
RECOVERY_COMPASS(12710),
|
||||||
@ -197,7 +197,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BUNDLE(16835, 1),
|
BUNDLE(16835, 1),
|
||||||
FISHING_ROD(4167, 1, 64),
|
FISHING_ROD(4167, 1, 64),
|
||||||
CLOCK(14980),
|
CLOCK(14980),
|
||||||
@@ -2405,6 +2434,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2405,6 +2434,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
BEE_SPAWN_EGG(22924),
|
BEE_SPAWN_EGG(22924),
|
||||||
BLAZE_SPAWN_EGG(4759),
|
BLAZE_SPAWN_EGG(4759),
|
||||||
CAT_SPAWN_EGG(29583),
|
CAT_SPAWN_EGG(29583),
|
||||||
@ -205,7 +205,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
CAMEL_SPAWN_EGG(14760),
|
CAMEL_SPAWN_EGG(14760),
|
||||||
CAVE_SPIDER_SPAWN_EGG(23341),
|
CAVE_SPIDER_SPAWN_EGG(23341),
|
||||||
CHICKEN_SPAWN_EGG(5462),
|
CHICKEN_SPAWN_EGG(5462),
|
||||||
@@ -2515,6 +2545,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2515,6 +2545,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Rotatable}
|
* BlockData: {@link Rotatable}
|
||||||
*/
|
*/
|
||||||
@ -213,7 +213,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
PIGLIN_HEAD(5512, Rotatable.class),
|
PIGLIN_HEAD(5512, Rotatable.class),
|
||||||
NETHER_STAR(12469),
|
NETHER_STAR(12469),
|
||||||
PUMPKIN_PIE(28725),
|
PUMPKIN_PIE(28725),
|
||||||
@@ -2916,46 +2947,57 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -2916,46 +2947,57 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link WallSign}
|
* BlockData: {@link WallSign}
|
||||||
*/
|
*/
|
||||||
@ -271,7 +271,7 @@ index 56459876a7736bd3a015e0aba511313997f9ec65..e5b94299793ba7cb9071a3f3a35ddbe0
|
|||||||
BAMBOO_WALL_HANGING_SIGN(6669, WallHangingSign.class),
|
BAMBOO_WALL_HANGING_SIGN(6669, WallHangingSign.class),
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link RedstoneWallTorch}
|
* BlockData: {@link RedstoneWallTorch}
|
||||||
@@ -3063,6 +3105,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -3063,6 +3105,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
/**
|
/**
|
||||||
* BlockData: {@link Directional}
|
* BlockData: {@link Directional}
|
||||||
*/
|
*/
|
||||||
@ -427,10 +427,10 @@ index 17e4e0a822d4372e0a98612294ec0bd728830164..f827d8f508441a035974974d34450879
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
index 5a0c96875d9c3bd32b4649a3fccd43af1ccb195b..b507b715f9b28b98e32f6589344a5066d1009f64 100644
|
index 4915c1064a9b6bf1d485f9e6e42b9f6e4e12f236..91664b99f1158cb8a2e3c72ec082bf3c39487649 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||||
@@ -276,6 +276,7 @@ public enum EntityType implements Keyed, net.kyori.adventure.translation.Transla
|
@@ -278,6 +278,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||||
FROG("frog", Frog.class, -1),
|
FROG("frog", Frog.class, -1),
|
||||||
TADPOLE("tadpole", Tadpole.class, -1),
|
TADPOLE("tadpole", Tadpole.class, -1),
|
||||||
WARDEN("warden", Warden.class, -1),
|
WARDEN("warden", Warden.class, -1),
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add missing isFuel Material entries
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3414ec913 100644
|
index 7eb5413ea1d94ddacd98edb57074611dac94a41c..6bbb47d1f9d8d45326232024e82a0ebaf764fae7 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -7467,6 +7467,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7459,6 +7459,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case ACACIA_DOOR:
|
case ACACIA_DOOR:
|
||||||
case ACACIA_FENCE:
|
case ACACIA_FENCE:
|
||||||
case ACACIA_FENCE_GATE:
|
case ACACIA_FENCE_GATE:
|
||||||
@ -16,7 +16,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case ACACIA_LOG:
|
case ACACIA_LOG:
|
||||||
case ACACIA_PLANKS:
|
case ACACIA_PLANKS:
|
||||||
case ACACIA_PRESSURE_PLATE:
|
case ACACIA_PRESSURE_PLATE:
|
||||||
@@ -7478,9 +7479,27 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7470,9 +7471,27 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case ACACIA_WOOD:
|
case ACACIA_WOOD:
|
||||||
case AZALEA:
|
case AZALEA:
|
||||||
case BAMBOO:
|
case BAMBOO:
|
||||||
@ -44,7 +44,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case BARREL:
|
case BARREL:
|
||||||
case BIRCH_BOAT:
|
case BIRCH_BOAT:
|
||||||
case BIRCH_BUTTON:
|
case BIRCH_BUTTON:
|
||||||
@@ -7488,6 +7507,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7480,6 +7499,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case BIRCH_DOOR:
|
case BIRCH_DOOR:
|
||||||
case BIRCH_FENCE:
|
case BIRCH_FENCE:
|
||||||
case BIRCH_FENCE_GATE:
|
case BIRCH_FENCE_GATE:
|
||||||
@ -52,7 +52,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case BIRCH_LOG:
|
case BIRCH_LOG:
|
||||||
case BIRCH_PLANKS:
|
case BIRCH_PLANKS:
|
||||||
case BIRCH_PRESSURE_PLATE:
|
case BIRCH_PRESSURE_PLATE:
|
||||||
@@ -7528,6 +7548,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7520,6 +7540,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case DARK_OAK_DOOR:
|
case DARK_OAK_DOOR:
|
||||||
case DARK_OAK_FENCE:
|
case DARK_OAK_FENCE:
|
||||||
case DARK_OAK_FENCE_GATE:
|
case DARK_OAK_FENCE_GATE:
|
||||||
@ -60,7 +60,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case DARK_OAK_LOG:
|
case DARK_OAK_LOG:
|
||||||
case DARK_OAK_PLANKS:
|
case DARK_OAK_PLANKS:
|
||||||
case DARK_OAK_PRESSURE_PLATE:
|
case DARK_OAK_PRESSURE_PLATE:
|
||||||
@@ -7556,6 +7577,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7548,6 +7569,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case JUNGLE_DOOR:
|
case JUNGLE_DOOR:
|
||||||
case JUNGLE_FENCE:
|
case JUNGLE_FENCE:
|
||||||
case JUNGLE_FENCE_GATE:
|
case JUNGLE_FENCE_GATE:
|
||||||
@ -68,7 +68,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case JUNGLE_LOG:
|
case JUNGLE_LOG:
|
||||||
case JUNGLE_PLANKS:
|
case JUNGLE_PLANKS:
|
||||||
case JUNGLE_PRESSURE_PLATE:
|
case JUNGLE_PRESSURE_PLATE:
|
||||||
@@ -7587,6 +7609,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7579,6 +7601,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case MANGROVE_DOOR:
|
case MANGROVE_DOOR:
|
||||||
case MANGROVE_FENCE:
|
case MANGROVE_FENCE:
|
||||||
case MANGROVE_FENCE_GATE:
|
case MANGROVE_FENCE_GATE:
|
||||||
@ -76,7 +76,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case MANGROVE_LOG:
|
case MANGROVE_LOG:
|
||||||
case MANGROVE_PLANKS:
|
case MANGROVE_PLANKS:
|
||||||
case MANGROVE_PRESSURE_PLATE:
|
case MANGROVE_PRESSURE_PLATE:
|
||||||
@@ -7604,6 +7627,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7596,6 +7619,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case OAK_DOOR:
|
case OAK_DOOR:
|
||||||
case OAK_FENCE:
|
case OAK_FENCE:
|
||||||
case OAK_FENCE_GATE:
|
case OAK_FENCE_GATE:
|
||||||
@ -84,7 +84,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case OAK_LOG:
|
case OAK_LOG:
|
||||||
case OAK_PLANKS:
|
case OAK_PLANKS:
|
||||||
case OAK_PRESSURE_PLATE:
|
case OAK_PRESSURE_PLATE:
|
||||||
@@ -7633,6 +7657,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7625,6 +7649,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case SPRUCE_DOOR:
|
case SPRUCE_DOOR:
|
||||||
case SPRUCE_FENCE:
|
case SPRUCE_FENCE:
|
||||||
case SPRUCE_FENCE_GATE:
|
case SPRUCE_FENCE_GATE:
|
||||||
@ -92,7 +92,7 @@ index e5b94299793ba7cb9071a3f3a35ddbe08b0b9906..ee471fbd7c2138cd330b2c64da4e77b3
|
|||||||
case SPRUCE_LOG:
|
case SPRUCE_LOG:
|
||||||
case SPRUCE_PLANKS:
|
case SPRUCE_PLANKS:
|
||||||
case SPRUCE_PRESSURE_PLATE:
|
case SPRUCE_PRESSURE_PLATE:
|
||||||
@@ -7645,6 +7670,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -7637,6 +7662,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||||
case STICK:
|
case STICK:
|
||||||
case STRIPPED_ACACIA_LOG:
|
case STRIPPED_ACACIA_LOG:
|
||||||
case STRIPPED_ACACIA_WOOD:
|
case STRIPPED_ACACIA_WOOD:
|
||||||
|
@ -0,0 +1,93 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
Date: Tue, 7 Feb 2023 08:20:27 -0800
|
||||||
|
Subject: [PATCH] Fix HandlerList for InventoryBlockStartEvent subclasses
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/block/BrewingStartEvent.java b/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
|
||||||
|
index 9e54ef5b60bf5583c12e1edfa76f19013a5b2a65..fe6573d8fca0aa8d8f37f8b476fc45adc786795f 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
|
||||||
|
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
*/
|
||||||
|
public class BrewingStartEvent extends InventoryBlockStartEvent {
|
||||||
|
|
||||||
|
- private static final HandlerList handlers = new HandlerList();
|
||||||
|
+ // Paper - remove HandlerList
|
||||||
|
private int brewingTime;
|
||||||
|
|
||||||
|
public BrewingStartEvent(@NotNull final Block furnace, @NotNull ItemStack source, int brewingTime) {
|
||||||
|
@@ -36,14 +36,5 @@ public class BrewingStartEvent extends InventoryBlockStartEvent {
|
||||||
|
this.brewingTime = brewTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
- @NotNull
|
||||||
|
- @Override
|
||||||
|
- public HandlerList getHandlers() {
|
||||||
|
- return handlers;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @NotNull
|
||||||
|
- public static HandlerList getHandlerList() {
|
||||||
|
- return handlers;
|
||||||
|
- }
|
||||||
|
+ // Paper - remove HandlerList
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/block/CampfireStartEvent.java b/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
|
||||||
|
index 53119742beda00a38111063243665bb995ae2188..1f7a8bf65e9ac3188f759f9b3c4d6edbf255942a 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
|
||||||
|
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
*/
|
||||||
|
public class CampfireStartEvent extends InventoryBlockStartEvent {
|
||||||
|
|
||||||
|
- private static final HandlerList handlers = new HandlerList();
|
||||||
|
+ // Paper - remove HandlerList
|
||||||
|
private int cookingTime;
|
||||||
|
private CampfireRecipe campfireRecipe;
|
||||||
|
|
||||||
|
@@ -49,14 +49,5 @@ public class CampfireStartEvent extends InventoryBlockStartEvent {
|
||||||
|
this.cookingTime = cookTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
- @NotNull
|
||||||
|
- @Override
|
||||||
|
- public HandlerList getHandlers() {
|
||||||
|
- return handlers;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @NotNull
|
||||||
|
- public static HandlerList getHandlerList() {
|
||||||
|
- return handlers;
|
||||||
|
- }
|
||||||
|
+ // Paper - remove HandlerList
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||||
|
index 1e55f50f04de78ae0b8832a8021ffc7327676e8e..e6ebc17c438f231d67e44a5390d06a8dafba6dfd 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||||
|
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
* Called when a Furnace starts smelting.
|
||||||
|
*/
|
||||||
|
public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||||
|
- private static final HandlerList handlers = new HandlerList();
|
||||||
|
+ // Paper - remove HandlerList
|
||||||
|
private final CookingRecipe<?> recipe;
|
||||||
|
private int totalCookTime;
|
||||||
|
|
||||||
|
@@ -56,14 +56,5 @@ public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||||
|
this.totalCookTime = cookTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
- @NotNull
|
||||||
|
- @Override
|
||||||
|
- public HandlerList getHandlers() {
|
||||||
|
- return handlers;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @NotNull
|
||||||
|
- public static HandlerList getHandlerList() {
|
||||||
|
- return handlers;
|
||||||
|
- }
|
||||||
|
+ // Paper - remove HandlerList
|
||||||
|
}
|
@ -7618,13 +7618,13 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 5499bdbd0d5e81f2e7dcf784eb80217082090010..ef2640eb9e98e9ce81abc604cc1c2264e0137ef6 100644
|
index 8ded1f61a6088cf57847a409421e92e2d2007158..b39ded554ee86bf840ce04eba58ac19d40226c9f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -99,8 +99,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -102,8 +102,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
|
private static final BiMap<net.minecraft.world.level.material.Fluid, Fluid> FLUIDTYPE_FLUID = HashBiMap.create();
|
||||||
private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>();
|
private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>();
|
||||||
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
|
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
|
||||||
private static final Map<Material, net.minecraft.world.level.material.Fluid> MATERIAL_FLUID = new HashMap<>();
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ private static final Map<org.bukkit.entity.EntityType, net.minecraft.world.entity.EntityType<?>> ENTITY_TYPE_ENTITY_TYPES = new HashMap<>();
|
+ private static final Map<org.bukkit.entity.EntityType, net.minecraft.world.entity.EntityType<?>> ENTITY_TYPE_ENTITY_TYPES = new HashMap<>();
|
||||||
+ private static final Map<net.minecraft.world.entity.EntityType<?>, org.bukkit.entity.EntityType> ENTITY_TYPES_ENTITY_TYPE = new HashMap<>();
|
+ private static final Map<net.minecraft.world.entity.EntityType<?>, org.bukkit.entity.EntityType> ENTITY_TYPES_ENTITY_TYPE = new HashMap<>();
|
||||||
@ -7639,7 +7639,7 @@ index 5499bdbd0d5e81f2e7dcf784eb80217082090010..ef2640eb9e98e9ce81abc604cc1c2264
|
|||||||
for (Block block : BuiltInRegistries.BLOCK) {
|
for (Block block : BuiltInRegistries.BLOCK) {
|
||||||
BLOCK_MATERIAL.put(block, Material.getMaterial(BuiltInRegistries.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT)));
|
BLOCK_MATERIAL.put(block, Material.getMaterial(BuiltInRegistries.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT)));
|
||||||
}
|
}
|
||||||
@@ -166,6 +175,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -167,6 +176,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public static ResourceLocation key(Material mat) {
|
public static ResourceLocation key(Material mat) {
|
||||||
return CraftNamespacedKey.toMinecraft(mat.getKey());
|
return CraftNamespacedKey.toMinecraft(mat.getKey());
|
||||||
}
|
}
|
||||||
|
@ -4563,10 +4563,10 @@ index 78ea79b66cc9e90402ef5cdc2e5e04e0c74b1c26..4fede2161792ba3e7cdf0cc5a1f53318
|
|||||||
|
|
||||||
boolean hadFormat = false;
|
boolean hadFormat = false;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index ef2640eb9e98e9ce81abc604cc1c2264e0137ef6..92cf1be3a9e188307e6d4e8e710fa67af2bafa9d 100644
|
index b39ded554ee86bf840ce04eba58ac19d40226c9f..750f4b3930278c291f10015c7a8a8df57d04a286 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -68,6 +68,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -72,6 +72,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
|
|
||||||
private CraftMagicNumbers() {}
|
private CraftMagicNumbers() {}
|
||||||
|
|
||||||
|
@ -2021,10 +2021,10 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 92cf1be3a9e188307e6d4e8e710fa67af2bafa9d..c25f893ef1215a22c8bfa575e4711b9c92a25f0b 100644
|
index 750f4b3930278c291f10015c7a8a8df57d04a286..702ab12f93e422b1ba9d544084fa7712e776c751 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -221,6 +221,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -222,6 +222,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
@ -2037,8 +2037,8 @@ index 92cf1be3a9e188307e6d4e8e710fa67af2bafa9d..c25f893ef1215a22c8bfa575e4711b9c
|
|||||||
|
|
||||||
public static byte toLegacyData(BlockState data) {
|
public static byte toLegacyData(BlockState data) {
|
||||||
return CraftLegacy.toLegacyData(data);
|
return CraftLegacy.toLegacyData(data);
|
||||||
@@ -413,6 +419,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -437,6 +443,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CreativeCategory.BUILDING_BLOCKS; // TODO: Figure out what to do with this
|
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..351159bbdb0c8045f4983f54dee34430
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index c25f893ef1215a22c8bfa575e4711b9c92a25f0b..176d5bdc5bf048940ceb46dd0a69d9fb7d39821f 100644
|
index 702ab12f93e422b1ba9d544084fa7712e776c751..cbb161e3daa0250ae2e12e3cec972708fccaeadc 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -424,6 +424,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -448,6 +448,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public String getTimingsServerName() {
|
public String getTimingsServerName() {
|
||||||
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
|
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion()
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 176d5bdc5bf048940ceb46dd0a69d9fb7d39821f..9c189cc0596301c16e84f7df39b983a4392583d2 100644
|
index cbb161e3daa0250ae2e12e3cec972708fccaeadc..4d74e7755d3812746d9e9014046c5c22f400deec 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -429,6 +429,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -453,6 +453,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||||
return new com.destroystokyo.paper.PaperVersionFetcher();
|
return new com.destroystokyo.paper.PaperVersionFetcher();
|
||||||
}
|
}
|
||||||
|
@ -26,10 +26,10 @@ index 5bba39a066ede470cebc92724735c86ecfd4239d..c53b80cba9ea658d20e527a9bfcd6b5d
|
|||||||
// Paper start
|
// Paper start
|
||||||
protected boolean shapeExceedsCube = true;
|
protected boolean shapeExceedsCube = true;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
index 953fe30e445885809caa16161262089a7786057b..6182ce8c32a334d3488c03f42bf3befcc0b80503 100644
|
index 919a8a5ff0129a17f7f2b04aefe104d942da6e17..198a3f04ad6864460b9e7dd42444fab423a4ad8f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
@@ -542,7 +542,17 @@ public class CraftBlockData implements BlockData {
|
@@ -545,7 +545,17 @@ public class CraftBlockData implements BlockData {
|
||||||
return craft;
|
return craft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,12 +50,12 @@ index 0000000000000000000000000000000000000000..c5b07ec346105d1b95c1c938ffca12a2
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 13da02b84d7e748d61fdf5db01d92a8d8cd5c799..2e3b675dca8cec906d533141e158e5db6ae87042 100644
|
index 0951e0836ef16c99505c884ea80e5bd23873b7e6..ee8315595faae22c63c97748d8047038a671263e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -646,4 +646,16 @@ public class CraftBlock implements Block {
|
@@ -647,4 +647,16 @@ public class CraftBlock implements Block {
|
||||||
|
public String getTranslationKey() {
|
||||||
return iblockdata.canSurvive(world, this.position);
|
return this.getNMS().getBlock().getDescriptionId();
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
|||||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 9c189cc0596301c16e84f7df39b983a4392583d2..7a017d69bec0fb1e17c47d7edcfce4b1c6836693 100644
|
index 4d74e7755d3812746d9e9014046c5c22f400deec..10c26e104827502cc40488455af3f493f4ddb4f1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -434,6 +434,52 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -458,6 +458,52 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public boolean isSupportedApiVersion(String apiVersion) {
|
public boolean isSupportedApiVersion(String apiVersion) {
|
||||||
return apiVersion != null && SUPPORTED_API.contains(apiVersion);
|
return apiVersion != null && SUPPORTED_API.contains(apiVersion);
|
||||||
}
|
}
|
||||||
|
@ -10,22 +10,17 @@ public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/Fir
|
|||||||
Co-authored-by: MeFisto94 <MeFisto94@users.noreply.github.com>
|
Co-authored-by: MeFisto94 <MeFisto94@users.noreply.github.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 3123a8d52236757c3e7ca3b099cc664485cb3c72..eba015c33dcf63ff85569eb7ee7e6b3def2b05ac 100644
|
index ac543a4c6bc21435de3c6721af37fd5f554e403e..1f780a326f4982d4be1855516fb1461b4d90bcc6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -693,5 +693,15 @@ public class CraftBlock implements Block {
|
@@ -694,5 +694,10 @@ public class CraftBlock implements Block {
|
||||||
public org.bukkit.SoundGroup getBlockSoundGroup() {
|
public org.bukkit.SoundGroup getBlockSoundGroup() {
|
||||||
return org.bukkit.craftbukkit.CraftSoundGroup.getSoundGroup(this.getNMS().getSoundType());
|
return org.bukkit.craftbukkit.CraftSoundGroup.getSoundGroup(this.getNMS().getSoundType());
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public String getTranslationKey() {
|
|
||||||
+ return this.translationKey();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public String translationKey() {
|
+ public String translationKey() {
|
||||||
+ return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
+ return this.getNMS().getBlock().getDescriptionId();
|
||||||
+ }
|
+ }
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
@ -45,41 +40,6 @@ index e8334e2264510f5101e80b4f130e7ae1442560d7..57decf4156f176ebcc988478c17856cb
|
|||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
||||||
index 7a017d69bec0fb1e17c47d7edcfce4b1c6836693..d85526b8ddd26b2113dd8df7bf2d58ff432d86bc 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
||||||
@@ -480,6 +480,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
||||||
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
|
|
||||||
return compound;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public String getTranslationKey(Material mat) {
|
|
||||||
+ if (mat.isBlock()) {
|
|
||||||
+ return getBlock(mat).getDescriptionId();
|
|
||||||
+ }
|
|
||||||
+ return getItem(mat).getDescriptionId();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public String getTranslationKey(org.bukkit.block.Block block) {
|
|
||||||
+ return ((org.bukkit.craftbukkit.block.CraftBlock)block).getNMS().getBlock().getDescriptionId();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public String getTranslationKey(org.bukkit.entity.EntityType type) {
|
|
||||||
+ return net.minecraft.world.entity.EntityType.byString(type.getName()).map(net.minecraft.world.entity.EntityType::getDescriptionId).orElse(null);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public String getTranslationKey(org.bukkit.inventory.ItemStack itemStack) {
|
|
||||||
+ net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
|
||||||
+ return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
|
||||||
+ }
|
|
||||||
// Paper end
|
|
||||||
|
|
||||||
/**
|
|
||||||
diff --git a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
|
diff --git a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
|
||||||
index fab3063fffa959ac7f0eb5937f2fae94d11b6591..4cc8ca5dd95e9cccd08ada057a9592a1421f434a 100644
|
index fab3063fffa959ac7f0eb5937f2fae94d11b6591..4cc8ca5dd95e9cccd08ada057a9592a1421f434a 100644
|
||||||
--- a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
|
--- a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
|
||||||
|
@ -17,10 +17,10 @@ index 8e101269ca2edf5f3cc9c1ccedd03afaf1392d19..8ce413404930cca3a470bb58d73b9bd0
|
|||||||
|
|
||||||
if (this.isSameThread()) {
|
if (this.isSameThread()) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
index 6182ce8c32a334d3488c03f42bf3befcc0b80503..45c90505c778bfdebf0884190a422d12a0673d71 100644
|
index 198a3f04ad6864460b9e7dd42444fab423a4ad8f..14b8d0754955747d5a755eaf628e861929f5f47f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
@@ -509,9 +509,39 @@ public class CraftBlockData implements BlockData {
|
@@ -512,9 +512,39 @@ public class CraftBlockData implements BlockData {
|
||||||
Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
|
Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,14 +21,15 @@ index 873206bb65b2412d3066a0f7e35fe0684e29661a..d170254265a789998be96ce1dcaf71c9
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index d85526b8ddd26b2113dd8df7bf2d58ff432d86bc..0fc844b717a466e7ac0438bbf04371bba6a19ee2 100644
|
index 10c26e104827502cc40488455af3f493f4ddb4f1..97de89745a8bd6526a136506c6d17e5056a9d8d9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -504,6 +504,10 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -504,6 +504,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
|
||||||
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
return compound;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
+ @Override
|
||||||
+ public int nextEntityId() {
|
+ public int nextEntityId() {
|
||||||
+ return net.minecraft.world.entity.Entity.nextEntityId();
|
+ return net.minecraft.world.entity.Entity.nextEntityId();
|
||||||
+ }
|
+ }
|
||||||
|
@ -41,7 +41,7 @@ index 484e5d5a2793d18eb49b73898d944776a1ec48e8..05512cc19eb213b6be5c869e133376ee
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index eba015c33dcf63ff85569eb7ee7e6b3def2b05ac..01827f2398cec6e18ab490e664360beed9dbca83 100644
|
index 1f780a326f4982d4be1855516fb1461b4d90bcc6..998cb47c4d3d1c67467469e661f80d231d17c04a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -226,7 +226,7 @@ public class CraftBlock implements Block {
|
@@ -226,7 +226,7 @@ public class CraftBlock implements Block {
|
||||||
@ -67,10 +67,10 @@ index 0a755f38fae9dc84440f43113920c5b4c6d8218b..7b9e943b391c061782fccd2b8d705cee
|
|||||||
|
|
||||||
public void setFlag(int flag) {
|
public void setFlag(int flag) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
index 45c90505c778bfdebf0884190a422d12a0673d71..3399e8cdf2230bd71444abb43829c54d7277ce36 100644
|
index 14b8d0754955747d5a755eaf628e861929f5f47f..7acf213194f61d04cffabaaee6c1372bfa2e1933 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||||
@@ -50,7 +50,7 @@ public class CraftBlockData implements BlockData {
|
@@ -53,7 +53,7 @@ public class CraftBlockData implements BlockData {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Material getMaterial() {
|
public Material getMaterial() {
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix item locations dropped from campfires
|
|||||||
Fixes #4259 by not flooring the blockposition among other weirdness
|
Fixes #4259 by not flooring the blockposition among other weirdness
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
index 9ef6b391268a99303aa853623d43c96073a13c9e..c6ae14009463b2d64acd4d3beb86d3233bcbae66 100644
|
index 683958d65e4b926231b68c68744af13ef18fba8a..b07b83f4c16e85304b5da7a245810dd2741398e7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
@@ -79,7 +79,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -81,7 +81,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
result = blockCookEvent.getResult();
|
result = blockCookEvent.getResult();
|
||||||
itemstack1 = CraftItemStack.asNMSCopy(result);
|
itemstack1 = CraftItemStack.asNMSCopy(result);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -15,10 +15,10 @@ manually reload the advancement data for all players, which
|
|||||||
normally takes place as a part of the datapack reloading.
|
normally takes place as a part of the datapack reloading.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 0fc844b717a466e7ac0438bbf04371bba6a19ee2..00cffc8666cc5e0694da2a3d2a2efab457781374 100644
|
index 97de89745a8bd6526a136506c6d17e5056a9d8d9..4b7afdfea75e1023f68c1f9dbaf2db23010a0c30 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -344,7 +344,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -345,7 +345,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
|
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Add Destroy Speed API
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 01827f2398cec6e18ab490e664360beed9dbca83..ac831b22930ad02951186b6326b0c542de4c9881 100644
|
index 998cb47c4d3d1c67467469e661f80d231d17c04a..c3ab1a60f60806e2b91b633bf89389cf434443ce 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -703,5 +703,26 @@ public class CraftBlock implements Block {
|
@@ -699,5 +699,26 @@ public class CraftBlock implements Block {
|
||||||
public String translationKey() {
|
public String translationKey() {
|
||||||
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
return this.getNMS().getBlock().getDescriptionId();
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -205,10 +205,10 @@ index 04137173ca7034b9dff37a68518e8b6fb0330188..9b1bde95e8303e5d4adfe92f09240df8
|
|||||||
// Paper start
|
// Paper start
|
||||||
if (Thread.currentThread() != this.serverThread) {
|
if (Thread.currentThread() != this.serverThread) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 00cffc8666cc5e0694da2a3d2a2efab457781374..2ba9cac66413ddc0a830dbb2b2644ed9d40c9c99 100644
|
index 4b7afdfea75e1023f68c1f9dbaf2db23010a0c30..c375ad0211ea5f3a1a80944a920d4e394b06f7f6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -514,6 +514,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -515,6 +515,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public int nextEntityId() {
|
public int nextEntityId() {
|
||||||
return net.minecraft.world.entity.Entity.nextEntityId();
|
return net.minecraft.world.entity.Entity.nextEntityId();
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ index 00cffc8666cc5e0694da2a3d2a2efab457781374..2ba9cac66413ddc0a830dbb2b2644ed9
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
index a18b0bd17ec3dd021136ec873d93692fffa74dad..a41c386a60d004f065d837aaf10d1d6c0e2f8976 100644
|
index 3d9ece71fecd5151bb3862282f6021df2d73e3dc..b71602a088de181296dcabed0ac3a2b193ed15e6 100644
|
||||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
@@ -49,6 +49,15 @@ public abstract class AbstractTestingBase {
|
@@ -49,6 +49,15 @@ public abstract class AbstractTestingBase {
|
||||||
|
@ -18,10 +18,10 @@ index 34e375ab81b539ece769c943768342dbb542d0bb..0aa436da54050db81bdcb9f447660a88
|
|||||||
|
|
||||||
if (furnaceSmeltEvent.isCancelled()) {
|
if (furnaceSmeltEvent.isCancelled()) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
index c6ae14009463b2d64acd4d3beb86d3233bcbae66..06df710f58ca7d55b19c0db9d393a73ca6e5aa79 100644
|
index b07b83f4c16e85304b5da7a245810dd2741398e7..0f7e765263a09a3f8b021bbac8d062c72ab3bdc0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
@@ -60,7 +60,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -62,7 +62,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
|
|
||||||
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
|
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
|
||||||
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
|
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
|
||||||
@ -32,7 +32,7 @@ index c6ae14009463b2d64acd4d3beb86d3233bcbae66..06df710f58ca7d55b19c0db9d393a73c
|
|||||||
return recipecampfire.assemble(inventorysubcontainer);
|
return recipecampfire.assemble(inventorysubcontainer);
|
||||||
}).orElse(itemstack);
|
}).orElse(itemstack);
|
||||||
|
|
||||||
@@ -69,7 +71,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -71,7 +73,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
|
CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
|
||||||
org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
|
org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Block#isValidTool
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 30b5a78a93405f3a03624ed1331670770aaa3765..974ab329f92f488aba0999cef25e3b8e7e062209 100644
|
index 23a9469ff63f1be7ab0091b2c86a614eaeba9f55..e8d96c1e5dde67436fba1bfc6585c3e4a5c1a63c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -743,5 +743,9 @@ public class CraftBlock implements Block {
|
@@ -739,5 +739,9 @@ public class CraftBlock implements Block {
|
||||||
}
|
}
|
||||||
return speed;
|
return speed;
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,10 @@ index 6c2ea3e0cf385d6893faf5430b29dbe2589786b0..2dbfd750088dbf7a15fc147d9f215c19
|
|||||||
// Check if a World already exists with the UID.
|
// Check if a World already exists with the UID.
|
||||||
if (this.getWorld(world.getUID()) != null) {
|
if (this.getWorld(world.getUID()) != null) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 2ba9cac66413ddc0a830dbb2b2644ed9d40c9c99..4b8642d20341067ee149fbe9a23e64042127a2b2 100644
|
index c375ad0211ea5f3a1a80944a920d4e394b06f7f6..abb860bb13774c93f2e87d81b0665225672cda5d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -519,6 +519,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -520,6 +520,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public <T extends org.bukkit.Keyed> Registry<T> registryFor(Class<T> classOfT) {
|
public <T extends org.bukkit.Keyed> Registry<T> registryFor(Class<T> classOfT) {
|
||||||
return io.papermc.paper.registry.PaperRegistry.getRegistry(classOfT);
|
return io.papermc.paper.registry.PaperRegistry.getRegistry(classOfT);
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Item Rarity API
|
|||||||
public net.minecraft.world.item.Item rarity
|
public net.minecraft.world.item.Item rarity
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 4b8642d20341067ee149fbe9a23e64042127a2b2..f31723187a7189cf1c9213f74f094ad196421a80 100644
|
index abb860bb13774c93f2e87d81b0665225672cda5d..d0d851dff3a42939ca4591fdf7e7afcdc728ff13 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -524,6 +524,20 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -525,6 +525,20 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public String getMainLevelName() {
|
public String getMainLevelName() {
|
||||||
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
|
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index f31723187a7189cf1c9213f74f094ad196421a80..46be2c75d68abaccc78e2120a0f45d344050c76d 100644
|
index d0d851dff3a42939ca4591fdf7e7afcdc728ff13..a61f42ddf4bcd00294a1aa050c9dc50d67379c44 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -538,6 +538,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -539,6 +539,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
||||||
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 46be2c75d68abaccc78e2120a0f45d344050c76d..d7ebb29138352661f4fb3fb4561d96dab812b1b7 100644
|
index a61f42ddf4bcd00294a1aa050c9dc50d67379c44..7aaa292f6495a9431687617251cae726675f063a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -539,6 +539,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -540,6 +540,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index d7ebb29138352661f4fb3fb4561d96dab812b1b7..ec49b0719491f52057818a6fc2b4d3f16c7fc440 100644
|
index 7aaa292f6495a9431687617251cae726675f063a..9a5ac0794cca60b6457e15caf797c506719877a3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -547,6 +547,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -548,6 +548,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
|
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..cf9d28ea97d93cec05c9fb768d59e283
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index ec49b0719491f52057818a6fc2b4d3f16c7fc440..30ac1162851331526f3fc00332eded67be48e1d4 100644
|
index 9a5ac0794cca60b6457e15caf797c506719877a3..690d2ddff8b0cb31d35f2c3b4a26b6e92ce686da 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -564,6 +564,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -565,6 +565,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public int getProtocolVersion() {
|
public int getProtocolVersion() {
|
||||||
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add isCollidable methods to various places
|
|||||||
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
|
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 60aa47a78b9d5921dffd1e205c0b69f453a94851..b7496922faee8bc5d82f3f5922f6fb2fe44a8d2f 100644
|
index 4cfefcd6dc1ccdc9ecc52c9965fef5a3e339f862..5343ae3cdda55d7e0b41747c7eccb52e6828f6c9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -482,6 +482,11 @@ public class CraftBlock implements Block {
|
@@ -482,6 +482,11 @@ public class CraftBlock implements Block {
|
||||||
@ -39,10 +39,10 @@ index 7b9e943b391c061782fccd2b8d705ceec8db50fe..966ac60daebb7bb211ab8096fc0c5f33
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 30ac1162851331526f3fc00332eded67be48e1d4..abffb2328a0a85a6a5c664d58d2738b833b9431d 100644
|
index 690d2ddff8b0cb31d35f2c3b4a26b6e92ce686da..594828d3d395899bbb2c05e34911ad763393461a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -576,6 +576,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -577,6 +577,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
|
var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
|
||||||
return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
|
return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,10 @@ index f1ee89047e8cd916c762b91162842e3f981856b3..726a4ae7ab928eda3ae1c1e98f342157
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index abffb2328a0a85a6a5c664d58d2738b833b9431d..90dbc63a7472b923ed4faca5ac52f9438126fa63 100644
|
index 594828d3d395899bbb2c05e34911ad763393461a..34e4d36024900ae174170c0a0f18b8dda8dd52f2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -459,6 +459,29 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -483,6 +483,29 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of(ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ITEM_STACK, compound, dataVersion, getDataVersion())));
|
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of(ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ITEM_STACK, compound, dataVersion, getDataVersion())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add more Campfire API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
index 06df710f58ca7d55b19c0db9d393a73ca6e5aa79..830326496e2f961682daadc7a7859247042b4cdd 100644
|
index 0f7e765263a09a3f8b021bbac8d062c72ab3bdc0..01d8f1c985223eec83beb4a84a710d1bf8d70849 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||||
@@ -39,6 +39,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -41,6 +41,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
public final int[] cookingProgress;
|
public final int[] cookingProgress;
|
||||||
public final int[] cookingTime;
|
public final int[] cookingTime;
|
||||||
private final RecipeManager.CachedCheck<Container, CampfireCookingRecipe> quickCheck;
|
private final RecipeManager.CachedCheck<Container, CampfireCookingRecipe> quickCheck;
|
||||||
@ -16,7 +16,7 @@ index 06df710f58ca7d55b19c0db9d393a73ca6e5aa79..830326496e2f961682daadc7a7859247
|
|||||||
|
|
||||||
public CampfireBlockEntity(BlockPos pos, BlockState state) {
|
public CampfireBlockEntity(BlockPos pos, BlockState state) {
|
||||||
super(BlockEntityType.CAMPFIRE, pos, state);
|
super(BlockEntityType.CAMPFIRE, pos, state);
|
||||||
@@ -46,6 +47,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -48,6 +49,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
this.cookingProgress = new int[4];
|
this.cookingProgress = new int[4];
|
||||||
this.cookingTime = new int[4];
|
this.cookingTime = new int[4];
|
||||||
this.quickCheck = RecipeManager.createCheck(RecipeType.CAMPFIRE_COOKING);
|
this.quickCheck = RecipeManager.createCheck(RecipeType.CAMPFIRE_COOKING);
|
||||||
@ -24,7 +24,7 @@ index 06df710f58ca7d55b19c0db9d393a73ca6e5aa79..830326496e2f961682daadc7a7859247
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void cookTick(Level world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) {
|
public static void cookTick(Level world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) {
|
||||||
@@ -56,7 +58,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -58,7 +60,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
|
|
||||||
if (!itemstack.isEmpty()) {
|
if (!itemstack.isEmpty()) {
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -34,7 +34,7 @@ index 06df710f58ca7d55b19c0db9d393a73ca6e5aa79..830326496e2f961682daadc7a7859247
|
|||||||
|
|
||||||
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
|
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
|
||||||
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
|
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
|
||||||
@@ -165,6 +169,16 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -167,6 +171,16 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
System.arraycopy(aint, 0, this.cookingTime, 0, Math.min(this.cookingTime.length, aint.length));
|
System.arraycopy(aint, 0, this.cookingTime, 0, Math.min(this.cookingTime.length, aint.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ index 06df710f58ca7d55b19c0db9d393a73ca6e5aa79..830326496e2f961682daadc7a7859247
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -173,6 +187,13 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
@@ -175,6 +189,13 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||||
ContainerHelper.saveAllItems(nbt, this.items, true);
|
ContainerHelper.saveAllItems(nbt, this.items, true);
|
||||||
nbt.putIntArray("CookingTimes", this.cookingProgress);
|
nbt.putIntArray("CookingTimes", this.cookingProgress);
|
||||||
nbt.putIntArray("CookingTotalTimes", this.cookingTime);
|
nbt.putIntArray("CookingTotalTimes", this.cookingTime);
|
||||||
|
@ -151,10 +151,10 @@ index 421c2131fec0b7266c773c3f1983308f6921df6b..12d9556a11ac4ef2e7a62fcd2686d868
|
|||||||
addContainer(Items.POTION);
|
addContainer(Items.POTION);
|
||||||
addContainer(Items.SPLASH_POTION);
|
addContainer(Items.SPLASH_POTION);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||||
index 3d688e334c7287f41460bd866bfd1155e8bb55d2..55006724ccec9f3de828ec18693728e9741ff65f 100644
|
index cf2b6487a640a7a613f3b3604ca7b1063b3ff102..0bab2693b91d5bab222c7db8bc6965ccde954003 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||||
@@ -335,7 +335,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
@@ -340,7 +340,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlaceItem(int slot, ItemStack stack) {
|
public boolean canPlaceItem(int slot, ItemStack stack) {
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
||||||
Date: Tue, 1 Mar 2022 12:45:50 -0800
|
|
||||||
Subject: [PATCH] Fix Fluid tags isTagged method
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
||||||
index 89cb1ec575c0f58e9934d98b056621348dbbe27a..cdd474e9b0363641839a66d3e61fec46c735879a 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
||||||
@@ -16,7 +16,7 @@ public class CraftFluidTag extends CraftTag<net.minecraft.world.level.material.F
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isTagged(Fluid fluid) {
|
|
||||||
- return CraftMagicNumbers.getFluid(fluid).is(tag);
|
|
||||||
+ return registry.getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.Registry.FLUID_REGISTRY, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(fluid.getKey()))).is(tag); // Paper
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
||||||
index 90dbc63a7472b923ed4faca5ac52f9438126fa63..73e82653e0a68560c25ae41ade4c58111cbcd276 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
||||||
@@ -205,7 +205,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
||||||
return CraftMagicNumbers.MATERIAL_BLOCK.get(material);
|
|
||||||
}
|
|
||||||
|
|
||||||
- public static net.minecraft.world.level.material.Fluid getFluid(Fluid fluid) {
|
|
||||||
+ public static net.minecraft.world.level.material.Fluid getFluid(Material fluid) { // Paper - wrong type
|
|
||||||
return CraftMagicNumbers.MATERIAL_FLUID.get(fluid);
|
|
||||||
}
|
|
||||||
|
|
@ -23,7 +23,7 @@ index e365081bf532488f2b41b22deb2fb2346d4f2322..446657577aa843e6ebc5143b6c511f33
|
|||||||
public void setBiome(Location location, Biome biome) {
|
public void setBiome(Location location, Biome biome) {
|
||||||
this.setBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ(), biome);
|
this.setBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ(), biome);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index b7496922faee8bc5d82f3f5922f6fb2fe44a8d2f..0976a1295be35dd7c053fb4ee4050011fc3d95fe 100644
|
index 5343ae3cdda55d7e0b41747c7eccb52e6828f6c9..69d1c21a5c1007ae65f86b130c421f3f9540da2d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -343,6 +343,13 @@ public class CraftBlock implements Block {
|
@@ -343,6 +343,13 @@ public class CraftBlock implements Block {
|
@ -5,7 +5,7 @@ Subject: [PATCH] cache resource keys
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 0976a1295be35dd7c053fb4ee4050011fc3d95fe..87dfc2fd1e2ff9e9449f1ce00dfb63e3e88839cd 100644
|
index 69d1c21a5c1007ae65f86b130c421f3f9540da2d..0d30b388d8d93a6dbbf8dfb30d26eb44c73e1e4e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -368,12 +368,13 @@ public class CraftBlock implements Block {
|
@@ -368,12 +368,13 @@ public class CraftBlock implements Block {
|
||||||
@ -38,20 +38,4 @@ index e0bf615fb1b99abbab2be55a4ee345204b36e218..7b3b12b4b2f5dbd37e23a7f5a0ad2abd
|
|||||||
+ return registry.getHolderOrThrow(KEY_CACHE.computeIfAbsent(entity, type -> ResourceKey.create(Registries.ENTITY_TYPE, CraftNamespacedKey.toMinecraft(type.getKey())))).is(tag); // Paper - cache key
|
+ return registry.getHolderOrThrow(KEY_CACHE.computeIfAbsent(entity, type -> ResourceKey.create(Registries.ENTITY_TYPE, CraftNamespacedKey.toMinecraft(type.getKey())))).is(tag); // Paper - cache key
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
||||||
index cdd474e9b0363641839a66d3e61fec46c735879a..1a987b3c8f044dfd217e984dc122582095367e46 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
|
|
||||||
@@ -14,9 +14,10 @@ public class CraftFluidTag extends CraftTag<net.minecraft.world.level.material.F
|
|
||||||
super(registry, tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ private static final java.util.Map<Fluid, net.minecraft.resources.ResourceKey<net.minecraft.world.level.material.Fluid>> KEY_CACHE = Collections.synchronizedMap(new java.util.EnumMap<>(Fluid.class)); // Paper
|
|
||||||
@Override
|
|
||||||
public boolean isTagged(Fluid fluid) {
|
|
||||||
- return registry.getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.Registry.FLUID_REGISTRY, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(fluid.getKey()))).is(tag); // Paper
|
|
||||||
+ return registry.getHolderOrThrow(KEY_CACHE.computeIfAbsent(fluid, f -> net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.FLUID, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(f.getKey())))).is(tag); // Paper - cache key
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user