Skip to content

Commit

Permalink
Sync 1.20.1 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgazul committed May 11, 2024
1 parent 4629ff7 commit 730da1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import java.util.HashMap;
import java.util.List;
import java.util.ListIterator;
import java.util.Optional;

import com.mohistmc.banner.bukkit.BannerLecternInventory;
import net.minecraft.world.Container;
import net.minecraft.world.inventory.CraftingContainer;
import net.minecraft.world.inventory.MerchantContainer;
import net.minecraft.world.inventory.PlayerEnderChestContainer;
import net.minecraft.world.level.block.ComposterBlock;
import net.minecraft.world.level.block.JukeboxBlock;
import net.minecraft.world.level.block.entity.*;
import org.apache.commons.lang3.Validate;
import org.bukkit.Location;
Expand Down Expand Up @@ -500,7 +498,7 @@ public InventoryType getType() {
return InventoryType.STONECUTTER;
} else if (inventory instanceof ComposterBlock.EmptyContainer || inventory instanceof ComposterBlock.InputContainer || inventory instanceof ComposterBlock.OutputContainer) {
return InventoryType.COMPOSTER;
} else if (inventory instanceof JukeboxBlock) {
} else if (inventory instanceof JukeboxBlockEntity) {
return InventoryType.JUKEBOX;
} else if (this instanceof CraftInventorySmithingNew) {
return InventoryType.SMITHING_NEW;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ private ItemMeta getItemMeta(Material material, CraftMetaItem meta) {
case TURTLE_HELMET:
return meta != null && meta.getClass().equals(CraftMetaArmor.class) ? meta : new CraftMetaArmor(meta);
case LEATHER_HELMET:
case LEATHER_HORSE_ARMOR:
case LEATHER_CHESTPLATE:
case LEATHER_LEGGINGS:
case LEATHER_BOOTS:
return meta instanceof CraftMetaColorableArmor ? meta : new CraftMetaColorableArmor(meta);
case LEATHER_HORSE_ARMOR:
return meta instanceof CraftMetaLeatherArmor ? meta : new CraftMetaLeatherArmor(meta);
case POTION:
case SPLASH_POTION:
Expand Down

0 comments on commit 730da1b

Please sign in to comment.