generated from tilera/1710mod
feat: update to UE 5
This commit is contained in:
parent
ba377d21ef
commit
36d5c62196
|
@ -23,7 +23,7 @@ apply plugin: 'maven-publish'
|
|||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
version = "1.0.1"
|
||||
version = "1.1.0"
|
||||
group = "universalelectricity"
|
||||
archivesBaseName = "atomicscience"
|
||||
|
||||
|
@ -37,7 +37,8 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation "universalelectricity:basiccomponents:1.1.1:deobf"
|
||||
implementation "universalelectricity:basiccomponents:2.0.0:deobf"
|
||||
implementation "universalelectricity:universalelectricity:5.1.0:deobf"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
|
@ -105,7 +105,7 @@ import universalelectricity.prefab.ore.OreGenBase;
|
|||
import universalelectricity.prefab.ore.OreGenReplaceStone;
|
||||
import universalelectricity.prefab.ore.OreGenerator;
|
||||
|
||||
@Mod(modid = "AtomicScience", name = "Atomic Science", version = "0.6.2",
|
||||
@Mod(modid = "AtomicScience", name = "Atomic Science", version = "1.1.0",
|
||||
dependencies = "required-after:basiccomponents")
|
||||
public class AtomicScience {
|
||||
public static Configuration CONFIGURATION =
|
||||
|
@ -402,8 +402,8 @@ public class AtomicScience {
|
|||
"Electricity generation is always a burden. That\'s why we are here to bring in high tech nuclear power to solve all your electricity-lack problems. With our fission reactors, fusion reactors, and antimatter generators, you won\'t be lacking electricity ever again!";
|
||||
metadata.url = "https://git.tilera.org/Anvilcraft/atomicscience";
|
||||
metadata.logoFile = "/as_logo.png";
|
||||
metadata.version = "0.6.2.117";
|
||||
metadata.authorList = Arrays.asList(new String[] {"Calclavia"});
|
||||
metadata.version = "1.1.0";
|
||||
metadata.authorList = Arrays.asList(new String[] {"Calclavia", "LordMZTE", "tilera"});
|
||||
metadata.credits = "Please visit the website.";
|
||||
metadata.logoFile = "as_logo.png";
|
||||
metadata.autogenerated = false;
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AtomicScience {
|
||||
|
||||
public static final String MAJOR_VERSION = "0";
|
||||
public static final String MINOR_VERSION = "6";
|
||||
public static final String REVISION_VERSION = "2";
|
||||
public static final String BUILD_VERSION = "117";
|
||||
public static final String VERSION = "0.6.2";
|
||||
public static final String NAME = "Atomic Science";
|
||||
public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), "AtomicScience.cfg"));
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import atomicscience.api.poison.PoisonRadiation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class BlockRadioactive extends Block {
|
||||
|
||||
public static int RECOMMENDED_ID = 3768;
|
||||
public boolean canSpread;
|
||||
public float radius;
|
||||
public int amplifier;
|
||||
public boolean canWalkPoison;
|
||||
public boolean isRandomlyRadioactive;
|
||||
private IIcon iconTop;
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockRadioactive(Material material) {
|
||||
super(material);
|
||||
this.canSpread = true;
|
||||
this.radius = 5.0F;
|
||||
this.amplifier = 2;
|
||||
this.canWalkPoison = true;
|
||||
this.isRandomlyRadioactive = true;
|
||||
this.setTickRandomly(true);
|
||||
this.setHardness(0.2F);
|
||||
this.setLightLevel(0.1F);
|
||||
}
|
||||
|
||||
public BlockRadioactive() { this(Material.rock); }
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.iconTop
|
||||
: (side == 0 ? this.iconBottom : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
this.blockIcon = iconRegister.registerIcon(
|
||||
this.getUnlocalizedName().replace("tile.", ""));
|
||||
this.iconTop = iconRegister.registerIcon(
|
||||
this.getUnlocalizedName().replace("tile.", "") + "_top");
|
||||
this.iconBottom = iconRegister.registerIcon(
|
||||
this.getUnlocalizedName().replace("tile.", "") + "_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockClicked(World world, int x, int y, int z,
|
||||
EntityPlayer par5EntityPlayer) {
|
||||
if ((double)world.rand.nextFloat() > 0.8D) {
|
||||
this.updateTick(world, x, y, z, world.rand);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
if (!world.isRemote) {
|
||||
if (this.isRandomlyRadioactive) {
|
||||
AxisAlignedBB i = AxisAlignedBB.getBoundingBox(
|
||||
(double)((float)x - this.radius), (double)((float)y - this.radius),
|
||||
(double)((float)z - this.radius), (double)((float)x + this.radius),
|
||||
(double)((float)y + this.radius), (double)((float)z + this.radius));
|
||||
List<EntityLiving> newX =
|
||||
world.getEntitiesWithinAABB(EntityLiving.class, i);
|
||||
|
||||
for (EntityLiving newZ : newX) {
|
||||
PoisonRadiation.INSTANCE.poisonEntity(
|
||||
new Vector3((double)x, (double)y, (double)z), newZ,
|
||||
this.amplifier);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.canSpread) {
|
||||
for (int var11 = 0; var11 < 4; ++var11) {
|
||||
int xOffset = x + rand.nextInt(3) - 1;
|
||||
int yOffset = y + rand.nextInt(5) - 3;
|
||||
int zOffset = z + rand.nextInt(3) - 1;
|
||||
Block block = world.getBlock(xOffset, yOffset, zOffset);
|
||||
if ((double)rand.nextFloat() > 0.4D &&
|
||||
(block == Blocks.farmland || block == Blocks.grass)) {
|
||||
world.setBlock(xOffset, yOffset, zOffset, this);
|
||||
}
|
||||
}
|
||||
|
||||
if ((double)rand.nextFloat() > 0.85D) {
|
||||
world.setBlock(x, y, z, Blocks.mycelium);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void func_71891_b(World par1World, int x, int y, int z,
|
||||
Entity par5Entity) {
|
||||
if (par5Entity instanceof EntityLiving && this.canWalkPoison) {
|
||||
PoisonRadiation.INSTANCE.poisonEntity(
|
||||
new Vector3((double)x, (double)y, (double)z),
|
||||
(EntityLiving)par5Entity);
|
||||
}
|
||||
}
|
||||
|
||||
public int func_71925_a(Random par1Random) { return 0; }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void func_71862_a(World world, int x, int y, int z,
|
||||
Random par5Random) {
|
||||
if (Minecraft.getMinecraft().gameSettings.particleSetting == 0) {
|
||||
byte radius = 3;
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
Vector3 diDian = new Vector3((double)x, (double)y, (double)z);
|
||||
diDian.x += Math.random() * (double)radius - (double)(radius / 2);
|
||||
diDian.y += Math.random() * (double)radius - (double)(radius / 2);
|
||||
diDian.z += Math.random() * (double)radius - (double)(radius / 2);
|
||||
EntitySmokeFX fx = new EntitySmokeFX(
|
||||
world, diDian.x, diDian.y, diDian.z, (Math.random() - 0.5D) / 2.0D,
|
||||
(Math.random() - 0.5D) / 2.0D, (Math.random() - 0.5D) / 2.0D);
|
||||
fx.setRBGColorF(0.2F, 0.8F, 0.0F);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import atomicscience.api.poison.Poison;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IAntiPoisonArmor {
|
||||
|
||||
boolean isProtectedFromPoison(ItemStack var1, EntityLivingBase var2, Poison var3);
|
||||
|
||||
void onProtectFromPoison(ItemStack var1, EntityLivingBase var2, Poison var3);
|
||||
|
||||
Poison.ArmorType getArmorType();
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import atomicscience.api.poison.Poison;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IAntiPoisonBlock {
|
||||
|
||||
boolean isPoisonPrevention(World var1, int var2, int var3, int var4, Poison var5);
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IElectromagnet {
|
||||
|
||||
boolean isRunning(World var1, int var2, int var3, int var4);
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import atomicscience.api.ITemperature;
|
||||
|
||||
public interface IFissileMaterial {
|
||||
|
||||
int onFissile(ITemperature var1);
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import atomicscience.api.ITemperature;
|
||||
|
||||
public interface IHeatSource extends ITemperature {
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
|
||||
public interface IReactor {
|
||||
|
||||
boolean isOverToxic();
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
|
||||
public interface ISteamReceptor {
|
||||
|
||||
void onReceiveSteam(int var1);
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
|
||||
public interface ITemperature {
|
||||
|
||||
float getTemperature();
|
||||
|
||||
void setTemperature(float var1);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package atomicscience.api;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Plasma {
|
||||
|
||||
public static Plasma.IPlasma blockPlasma;
|
||||
|
||||
|
||||
|
||||
public interface IPlasma {
|
||||
|
||||
void spawn(World var1, int var2, int var3, int var4, byte var5);
|
||||
|
||||
boolean canPlace(World var1, int var2, int var3, int var4);
|
||||
}
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
package atomicscience.api.poison;
|
||||
|
||||
import atomicscience.api.IAntiPoisonArmor;
|
||||
import java.util.EnumSet;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public abstract class Poison {
|
||||
|
||||
public static Poison[] list = new Poison[32];
|
||||
protected String name;
|
||||
protected EnumSet<Poison.ArmorType> armorRequired;
|
||||
|
||||
public Poison(String name, int id) {
|
||||
this.armorRequired = EnumSet.range(Poison.ArmorType.HELM, Poison.ArmorType.BOOTS);
|
||||
this.name = name;
|
||||
if (list == null) {
|
||||
list = new Poison[32];
|
||||
}
|
||||
|
||||
list[0] = this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public EnumSet<Poison.ArmorType> getArmorRequired() {
|
||||
return this.armorRequired;
|
||||
}
|
||||
|
||||
public void poisonEntity(Vector3 emitPosition, EntityLivingBase entity,
|
||||
int amplifier) {
|
||||
EnumSet<Poison.ArmorType> armorWorn = EnumSet.of(Poison.ArmorType.UNKNOWN);
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer entityPlayer = (EntityPlayer) entity;
|
||||
|
||||
for (int i = 0; i < entityPlayer.inventory.armorInventory.length; ++i) {
|
||||
if (entityPlayer.inventory.armorInventory[i] != null &&
|
||||
entityPlayer.inventory.armorInventory[i].getItem() instanceof IAntiPoisonArmor &&
|
||||
((IAntiPoisonArmor) entityPlayer.inventory.armorInventory[i]
|
||||
.getItem())
|
||||
.isProtectedFromPoison(entityPlayer.inventory.armorInventory[i],
|
||||
entity, this)) {
|
||||
((IAntiPoisonArmor) entityPlayer.inventory.armorInventory[i].getItem())
|
||||
.onProtectFromPoison(entityPlayer.inventory.armorInventory[i],
|
||||
entity, this);
|
||||
armorWorn.add(
|
||||
((IAntiPoisonArmor) entityPlayer.inventory.armorInventory[i]
|
||||
.getItem())
|
||||
.getArmorType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!armorWorn.containsAll(this.armorRequired)) {
|
||||
this.doPoisonEntity(emitPosition, entity, armorWorn, amplifier);
|
||||
}
|
||||
}
|
||||
|
||||
public void poisonEntity(Vector3 emitPosition, EntityLivingBase entity) {
|
||||
this.poisonEntity(emitPosition, entity, 0);
|
||||
}
|
||||
|
||||
protected abstract void doPoisonEntity(Vector3 var1, EntityLivingBase var2,
|
||||
EnumSet<Poison.ArmorType> var3, int var4);
|
||||
|
||||
public static enum ArmorType {
|
||||
HELM,
|
||||
BODY,
|
||||
LEGGINGS,
|
||||
BOOTS,
|
||||
UNKNOWN;
|
||||
}
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
package atomicscience.api.poison;
|
||||
|
||||
import atomicscience.api.IAntiPoisonBlock;
|
||||
import java.util.EnumSet;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import universalelectricity.prefab.CustomDamageSource;
|
||||
import universalelectricity.prefab.potion.CustomPotionEffect;
|
||||
|
||||
public class PoisonRadiation extends Poison {
|
||||
|
||||
public static final Poison INSTANCE = new PoisonRadiation("radiation", 0);
|
||||
public static final CustomDamageSource damageSource = (CustomDamageSource) (new CustomDamageSource("radiation"))
|
||||
.setDamageBypassesArmor();
|
||||
public static boolean disabled = false;
|
||||
|
||||
public PoisonRadiation(String name, int id) {
|
||||
super(name, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPoisonEntity(Vector3 emitPosition, EntityLivingBase entity,
|
||||
EnumSet<Poison.ArmorType> armorWorn,
|
||||
int amplifier) {
|
||||
if (!disabled) {
|
||||
if (emitPosition == null) {
|
||||
entity.addPotionEffect(
|
||||
new CustomPotionEffect(PotionRadiation.INSTANCE.getId(),
|
||||
300 * (amplifier + 1), amplifier, null));
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.getAntiRadioactiveCount(entity.worldObj, emitPosition,
|
||||
new Vector3(entity)) <= amplifier) {
|
||||
entity.addPotionEffect(
|
||||
new CustomPotionEffect(PotionRadiation.INSTANCE.getId(),
|
||||
400 * (amplifier + 1), amplifier, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getAntiRadioactiveCount(World world, Vector3 startingPosition,
|
||||
Vector3 endingPosition) {
|
||||
Vector3 delta = Vector3.subtract(endingPosition, startingPosition).normalize();
|
||||
Vector3 targetPosition = startingPosition.clone();
|
||||
double totalDistance = startingPosition.distanceTo(endingPosition);
|
||||
int count = 0;
|
||||
if (totalDistance > 1.0D) {
|
||||
for (; targetPosition.distanceTo(endingPosition) <= totalDistance; targetPosition.add(delta)) {
|
||||
Block block = targetPosition.getBlock(world);
|
||||
if (block != Blocks.air && block instanceof IAntiPoisonBlock &&
|
||||
((IAntiPoisonBlock) block)
|
||||
.isPoisonPrevention(world, targetPosition.intX(),
|
||||
targetPosition.intY(),
|
||||
targetPosition.intZ(), this)) {
|
||||
++count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
package atomicscience.api.poison;
|
||||
|
||||
import atomicscience.api.AtomicScience;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import universalelectricity.prefab.potion.CustomPotion;
|
||||
|
||||
public class PotionRadiation extends CustomPotion {
|
||||
public static PotionRadiation INSTANCE;
|
||||
|
||||
public PotionRadiation(int id, boolean isBadEffect, int color, String name) {
|
||||
super(AtomicScience.CONFIGURATION.get("Potion", name + " potion ID", id)
|
||||
.getInt(id),
|
||||
isBadEffect, color, name);
|
||||
this.setIconIndex(6, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performEffect(EntityLivingBase entity, int amplifier) {
|
||||
if ((double) entity.worldObj.rand.nextFloat() > 0.9D - (double) amplifier * 0.08D) {
|
||||
entity.attackEntityFrom(PoisonRadiation.damageSource, 1);
|
||||
if (entity instanceof EntityPlayer) {
|
||||
((EntityPlayer) entity)
|
||||
.addExhaustion(0.01F * (float) (amplifier + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isReady(int duration, int amplifier) {
|
||||
return duration % 10 == 0;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,8 @@ import net.minecraft.client.gui.inventory.GuiContainer;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public class GAccelerator extends GuiContainer {
|
||||
|
@ -54,20 +55,20 @@ public class GAccelerator extends GuiContainer {
|
|||
8, 27, 4210752);
|
||||
this.fontRendererObj.drawString("Status: " + status, 8, 38, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
"Used: " + ElectricityDisplay.getDisplayShort(
|
||||
"Used: " + UnitDisplay.getDisplayShort(
|
||||
this.tileEntity.yongDianLiang,
|
||||
ElectricityDisplay.ElectricUnit.JOULES),
|
||||
UnitDisplay.Unit.JOULES),
|
||||
8, 49, 4210752);
|
||||
StringBuilder var10001 = new StringBuilder();
|
||||
this.tileEntity.getClass();
|
||||
this.fontRendererObj.drawString(
|
||||
var10001
|
||||
.append(ElectricityDisplay.getDisplayShort(
|
||||
(double)(10000 * 20), ElectricityDisplay.ElectricUnit.WATT))
|
||||
.append(UnitDisplay.getDisplayShort(
|
||||
(double)(10000 * 20), UnitDisplay.Unit.WATT))
|
||||
.append(" ")
|
||||
.append(ElectricityDisplay.getDisplayShort(
|
||||
.append(UnitDisplay.getDisplayShort(
|
||||
this.tileEntity.getVoltage(),
|
||||
ElectricityDisplay.ElectricUnit.VOLTAGE))
|
||||
UnitDisplay.Unit.VOLTAGE))
|
||||
.toString(),
|
||||
8, 60, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
|
|
|
@ -4,7 +4,7 @@ import atomicscience.fenlie.CCentrifuge;
|
|||
import atomicscience.fenlie.TCentrifuge;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
|
||||
public class GCentrifuge extends GBase {
|
||||
private TCentrifuge tileEntity;
|
||||
|
@ -32,12 +32,12 @@ public class GCentrifuge extends GBase {
|
|||
|
||||
this.fontRendererObj.drawString("Status: " + displayText, 70, 50, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
ElectricityDisplay.getDisplay(10000.0D,
|
||||
ElectricityDisplay.ElectricUnit.WATT),
|
||||
UnitDisplay.getDisplay(10000.0D,
|
||||
UnitDisplay.Unit.WATT),
|
||||
70, 60, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
ElectricityDisplay.getDisplay(this.tileEntity.getVoltage(),
|
||||
ElectricityDisplay.ElectricUnit.VOLTAGE),
|
||||
UnitDisplay.getDisplay(this.tileEntity.getVoltage(),
|
||||
UnitDisplay.Unit.VOLTAGE),
|
||||
70, 70, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"), 8,
|
||||
|
|
|
@ -4,7 +4,7 @@ import atomicscience.hecheng.CChemicalExtractor;
|
|||
import atomicscience.jiqi.TChemicalExtractor;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
|
||||
public class GChemicalExtractor extends GBase {
|
||||
private TChemicalExtractor tileEntity;
|
||||
|
@ -21,12 +21,12 @@ public class GChemicalExtractor extends GBase {
|
|||
4210752);
|
||||
this.tileEntity.getClass();
|
||||
this.fontRendererObj.drawString(
|
||||
ElectricityDisplay.getDisplay((double)(500.0F * 20.0F),
|
||||
ElectricityDisplay.ElectricUnit.WATT),
|
||||
UnitDisplay.getDisplay((double)(500.0F * 20.0F),
|
||||
UnitDisplay.Unit.WATT),
|
||||
90, 48, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
ElectricityDisplay.getDisplay(this.tileEntity.getVoltage(),
|
||||
ElectricityDisplay.ElectricUnit.VOLTAGE),
|
||||
UnitDisplay.getDisplay(this.tileEntity.getVoltage(),
|
||||
UnitDisplay.Unit.VOLTAGE),
|
||||
90, 60, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"), 8,
|
||||
|
|
|
@ -3,7 +3,7 @@ package atomicscience.shimian;
|
|||
import atomicscience.fenlie.TFissionReactor;
|
||||
import calclavia.lib.gui.GuiContainerBase;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
|
||||
public class GFissionReactor extends GuiContainerBase {
|
||||
private TFissionReactor tileEntity;
|
||||
|
@ -33,7 +33,7 @@ public class GFissionReactor extends GuiContainerBase {
|
|||
4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
"Steam Emission: " +
|
||||
ElectricityDisplay.roundDecimals(
|
||||
UnitDisplay.roundDecimals(
|
||||
(double)(1.0F / (Math.max(40.0F - this.tileEntity.wenDu /
|
||||
2000.0F * 40.0F,
|
||||
2.0F) /
|
||||
|
|
|
@ -4,7 +4,7 @@ import atomicscience.fenlie.TNuclearBoiler;
|
|||
import atomicscience.hecheng.CNuclearBoiler;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
|
||||
public class GNuclearBoiler extends GBase {
|
||||
|
||||
|
@ -21,12 +21,12 @@ public class GNuclearBoiler extends GBase {
|
|||
4210752);
|
||||
this.tileEntity.getClass();
|
||||
this.fontRendererObj.drawString(
|
||||
ElectricityDisplay.getDisplay((double)(800.0F * 20.0F),
|
||||
ElectricityDisplay.ElectricUnit.WATT),
|
||||
UnitDisplay.getDisplay((double)(800.0F * 20.0F),
|
||||
UnitDisplay.Unit.WATT),
|
||||
55, 48, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
ElectricityDisplay.getDisplay(this.tileEntity.getVoltage(),
|
||||
ElectricityDisplay.ElectricUnit.VOLTAGE),
|
||||
UnitDisplay.getDisplay(this.tileEntity.getVoltage(),
|
||||
UnitDisplay.Unit.VOLTAGE),
|
||||
55, 60, 4210752);
|
||||
this.fontRendererObj.drawString(
|
||||
StatCollector.translateToLocal("container.inventory"), 8,
|
||||
|
|
Loading…
Reference in a new issue