1.14.3 + more recipe fixes
This commit is contained in:
parent
5f134a7379
commit
18950e0b29
35 changed files with 240 additions and 251 deletions
|
@ -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