minecraft-source/src/net/minecraft/world/item/SignItem.java

25 lines
975 B
Java

package net.minecraft.world.item;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import javax.annotation.Nullable;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Block;
public class SignItem extends StandingAndWallBlockItem {
public SignItem(final Properties a, final Block bpe2, final Block bpe3) {
super(bpe2, bpe3, a);
}
@Override
protected boolean updateCustomBlockEntityTag(final BlockPos fk, final Level bjt, @Nullable final Player ayg, final ItemStack bek, final BlockState byg) {
final boolean boolean7 = super.updateCustomBlockEntityTag(fk, bjt, ayg, bek, byg);
if (!bjt.isClientSide && !boolean7 && ayg != null) {
ayg.openTextEdit((SignBlockEntity)bjt.getBlockEntity(fk));
}
return boolean7;
}
}