2025-11-24 22:52:51 +03:00

27 lines
887 B
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.world.item;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.decoration.HangingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.HangingEntityItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
public class ItemFrameItem
extends HangingEntityItem {
public ItemFrameItem(EntityType<? extends HangingEntity> entityType, Item.Properties properties) {
super(entityType, properties);
}
@Override
protected boolean mayPlace(Player player, Direction direction, ItemStack itemStack, BlockPos blockPos) {
return !player.level().isOutsideBuildHeight(blockPos) && player.mayUseItemAt(blockPos, direction, itemStack);
}
}