Support for AdvancedChests was updated. (#266)

This commit is contained in:
DeadSilenceIV 2022-07-14 17:53:27 -05:00 committed by GitHub
parent 47053fde31
commit 90ae98e599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -209,7 +209,7 @@
<dependency>
<groupId>com.github.DeadSilenceIV</groupId>
<artifactId>AdvancedChestsAPI</artifactId>
<version>1.8</version>
<version>2.9-BETA</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -425,11 +425,11 @@ public class IslandLevelCalculator {
for (BlockState bs : chunk.getTileEntities()) {
if (bs instanceof Container) {
if (addon.isAdvChestEnabled()) {
AdvancedChest aChest = AdvancedChestsAPI.getChestManager().getAdvancedChest(bs.getLocation());
if (aChest != null) {
AdvancedChest<?,?> aChest = AdvancedChestsAPI.getChestManager().getAdvancedChest(bs.getLocation());
if (aChest != null && aChest.getChestType().getName().equals("NORMAL")) {
aChest.getPages().stream().map(ChestPage::getItems).forEach(c -> {
for (ItemStack i : c) {
countItemStack(i);
for (Object i : c) {
countItemStack((ItemStack)i);
}
});
continue;