Skip to content

Commit

Permalink
为静音器添加影响范围
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuRuoLing committed Oct 6, 2024
1 parent 3e641b4 commit d153e7c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import dev.dubhe.anvilcraft.api.item.IDiskCloneable;
import dev.dubhe.anvilcraft.api.sound.SoundEventListener;
import dev.dubhe.anvilcraft.api.sound.SoundHelper;
import dev.dubhe.anvilcraft.api.tooltip.providers.IHasAffectRange;
import dev.dubhe.anvilcraft.block.ActiveSilencerBlock;
import dev.dubhe.anvilcraft.init.ModMenuTypes;
import dev.dubhe.anvilcraft.inventory.ActiveSilencerMenu;
Expand Down Expand Up @@ -42,7 +43,7 @@

public class ActiveSilencerBlockEntity
extends BlockEntity
implements MenuProvider, SoundEventListener, IDiskCloneable
implements MenuProvider, SoundEventListener, IDiskCloneable, IHasAffectRange
{
public static final Codec<List<ResourceLocation>> CODEC =
ResourceLocation.CODEC.listOf().fieldOf("mutedSound").codec();
Expand Down Expand Up @@ -150,4 +151,9 @@ public void applyDiskData(CompoundTag data) {
.getOrThrow()
.getFirst());
}

@Override
public AABB shape() {
return range;
}
}

0 comments on commit d153e7c

Please sign in to comment.