Предмет, помещаемый в нижние слоты зельеварки

Версия Minecraft
1.16.5
API
Forge
198
1
24
Как можно создать предмет, который будет "влезать" в нижние слоты зельеварки? Смотрел в PotionItem, не нашёл. Бутылёк воды и дыхание дракона вообще не могу найти. Например, вот у меня тут есть кровь эндермена, в игре она отображается нормально и даёт эффект как от хоруса, но вот в зельеварку вниз не лезет:

Кровь эндермена:
public class ItemEndermanBlood extends Item {
    public ItemEndermanBlood() {
        super(new Properties()
                .food(new Food.Builder()
                        .alwaysEat()
                        .build())
                .tab(Zombienation.CREATIVE_TAB));


    }

    @Override
    public ItemStack finishUsingItem(ItemStack stack, World worldIn, LivingEntity entity) {
        /* Chorus fruit teleportation code */
        if (!worldIn.isClientSide) {
            double d0 = entity.getX();
            double d1 = entity.getY();
            double d2 = entity.getZ();

            for(int i = 0; i < 16; ++i) {
                double d3 = entity.getX() + (entity.getRandom().nextDouble() - 0.5D) * 16.0D;
                double d4 = MathHelper.clamp(entity.getY() + (double)(entity.getRandom().nextInt(16) - 8), 0.0D, (double)(worldIn.getHeight() - 1));
                double d5 = entity.getZ() + (entity.getRandom().nextDouble() - 0.5D) * 16.0D;
                if (entity.isPassenger()) {
                    entity.stopRiding();
                }

                if (entity.randomTeleport(d3, d4, d5, true)) {
                    SoundEvent soundevent = entity instanceof FoxEntity ? SoundEvents.FOX_TELEPORT : SoundEvents.CHORUS_FRUIT_TELEPORT;
                    worldIn.playSound((PlayerEntity)null, d0, d1, d2, soundevent, SoundCategory.PLAYERS, 1.0F, 1.0F);
                    entity.playSound(soundevent, 1.0F, 1.0F);
                    break;
                }
            }

            if (entity instanceof PlayerEntity) {
                ((PlayerEntity)entity).getCooldowns().addCooldown(this, 20);
            }
        }
        /* End chorus fruit teleportation code */

        ItemHandlerHelper.giveItemToPlayer((PlayerEntity) entity, new ItemStack(Items.GLASS_BOTTLE,1));
        stack.shrink(1);
        return stack;
    }

    @Override
    public UseAction getUseAnimation(ItemStack p_77661_1_) {
        return UseAction.DRINK;
    }
}
 
Решение
Что именно можно положить в слот, определяется контейнером и методами этого слота. В данном случае тебе нужен класс
net.minecraft.inventory.container.BrewingStandContainer
в нём есть
Слоты:
this.addSlot(new BrewingStandContainer.PotionSlot(p_i50096_3_, 0, 56, 51));
this.addSlot(new BrewingStandContainer.PotionSlot(p_i50096_3_, 1, 79, 58));
this.addSlot(new BrewingStandContainer.PotionSlot(p_i50096_3_, 2, 102, 51));
this.ingredientSlot = this.addSlot(new BrewingStandContainer.IngredientSlot(p_i50096_3_, 3, 79, 17));
this.addSlot(new BrewingStandContainer.FuelSlot(p_i50096_3_, 4, 17, 17));
а в самих указанных слотах, собственно:
Java:
public boolean mayPlace(ItemStack stack) {
    return mayPlaceItem(stack);
}

public static boolean...

VeniVidiVici

Санта Барбарис
327
15
198
Что именно можно положить в слот, определяется контейнером и методами этого слота. В данном случае тебе нужен класс
net.minecraft.inventory.container.BrewingStandContainer
в нём есть
Слоты:
this.addSlot(new BrewingStandContainer.PotionSlot(p_i50096_3_, 0, 56, 51));
this.addSlot(new BrewingStandContainer.PotionSlot(p_i50096_3_, 1, 79, 58));
this.addSlot(new BrewingStandContainer.PotionSlot(p_i50096_3_, 2, 102, 51));
this.ingredientSlot = this.addSlot(new BrewingStandContainer.IngredientSlot(p_i50096_3_, 3, 79, 17));
this.addSlot(new BrewingStandContainer.FuelSlot(p_i50096_3_, 4, 17, 17));
а в самих указанных слотах, собственно:
Java:
public boolean mayPlace(ItemStack stack) {
    return mayPlaceItem(stack);
}

public static boolean mayPlaceItem(ItemStack stack) {
    return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(stack);
}
которые и отвечают за проверку того, можно стак положить, или нет.
 
Сверху