add steam status / 0.1.1
This commit is contained in:
parent
ea6224e4b3
commit
7dd3615235
3 changed files with 11 additions and 1 deletions
|
@ -15,7 +15,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
|||
apply plugin: 'org.spongepowered.mixin'
|
||||
|
||||
group = 'com.teammoeg'
|
||||
version = '1.16.5-0.1.0'
|
||||
version = '1.16.5-0.1.1'
|
||||
|
||||
java {
|
||||
archivesBaseName = 'steampowered'
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTile
|
|||
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineBlock;
|
||||
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineTileEntity;
|
||||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.teammoeg.steampowered.FluidRegistry;
|
||||
import com.teammoeg.steampowered.block.engine.SteamEngineBlock;
|
||||
import com.teammoeg.steampowered.network.PacketHandler;
|
||||
|
@ -17,6 +18,8 @@ import net.minecraft.tileentity.TileEntityType;
|
|||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
|
@ -70,6 +73,11 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
|
|||
}
|
||||
|
||||
public boolean addToGoggleTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking) {
|
||||
if (tank.isEmpty() || tank.getFluidAmount() < this.getSteamConsumptionPerTick()) {
|
||||
tooltip.add(componentSpacing.plainCopy().append(new TranslationTextComponent("tooltip.steampowered.steam_engine.not_enough_steam").withStyle(TextFormatting.RED)));
|
||||
} else {
|
||||
tooltip.add(componentSpacing.plainCopy().append(new TranslationTextComponent("tooltip.steampowered.steam_engine.running").withStyle(TextFormatting.GREEN)));
|
||||
}
|
||||
return this.containedFluidTooltip(tooltip, isPlayerSneaking, getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
"steampowered.ponder.flywheel.text_3": "Using Flywheels made of Steel or Cast Iron will increase efficiency and generated capacity of the Flywheel",
|
||||
|
||||
"steampowered.tooltip.energy.production": "Energy Generated:",
|
||||
"tooltip.steampowered.steam_engine.not_enough_steam": "Status: Not Enough Steam",
|
||||
"tooltip.steampowered.steam_engine.running": "Status: Running",
|
||||
|
||||
"item.steampowered.multimeter": "Multimeter",
|
||||
"item.steampowered.multimeter.title":"[Multimeter]:",
|
||||
|
|
Loading…
Reference in a new issue