Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
cylian914 committed Dec 3, 2024
1 parent d5bcace commit 7a5ae1d
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ public InteractionResult useOn(UseOnContext context)
BlockEntity te = context.getLevel().getBlockEntity(context.getClickedPos());
ItemStack stack = context.getItemInHand();

if (te instanceof BannerBlockEntity || te instanceof TileEntityColonyFlag) {
if (te instanceof BannerBlockEntity || te instanceof TileEntityColonyFlag)
{
BannerPattern.Builder patternsBuilder = new BannerPattern.Builder();
List<Pair<Holder<BannerPattern>, DyeColor>> source;

if (te instanceof BannerBlockEntity) {
if (te instanceof BannerBlockEntity)
{
source = ((BannerBlockEntity) te).getPatterns();
}
else {
else
{
source = ((TileEntityColonyFlag) te).getPatterns();
}

Expand All @@ -74,9 +77,12 @@ public InteractionResult useOn(UseOnContext context)
@Override
public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List<Component> tooltip, TooltipFlag flagIn) {
CompoundTag tag = BlockItem.getBlockEntityData(stack);
if (tag != null && tag.contains(TAG_BANNER_PATTERNS)) {
if (tag != null && tag.contains(TAG_BANNER_PATTERNS))
{
super.appendHoverText(stack, worldIn, tooltip, flagIn);
} else {
}
else
{
tooltip.add(Component.translatable("com.minecolonies.coremod.item.colony_banner.tooltipempty"));
}
}
Expand Down

0 comments on commit 7a5ae1d

Please sign in to comment.