mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
experimental new converter functionality, more bolter stuff
This commit is contained in:
parent
149a6231f5
commit
aee7709b93
@ -259,7 +259,7 @@ death.attack.teleporter=%1$s wurde ins Nichts teleportiert.
|
||||
entity.entity_cyber_crab.name=Cyber-Krabbe
|
||||
entity.entity_elder_one.name=Quackos der Älteste
|
||||
entity.entity_fucc_a_ducc.name=Ente
|
||||
entity.entity_hbm_fbi.name=FBI Agent
|
||||
entity.entity_ntm_fbi.name=FBI Agent
|
||||
entity.entity_mob_hunter_chopper.name=Jagdschrauber
|
||||
entity.entity_mob_mask_man.name=Maskenmann
|
||||
entity.entity_mob_nuclear_creeper.name=Nuklearer Creeper
|
||||
@ -431,6 +431,7 @@ item.ammo_5mm_chlorophyte.name=5mm Patrone (Grünalgen)
|
||||
item.ammo_5mm_du.name=5mm Patrone (DU)
|
||||
item.ammo_5mm_explosive.name=5mm Patrone (Explosiv)
|
||||
item.ammo_5mm_star.name=5mm Patrone (Sternenmetall)
|
||||
item.ammo_75bolt.name=30er .75 Bolzenmagazin
|
||||
item.ammo_9mm.name=9mm Patrone
|
||||
item.ammo_9mm_ap.name=9mm Patrone (Panzerbrechend)
|
||||
item.ammo_9mm_chlorophyte.name=9mm Patrone (Grünalgen)
|
||||
@ -1006,6 +1007,7 @@ item.gun_bolt_action.name=Dream-Repetiergewehr (Original)
|
||||
item.gun_bolt_action_ammo.name=12x74 Brenneke (LEGACY)
|
||||
item.gun_bolt_action_green.name=Dream-Repetiergewehr (Grün)
|
||||
item.gun_bolt_action_saturnite.name=Saturnitbüchse
|
||||
item.gun_bolter.name=Boltergewehr
|
||||
item.gun_calamity.name=Calamity
|
||||
item.gun_calamity_ammo.name=.50 BMG Patrone (LEGACY)
|
||||
item.gun_calamity_dual.name=Sattelkanone
|
||||
|
||||
@ -259,7 +259,7 @@ death.attack.teleporter=%1$s was teleported into nothingness.
|
||||
entity.entity_cyber_crab.name=Cyber Crab
|
||||
entity.entity_elder_one.name=Quackos The Elder One
|
||||
entity.entity_fucc_a_ducc.name=Duck
|
||||
entity.entity_hbm_fbi.name=FBI Agent
|
||||
entity.entity_ntm_fbi.name=FBI Agent
|
||||
entity.entity_mob_hunter_chopper.name=Hunter Chopper
|
||||
entity.entity_mob_mask_man.name=Mask Man
|
||||
entity.entity_mob_nuclear_creeper.name=Nuclear Creeper
|
||||
@ -431,6 +431,7 @@ item.ammo_5mm_chlorophyte.name=5mm Round (Chlorophyte)
|
||||
item.ammo_5mm_du.name=5mm Round (DU)
|
||||
item.ammo_5mm_explosive.name=5mm Round (Explosive)
|
||||
item.ammo_5mm_star.name=5mm Round (Starmetal)
|
||||
item.ammo_75bolt.name=.75 Bolt Magazine (30rnd)
|
||||
item.ammo_9mm.name=9mm Round
|
||||
item.ammo_9mm_ap.name=9mm Round (Armor Piercing)
|
||||
item.ammo_9mm_chlorophyte.name=9mm Round (Chlorophyte)
|
||||
@ -1006,6 +1007,7 @@ item.gun_bolt_action.name=Dream Bolt-Action Rifle (Original)
|
||||
item.gun_bolt_action_ammo.name=12x74 Slug (LEGACY)
|
||||
item.gun_bolt_action_green.name=Dream Bolt-Action Rifle (Green)
|
||||
item.gun_bolt_action_saturnite.name=Saturnite Rifle
|
||||
item.gun_bolter.name=Bolter
|
||||
item.gun_calamity.name=Calamity
|
||||
item.gun_calamity_ammo.name=.50 BMG Round (LEGACY)
|
||||
item.gun_calamity_dual.name=Saddle Gun
|
||||
|
||||
@ -2007,7 +2007,7 @@ entity.entity_cyber_crab.name=Киберкраб
|
||||
entity.entity_tesla_crab.name=Теслакраб
|
||||
entity.entity_taint_crab.name=Заражённый порчей теслакраб
|
||||
entity.entity_elder_one.name=Крякос Старший
|
||||
entity.entity_hbm_fbi.name=Агент ФБР
|
||||
entity.entity_ntm_fbi.name=Агент ФБР
|
||||
|
||||
item.cap_aluminium.name=Алюминиевый колпачок
|
||||
item.hull_small_steel.name=Небольшая стальная оболочка
|
||||
|
||||
@ -270,7 +270,7 @@ death.attack.teleporter=%1$s 被传送到虚空
|
||||
entity.entity_cyber_crab.name=赛博螃蟹
|
||||
entity.entity_elder_one.name=老鸭子
|
||||
entity.entity_fucc_a_ducc.name=鸭子
|
||||
entity.entity_hbm_fbi.name=FBI特工
|
||||
entity.entity_ntm_fbi.name=FBI特工
|
||||
entity.entity_mob_hunter_chopper.name=猎人直升机
|
||||
entity.entity_mob_mask_man.name=面具人
|
||||
entity.entity_mob_nuclear_creeper.name=核爆爬行者
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
@ -9,6 +9,7 @@ import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockConverterHeRf extends BlockContainer {
|
||||
@ -32,7 +33,10 @@ public class BlockConverterHeRf extends BlockContainer {
|
||||
TileEntityConverterHeRf entity = (TileEntityConverterHeRf) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_converter_he_rf, world, x, y, z);
|
||||
player.addChatComponentMessage(new ChatComponentText("Note: Buffer may not accuratly represent current conversion rate, keep tact rates in mind."));
|
||||
player.addChatComponentMessage(new ChatComponentText("HE: " + (entity.buf / 4)));
|
||||
player.addChatComponentMessage(new ChatComponentText("RF: " + entity.buf));
|
||||
//FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_converter_he_rf, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@ -9,6 +9,7 @@ import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockConverterRfHe extends BlockContainer {
|
||||
@ -32,7 +33,10 @@ public class BlockConverterRfHe extends BlockContainer {
|
||||
TileEntityConverterRfHe entity = (TileEntityConverterRfHe) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_converter_rf_he, world, x, y, z);
|
||||
player.addChatComponentMessage(new ChatComponentText("Note: Buffer may not accuratly represent current conversion rate, keep tact rates in mind."));
|
||||
player.addChatComponentMessage(new ChatComponentText("HE: " + (entity.buf / 4)));
|
||||
player.addChatComponentMessage(new ChatComponentText("RF: " + entity.buf));
|
||||
//FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_converter_rf_he, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@ -76,8 +76,10 @@ public class Gun75BoltFactory {
|
||||
bullet.ammo = ModItems.ammo_75bolt;
|
||||
bullet.ammoCount = 30;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 5;
|
||||
bullet.dmgMax = 10;
|
||||
bullet.dmgMin = 16;
|
||||
bullet.dmgMax = 24;
|
||||
bullet.doesRicochet = false;
|
||||
bullet.explosive = 0.25F;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
@ -533,6 +533,16 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModItems.pipes_steel, 1)
|
||||
}, 200);
|
||||
|
||||
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2), new AStack[] {
|
||||
new OreDictStack("plateSteel", 2),
|
||||
new OreDictStack("plateCopper", 1),
|
||||
new ComparableStack(ModItems.primer_50, 5),
|
||||
new ComparableStack(ModItems.casing_50, 5),
|
||||
new ComparableStack(ModItems.ingot_semtex, 2),
|
||||
new ComparableStack(ModItems.cordite, 3),
|
||||
new ComparableStack(ModItems.ingot_u238, 1)
|
||||
}, 60);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.block_cap_nuka, 1), new AStack[] { new ComparableStack(ModItems.cap_nuka, 128) }, 10);
|
||||
makeRecipe(new ComparableStack(ModBlocks.block_cap_quantum, 1), new AStack[] { new ComparableStack(ModItems.cap_quantum, 128) }, 10);
|
||||
makeRecipe(new ComparableStack(ModBlocks.block_cap_sparkle, 1), new AStack[] { new ComparableStack(ModItems.cap_sparkle, 128) }, 10);
|
||||
|
||||
@ -3084,7 +3084,7 @@ public class ModItems {
|
||||
ammo_50bmg_star = new ItemAmmo().setUnlocalizedName("ammo_50bmg_star").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_star");
|
||||
ammo_50bmg_chlorophyte = new ItemAmmo().setUnlocalizedName("ammo_50bmg_chlorophyte").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_chlorophyte");
|
||||
ammo_50bmg_sleek = new ItemAmmo().setUnlocalizedName("ammo_50bmg_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_sleek");
|
||||
ammo_75bolt = new ItemAmmo().setUnlocalizedName("ammo_75bolt").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_75bolt");
|
||||
ammo_75bolt = new ItemAmmo().setUnlocalizedName("ammo_75bolt").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(8).setTextureName(RefStrings.MODID + ":ammo_75bolt");
|
||||
ammo_357_desh = new ItemAmmo().setUnlocalizedName("ammo_357_desh").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_357_desh");
|
||||
ammo_44 = new ItemAmmo().setUnlocalizedName("ammo_44").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44");
|
||||
ammo_44_ap = new ItemAmmo().setUnlocalizedName("ammo_44_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_ap");
|
||||
|
||||
@ -516,6 +516,12 @@ public class ItemAmmo extends Item {
|
||||
list.add(EnumChatFormatting.RED + "- Not penetrating");
|
||||
}
|
||||
|
||||
//BOLTS
|
||||
if(this == ModItems.ammo_75bolt) {
|
||||
list.add(EnumChatFormatting.YELLOW + "Gyro-stabilized armor-piercing");
|
||||
list.add(EnumChatFormatting.YELLOW + "DU round with tandem charge");
|
||||
}
|
||||
|
||||
//FOLLY
|
||||
if(this == ModItems.ammo_folly) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Focused starmetal reaction blast");
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (3710)";
|
||||
public static final String VERSION = "1.0.27 BETA (3719)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -782,16 +782,16 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_thompson, 1), new Object[] { "IIM", " SW", " S ", 'S', "plateIron", 'I', "plateSteel", 'W', "plankWood", 'M', ModItems.mechanism_rifle_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_flechette, 1), new Object[] { "PPM", "TIS", "G ", 'P', "plateSteel", 'M', ModItems.mechanism_rifle_2, 'T', ModItems.hull_small_steel, 'I', "ingotSteel", 'S', ModItems.ingot_polymer, 'G', ModItems.mechanism_launcher_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uboinik, 1), new Object[] { "IIM", "SPW", 'P', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'S', Items.stick, 'M', ModItems.mechanism_revolver_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_ks23, 1), new Object[] { "PPM", "SWL", 'P', "plateSteel", 'M', ModItems.mechanism_rifle_1, 'S', Items.stick, 'W', ModItems.wire_tungsten, 'L', "logWood" }));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.gun_sauer, 1), new Object[] { ModItems.ducttape, ModItems.gun_ks23, Blocks.lever, ModItems.gun_ks23 });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', "plateSteel", 'R', ModItems.rod_quad_uranium_fuel_depleted }));
|
||||
|
||||
reg2();
|
||||
}
|
||||
|
||||
public static void reg2() {
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_ks23, 1), new Object[] { "PPM", "SWL", 'P', "plateSteel", 'M', ModItems.mechanism_rifle_1, 'S', Items.stick, 'W', ModItems.wire_tungsten, 'L', "logWood" }));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.gun_sauer, 1), new Object[] { ModItems.ducttape, ModItems.gun_ks23, Blocks.lever, ModItems.gun_ks23 });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', "plateSteel", 'R', ModItems.rod_quad_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', "plateSteel", 'R', ModItems.rod_dual_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted }));
|
||||
@ -831,6 +831,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_silencer, 1), new Object[] { "P ", " P ", " U", 'P', "ingotPolymer", 'U', ModItems.gun_uzi }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_saturnite, 1), new Object[] { "SMS", " PB", " P ", 'S', "ingotSaturnite", 'M', ModItems.mechanism_rifle_2, 'P', "plateSaturnite", 'B', ModItems.bolt_tungsten }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_saturnite_silencer, 1), new Object[] { "P ", " P ", " U", 'P', "ingotPolymer", 'U', ModItems.gun_uzi_saturnite }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolter, 1), new Object[] { "SSM", "PIP", " I ", 'S', ModItems.plate_saturnite, 'I', ModItems.ingot_saturnite, 'M', ModItems.mechanism_special, 'P', "ingotPolymer" }));
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_44, 1), new Object[] { ModItems.gun_revolver_nopip_ammo });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_44_pip, 1), new Object[] { ModItems.gun_revolver_pip_ammo });
|
||||
|
||||
@ -101,6 +101,7 @@ public class ItemRenderWeaponBolter implements IItemRenderer {
|
||||
double s1 = 0.2D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
@ -129,17 +130,18 @@ public class ItemRenderWeaponBolter implements IItemRenderer {
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
String s = ((ItemGunBase)item.getItem()).getMag(item) + "";
|
||||
float f3 = 0.04F;
|
||||
GL11.glTranslatef(-0.025F - (font.getStringWidth(s) / 2) * 0.04F, 2.15F, 2.95F);
|
||||
GL11.glTranslatef(0.025F -(font.getStringWidth(s) / 2) * 0.04F, 2.11F, 2.91F);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glRotatef(45, 1, 0, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
font.drawString(s, 0, 0, 0xff0000);
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
|
||||
@ -23,8 +23,10 @@ public class TileEntityConverterHeRf extends TileEntityMachineBase implements IC
|
||||
}
|
||||
|
||||
public long power;
|
||||
public final long maxPower = 1000000;
|
||||
public EnergyStorage storage = new EnergyStorage(4000000, 2500000, 2500000);
|
||||
public long maxPower = 500000000;
|
||||
public EnergyStorage storage = new EnergyStorage(2000000000, 2000000000, 2000000000);
|
||||
|
||||
public int buf;
|
||||
|
||||
//Thanks to the great people of Fusion Warfare for helping me with this part.
|
||||
|
||||
@ -32,13 +34,10 @@ public class TileEntityConverterHeRf extends TileEntityMachineBase implements IC
|
||||
public void updateEntity() {
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
long convert = Math.min(storage.getMaxEnergyStored() - storage.getEnergyStored(), power * 4);
|
||||
|
||||
power -= convert / 4;
|
||||
storage.setEnergyStored((int) (storage.getEnergyStored() + convert));
|
||||
storage.setCapacity((int)power * 4);
|
||||
storage.setEnergyStored((int)power * 4);
|
||||
|
||||
if(convert > 0)
|
||||
this.markDirty();
|
||||
buf = storage.getEnergyStored();
|
||||
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
@ -57,16 +56,22 @@ public class TileEntityConverterHeRf extends TileEntityMachineBase implements IC
|
||||
}
|
||||
}
|
||||
|
||||
power = storage.getEnergyStored() / 4;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("rf", storage.getEnergyStored());
|
||||
data.setInteger("maxrf", storage.getEnergyStored());
|
||||
data.setLong("he", power);
|
||||
data.setLong("maxhe", power);
|
||||
this.networkPack(data, 25);
|
||||
}
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
storage.setEnergyStored(nbt.getInteger("rf"));
|
||||
storage.setCapacity(nbt.getInteger("maxrf"));
|
||||
power = nbt.getLong("he");
|
||||
maxPower = nbt.getLong("maxhe");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -101,6 +106,10 @@ public class TileEntityConverterHeRf extends TileEntityMachineBase implements IC
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
|
||||
if(power < 1000000)
|
||||
return 500000000;//Long.MAX_VALUE / 100;
|
||||
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
|
||||
@ -16,10 +16,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
public class TileEntityConverterRfHe extends TileEntityMachineBase implements ISource, IEnergyHandler {
|
||||
|
||||
public long power;
|
||||
public final long maxPower = 1000000;
|
||||
public long maxPower = 500000000;
|
||||
public List<IConsumer> list = new ArrayList();
|
||||
public int age = 0;
|
||||
public EnergyStorage storage = new EnergyStorage(4000000, 2500000, 2500000);
|
||||
public boolean tact;
|
||||
public EnergyStorage storage = new EnergyStorage(2000000000, 2000000000, 2000000000);
|
||||
|
||||
public int buf;
|
||||
|
||||
public TileEntityConverterRfHe() {
|
||||
super(0);
|
||||
@ -35,33 +37,32 @@ public class TileEntityConverterRfHe extends TileEntityMachineBase implements IS
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
long convert = Math.min(storage.getEnergyStored(), (maxPower - power) * 4);
|
||||
power = storage.getEnergyStored() / 4;
|
||||
maxPower = Math.max(1000000, power);
|
||||
|
||||
buf = storage.getEnergyStored();
|
||||
|
||||
storage.setEnergyStored((int) (storage.getEnergyStored() - convert));
|
||||
power += convert / 4;
|
||||
tact = false;
|
||||
ffgeuaInit();
|
||||
tact = true;
|
||||
ffgeuaInit();
|
||||
|
||||
if(convert > 0)
|
||||
this.markDirty();
|
||||
|
||||
age++;
|
||||
if(age >= 20)
|
||||
{
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if(age == 9 || age == 19)
|
||||
ffgeuaInit();
|
||||
storage.setEnergyStored((int)power * 4);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("rf", storage.getEnergyStored());
|
||||
data.setInteger("maxrf", storage.getEnergyStored());
|
||||
data.setLong("he", power);
|
||||
data.setLong("maxhe", power);
|
||||
this.networkPack(data, 25);
|
||||
}
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
storage.setEnergyStored(nbt.getInteger("rf"));
|
||||
storage.setCapacity(nbt.getInteger("maxrf"));
|
||||
power = nbt.getLong("he");
|
||||
maxPower = nbt.getLong("maxhe");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -71,6 +72,7 @@ public class TileEntityConverterRfHe extends TileEntityMachineBase implements IS
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
storage.setCapacity(2000000000);
|
||||
return storage.receiveEnergy(maxReceive, simulate);
|
||||
}
|
||||
|
||||
@ -81,6 +83,10 @@ public class TileEntityConverterRfHe extends TileEntityMachineBase implements IS
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ForgeDirection from) {
|
||||
|
||||
if(storage.getEnergyStored() < 4000000)
|
||||
return 2000000000;
|
||||
|
||||
return storage.getMaxEnergyStored();
|
||||
}
|
||||
|
||||
@ -102,12 +108,7 @@ public class TileEntityConverterRfHe extends TileEntityMachineBase implements IS
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age >= 0 && age < 10)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return tact;
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27-3710",
|
||||
"version":"1.0.27-3719",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user