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> <dependency>
<groupId>com.github.DeadSilenceIV</groupId> <groupId>com.github.DeadSilenceIV</groupId>
<artifactId>AdvancedChestsAPI</artifactId> <artifactId>AdvancedChestsAPI</artifactId>
<version>1.8</version> <version>2.9-BETA</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

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