new Style.setColor -> applyTextStyle

This commit is contained in:
Vincent Lee committed 2020-02-15 01:15:06 -06:00
1 parent d434a1c915
commit f4886b8627
3 files changed
+6 -6

No files matched your search

@@ -257,7 +257,7 @@ public class TileCorporeaIndex extends TileCorporeaBase implements ICorporeaRequ
if(!MinecraftForge.EVENT_BUS.post(indexReqEvent)) {
this.doCorporeaRequest(request, count, this.getSpark());
player.sendMessage(new TranslationTextComponent("botaniamisc.requestMsg", count, request.getRequestName(), CorporeaHelper.lastRequestMatches, CorporeaHelper.lastRequestExtractions).setStyle(new Style().setColor(TextFormatting.LIGHT_PURPLE)));
player.sendMessage(new TranslationTextComponent("botaniamisc.requestMsg", count, request.getRequestName(), CorporeaHelper.lastRequestMatches, CorporeaHelper.lastRequestExtractions).applyTextStyle(TextFormatting.LIGHT_PURPLE));
CorporeaRequestTrigger.INSTANCE.trigger(player, player.getServerWorld(), this.getPos(), CorporeaHelper.lastRequestExtractions);
}
}
@@ -177,7 +177,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
//check difficulty
if(world.getDifficulty() == Difficulty.PEACEFUL) {
if(!world.isRemote)
player.sendMessage(new TranslationTextComponent("botaniamisc.peacefulNoob").setStyle(new Style().setColor(TextFormatting.RED)));
player.sendMessage(new TranslationTextComponent("botaniamisc.peacefulNoob").applyTextStyle(TextFormatting.RED));
return false;
}
@@ -187,7 +187,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
if(world.isRemote) {
warnInvalidBlocks(world, invalidPylonBlocks);
} else {
player.sendMessage(new TranslationTextComponent("botaniamisc.needsCatalysts").setStyle(new Style().setColor(TextFormatting.RED)));
player.sendMessage(new TranslationTextComponent("botaniamisc.needsCatalysts").applyTextStyle(TextFormatting.RED));
}
return false;
@@ -202,7 +202,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti
PacketHandler.sendTo((ServerPlayerEntity) player,
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.ARENA_INDICATOR, pos.getX(), pos.getY(), pos.getZ()));
player.sendMessage(new TranslationTextComponent("botaniamisc.badArena").setStyle(new Style().setColor(TextFormatting.RED)));
player.sendMessage(new TranslationTextComponent("botaniamisc.badArena").applyTextStyle(TextFormatting.RED));
}
return false;
@@ -67,12 +67,12 @@ public class ItemDice extends ItemRelic {
}
if(possible.isEmpty()) {
player.sendMessage(new TranslationTextComponent("botaniamisc.dudDiceRoll", world.rand.nextInt(6) + 1).setStyle(new Style().setColor(TextFormatting.DARK_GREEN)));
player.sendMessage(new TranslationTextComponent("botaniamisc.dudDiceRoll", world.rand.nextInt(6) + 1).applyTextStyle(TextFormatting.DARK_GREEN));
stack.shrink(1);
return ActionResult.success(stack);
} else {
int relic = possible.get(world.rand.nextInt(possible.size()));
player.sendMessage(new TranslationTextComponent("botaniamisc.diceRoll", relic + 1).setStyle(new Style().setColor(TextFormatting.DARK_GREEN)));
player.sendMessage(new TranslationTextComponent("botaniamisc.diceRoll", relic + 1).applyTextStyle(TextFormatting.DARK_GREEN));
return ActionResult.success(new ItemStack(getRelics()[relic]));
}
}