1.14.3 + more recipe fixes
This commit is contained in:
parent
5f134a7379
commit
18950e0b29
35 changed files with 240 additions and 251 deletions
|
@ -24,7 +24,9 @@
|
|||
|
||||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.ChatFormat;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockRenderType;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -34,8 +36,6 @@ import net.minecraft.client.item.TooltipContext;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.state.StateFactory;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.DirectionProperty;
|
||||
|
@ -162,8 +162,8 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
|
||||
|
||||
@Override
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Component> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new TranslatableComponent("techreborn.tooltip.alarm").applyFormat(ChatFormat.GRAY));
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Text> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new TranslatableText("techreborn.tooltip.alarm").formatted(Formatting.GRAY));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
|
||||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.ChatFormat;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.client.item.TooltipContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.world.BlockView;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
|
@ -43,8 +43,8 @@ public class BlockSupercondensator extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Component> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new TextComponent("WIP Coming Soon").applyFormat(ChatFormat.RED));
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Text> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new LiteralText("WIP Coming Soon").formatted(Formatting.RED));
|
||||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ import net.minecraft.block.Material;
|
|||
import net.minecraft.client.item.TooltipContext;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -83,10 +83,10 @@ public class BlockFusionCoil extends Block {
|
|||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Override
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Component> tooltip,
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Text> tooltip,
|
||||
TooltipContext flagIn) {
|
||||
super.buildTooltip(stack, worldIn, tooltip, flagIn);
|
||||
// TODO: Translate
|
||||
tooltip.add(new TextComponent("Right click Fusion Control computer to auto place"));
|
||||
tooltip.add(new LiteralText("Right click Fusion Control computer to auto place"));
|
||||
}
|
||||
}
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.ChatFormat;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.client.item.TooltipContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.world.BlockView;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.client.models.ModelCompound;
|
||||
|
@ -47,8 +47,8 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Component> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new TextComponent("WIP Coming Soon").applyFormat(ChatFormat.RED));
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Text> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new LiteralText("WIP Coming Soon").formatted(Formatting.RED));
|
||||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.ChatFormat;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.client.item.TooltipContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.world.BlockView;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.client.models.ModelCompound;
|
||||
|
@ -47,8 +47,8 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Component> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new TextComponent("WIP Coming Soon").applyFormat(ChatFormat.RED));
|
||||
public void buildTooltip(ItemStack stack, @Nullable BlockView worldIn, List<Text> tooltip, TooltipContext flagIn) {
|
||||
tooltip.add(new LiteralText("WIP Coming Soon").formatted(Formatting.RED));
|
||||
// TODO
|
||||
// Remember to remove WIP override and imports once complete
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
package techreborn.blocks.tier1;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.ChatFormat;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
|
@ -35,7 +36,6 @@ import net.minecraft.client.resource.language.I18n;
|
|||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.state.StateFactory;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
|
@ -57,7 +57,6 @@ import techreborn.TechReborn;
|
|||
import techreborn.tiles.machine.tier1.TilePlayerDectector;
|
||||
import techreborn.utils.MessageIDs;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockPlayerDetector extends BlockMachineBase {
|
||||
|
@ -101,7 +100,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
|
||||
String type = state.get(TYPE);
|
||||
String newType = type;
|
||||
ChatFormat color = ChatFormat.GREEN;
|
||||
Formatting color = Formatting.GREEN;
|
||||
|
||||
if (!stack.isEmpty() && ToolManager.INSTANCE.canHandleTool(stack)) {
|
||||
if (ToolManager.INSTANCE.handleTool(stack, pos, worldIn, playerIn, hitResult.getSide(), false)) {
|
||||
|
@ -122,10 +121,10 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
} else {
|
||||
if (type.equals("all")) {
|
||||
newType = "others";
|
||||
color = ChatFormat.RED;
|
||||
color = Formatting.RED;
|
||||
} else if (type.equals("others")) {
|
||||
newType = "you";
|
||||
color = ChatFormat.BLUE;
|
||||
color = Formatting.BLUE;
|
||||
} else if (type.equals("you")) {
|
||||
newType = "all";
|
||||
}
|
||||
|
@ -135,8 +134,8 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
}
|
||||
|
||||
if (worldIn.isClient) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.playerDetectorID, new TextComponent(
|
||||
ChatFormat.GRAY + I18n.translate("techreborn.message.detects") + " " + color
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.playerDetectorID, new LiteralText(
|
||||
Formatting.GRAY + I18n.translate("techreborn.message.detects") + " " + color
|
||||
+ StringUtils.toFirstCapital(newType)));
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue