4jcraft/Minecraft.World/Containers/EnchantmentSlot.h
2026-03-13 17:06:56 -05:00

18 lines
563 B
C++

#pragma once
// 4J Stu Added
// In EnchantmentMenu.java they create an anoymous class while creating some
// slot. I have moved the content of that anonymous class to here
#include "Slot.h"
class Container;
class EnchantmentSlot : public Slot {
public:
EnchantmentSlot(std::shared_ptr<Container> container, int id, int x, int y)
: Slot(container, id, x, y) {}
virtual bool mayPlace(std::shared_ptr<ItemInstance> item) { return true; }
virtual bool mayCombine(std::shared_ptr<ItemInstance> item) {
return false;
} // 4J Added
};