Some work on #1402. Teh moar to come.
This commit is contained in:
parent
268a16958b
commit
85cd77e5c1
2 changed files with 6 additions and 2 deletions
|
@ -32,6 +32,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.text.translation.I18n;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import reborncore.api.IListInfoProvider;
|
import reborncore.api.IListInfoProvider;
|
||||||
import reborncore.api.power.IEnergyInterfaceTile;
|
import reborncore.api.power.IEnergyInterfaceTile;
|
||||||
|
@ -78,6 +79,7 @@ public class ProbeProvider implements IProbeInfoProvider {
|
||||||
return "TechReborn";
|
return "TechReborn";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) {
|
public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) {
|
||||||
euStyle = new ProgressStyle().backgroundColor(0xFF8B8B8B).borderColor(0xFF373737).alternateFilledColor(PowerSystem.getDisplayPower().altColour).filledColor(PowerSystem.getDisplayPower().colour);
|
euStyle = new ProgressStyle().backgroundColor(0xFF8B8B8B).borderColor(0xFF373737).alternateFilledColor(PowerSystem.getDisplayPower().altColour).filledColor(PowerSystem.getDisplayPower().colour);
|
||||||
|
@ -102,7 +104,7 @@ public class ProbeProvider implements IProbeInfoProvider {
|
||||||
TileLegacyMachineBase legacyMachineBase = (TileLegacyMachineBase) tile;
|
TileLegacyMachineBase legacyMachineBase = (TileLegacyMachineBase) tile;
|
||||||
if (legacyMachineBase.getInventoryForTile().isPresent()) {
|
if (legacyMachineBase.getInventoryForTile().isPresent()) {
|
||||||
if (player.isSneaking()) {
|
if (player.isSneaking()) {
|
||||||
probeInfo.text("Inventory");
|
probeInfo.text(I18n.translateToLocal("techreborn.tooltip.inventory"));
|
||||||
}
|
}
|
||||||
Inventory inventory = legacyMachineBase.getInventoryForTile().get();
|
Inventory inventory = legacyMachineBase.getInventoryForTile().get();
|
||||||
if(!inventory.isEmpty()){
|
if(!inventory.isEmpty()){
|
||||||
|
@ -116,7 +118,7 @@ public class ProbeProvider implements IProbeInfoProvider {
|
||||||
}
|
}
|
||||||
if (!legacyMachineBase.upgradeInventory.isEmpty() && player.isSneaking()) {
|
if (!legacyMachineBase.upgradeInventory.isEmpty() && player.isSneaking()) {
|
||||||
probeInfo.horizontal();
|
probeInfo.horizontal();
|
||||||
probeInfo.text("Upgrades");
|
probeInfo.text(I18n.translateToLocal("techreborn.tooltip.upgrades"));
|
||||||
List<ItemStack> stacks = Arrays.stream(legacyMachineBase.upgradeInventory.contents).filter(stack -> !stack.isEmpty()).collect(Collectors.toList());
|
List<ItemStack> stacks = Arrays.stream(legacyMachineBase.upgradeInventory.contents).filter(stack -> !stack.isEmpty()).collect(Collectors.toList());
|
||||||
try {
|
try {
|
||||||
methodHandle_addStacks.invoke(probeInfo, world, null, stacks, player.isSneaking());
|
methodHandle_addStacks.invoke(probeInfo, world, null, stacks, player.isSneaking());
|
||||||
|
|
|
@ -713,6 +713,8 @@ entity.nuke.name=Nuke
|
||||||
tooltip.wip=WIP Coming Soon
|
tooltip.wip=WIP Coming Soon
|
||||||
tooltip.upBroken=Upgrades DO NOT function!
|
tooltip.upBroken=Upgrades DO NOT function!
|
||||||
tooltip.ingredient=Currently only a crafting ingredient
|
tooltip.ingredient=Currently only a crafting ingredient
|
||||||
|
techreborn.tooltip.inventory=Inventory
|
||||||
|
techreborn.tooltip.upgrades=Upgrades
|
||||||
|
|
||||||
#Advancements
|
#Advancements
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue