mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-25 02:17:35 +01:00
e1c0033552
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: 2b4b6d14 PR-1023: Convert InventoryView to interface CraftBukkit Changes: 68603b1c1 Use expanded interaction ranges for traced interact events eae9f760c PR-1414: Convert InventoryView to interface ee9eafe67 Fix Implementation for DamageSource#isIndirect for internal custom causing entity
47 lines
2.1 KiB
Diff
47 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Fri, 26 Apr 2024 17:00:00 -0700
|
|
Subject: [PATCH] Fix SpawnerEntry$Equipment API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java b/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java
|
|
index 02b3471774ff1fd4ad15c2f04064fd485ef8f3e5..0fc5f04b8bb475e8afce61c6187a390cd36c3d9f 100644
|
|
--- a/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java
|
|
+++ b/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java
|
|
@@ -121,28 +121,29 @@ public class SpawnerEntry {
|
|
private final Map<EquipmentSlot, Float> dropChances;
|
|
|
|
public Equipment(@NotNull LootTable equipmentLootTable, @NotNull Map<EquipmentSlot, Float> dropChances) {
|
|
+ Preconditions.checkArgument(equipmentLootTable != null, "table cannot be null"); // Paper
|
|
this.equipmentLootTable = equipmentLootTable;
|
|
this.dropChances = dropChances;
|
|
}
|
|
|
|
/**
|
|
- * Set the loot table for the entity.
|
|
+ * Set the loot table for the spawned entity's equipment slots.
|
|
* <br>
|
|
- * To remove a loot table use null. Do not use {@link LootTables#EMPTY}
|
|
- * to clear a LootTable.
|
|
+ * To remove a loot table use {@link LootTables#EMPTY}.
|
|
*
|
|
* @param table this {@link org.bukkit.entity.Mob} will have.
|
|
*/
|
|
public void setEquipmentLootTable(@NotNull LootTable table) {
|
|
+ Preconditions.checkArgument(table != null, "table cannot be null"); // Paper
|
|
this.equipmentLootTable = table;
|
|
}
|
|
|
|
/**
|
|
- * Gets the loot table for the entity.
|
|
+ * Gets the loot table for the spawned entity's equipment.
|
|
* <br>
|
|
*
|
|
- * If an entity does not have a loot table, this will return null, NOT
|
|
- * an empty loot table.
|
|
+ * If an entity does not have a loot table, this will return an
|
|
+ * empty loot table.
|
|
*
|
|
* @return the loot table for this entity.
|
|
*/
|