31 lines
926 B
Java
31 lines
926 B
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.world.item;
|
|
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.world.entity.player.Player;
|
|
import net.minecraft.world.item.Item;
|
|
import net.minecraft.world.item.SignApplicator;
|
|
import net.minecraft.world.level.Level;
|
|
import net.minecraft.world.level.block.entity.SignBlockEntity;
|
|
|
|
public class InkSacItem
|
|
extends Item
|
|
implements SignApplicator {
|
|
public InkSacItem(Item.Properties properties) {
|
|
super(properties);
|
|
}
|
|
|
|
@Override
|
|
public boolean tryApplyToSign(Level level, SignBlockEntity sign, boolean isFrontText, Player player) {
|
|
if (sign.updateText(text -> text.setHasGlowingText(false), isFrontText)) {
|
|
level.playSound(null, sign.getBlockPos(), SoundEvents.INK_SAC_USE, SoundSource.BLOCKS, 1.0f, 1.0f);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|