mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 15:28:03 +01:00
SPIGOT-4872: LootTables missing a few loot tables
This commit is contained in:
parent
40484a5fa0
commit
0d76f8658d
@ -66,9 +66,9 @@ will help to ensure the PR can be easily maintained over time and encourage the
|
|||||||
|
|
||||||
* There needs to be a new line at the end of every file.
|
* There needs to be a new line at the end of every file.
|
||||||
* Imports should be organised in a logical manner.
|
* Imports should be organised in a logical manner.
|
||||||
* Do not group packages unless already grouped.
|
* Do not group packages
|
||||||
* All new imports should be within existing CraftBukkit comments if any are present. If not, make them.
|
* All new imports should be within existing CraftBukkit comments if any are present. If not, make them.
|
||||||
* __Absolutely no wildcard imports.__
|
* __Absolutely no wildcard imports outside of tests.__
|
||||||
* If you only use an import once, don't import it. Use the fully qualified name.
|
* If you only use an import once, don't import it. Use the fully qualified name.
|
||||||
|
|
||||||
Any questions about these requirements can be asked in #spigot-dev in IRC.
|
Any questions about these requirements can be asked in #spigot-dev in IRC.
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.bukkit;
|
package org.bukkit;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftKey;
|
||||||
|
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||||
import org.bukkit.loot.LootTable;
|
import org.bukkit.loot.LootTable;
|
||||||
import org.bukkit.loot.LootTables;
|
import org.bukkit.loot.LootTables;
|
||||||
import org.bukkit.support.AbstractTestingBase;
|
import org.bukkit.support.AbstractTestingBase;
|
||||||
@ -19,4 +21,15 @@ public class LootTablesTest extends AbstractTestingBase {
|
|||||||
Assert.assertEquals(lootTable.getKey(), table.getKey());
|
Assert.assertEquals(lootTable.getKey(), table.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNMS() {
|
||||||
|
for (MinecraftKey key : net.minecraft.server.LootTables.a()) {
|
||||||
|
NamespacedKey bukkitKey = CraftNamespacedKey.fromMinecraft(key);
|
||||||
|
LootTables lootTable = Registry.LOOT_TABLES.get(bukkitKey);
|
||||||
|
|
||||||
|
Assert.assertNotNull("Unknown LootTable " + key, lootTable);
|
||||||
|
Assert.assertEquals(lootTable.getKey(), bukkitKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user