mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'HbmMods:master' into locale_update
This commit is contained in:
commit
20646c407b
34
changelog
34
changelog
@ -1,31 +1,9 @@
|
||||
## Added
|
||||
* Refueling station
|
||||
* Like a charging station, but for fluids
|
||||
|
||||
## Changed
|
||||
* Particle detectors now print an error for when the recipe could not be completed
|
||||
* Night Vision Goggles toggles with armor HUD
|
||||
* Removed "no ore dict data" line from tooltips with extended view enabled
|
||||
* Added a client config called `GUN_ANIMATION_SPEED` which allows the speed of gun animations to be changed
|
||||
* Mostly for debugging, since it only applies to the bus animation system, things like smoke trails and muzzle flashes are unaffected
|
||||
* Item filters can now filter by bedrock ore grade
|
||||
* Meteorite dungeons now use a new structure system
|
||||
* The rooms have been completely changed, and the dungeons are no longer single-level with fixed room sizes
|
||||
* Dungeons no longer lag the game to hell when generating
|
||||
* Decimated bobmazon
|
||||
* All books have been merged into one with way fewer offers
|
||||
* Sells things like basic gear, MREs, plushies, snow globes, and certain things only found in worldgen like jungle tree saplings and NTM flowers (including mustard willow)
|
||||
* Each acidizer recipe now has a "productivity" value which is the percent chance that the effectiveness upgrades use, instead of a fixed 5% per level
|
||||
* This means that certain recipes like re-crystallizing gems no longer allow for item duping
|
||||
* Due to duping no longer being a concern, productivity rates for certain recipes can now be much higher
|
||||
* Things like sawdust to cordite have a 75% chance of not using the input at level 3
|
||||
* Effectiveness no longer increases acid consumption (since many recipes now use the acidizer like a solid output "mixer") but instead adds +200% power consumption per level
|
||||
* Chemical dyes can now also be made with light oil
|
||||
* Large deposits (hematite, malachite, bauxite) and caves (sulfur, asbestos) can now be toggled in the config
|
||||
* Removed recipes for most old particle accelerator parts
|
||||
* Dense coils no longer have recipes either for the most part, all coils with no recipes can be recycled back into dense wires
|
||||
* Natural gas can now be processed in a pyrolysis oven, 12k of gas yields 8k hydrogen and one graphite ingot
|
||||
|
||||
## Fixed
|
||||
* Fixed items being annihilated when shift clicking them into the particle source
|
||||
* Fixed packet optimization not allowing packets to be sent when the day night cycle is halted
|
||||
* Fixed particle detectors not always using power when they should
|
||||
* Fixed rotary furnace voiding low pressure steam when dealing with input numbers not divisible by 100
|
||||
* Fixed state leak causing smoke from the right akimbo weapon to glow when the first one is fired
|
||||
* Fixed incorrect default values for new RBMK dials
|
||||
* Fixed an issue where `/ntmreload` would load fluids after recipes, meaning that recipes using newly added fluids would not work correctly, as the fluids don't exist by the time the recipe is loaded
|
||||
* Fixed bedrock coltan being way too common, drowning out almost all other bedrock ores
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5230
|
||||
mod_build_number=5243
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
|
||||
@ -2,6 +2,8 @@ package api.hbm.energymk2;
|
||||
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.uninos.IGenProvider;
|
||||
import com.hbm.uninos.networkproviders.PowerProvider;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||
@ -12,7 +14,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/** If it sends energy, use this */
|
||||
public interface IEnergyProviderMK2 extends IEnergyHandlerMK2 {
|
||||
public interface IEnergyProviderMK2 extends IEnergyHandlerMK2, IGenProvider<PowerProvider> {
|
||||
|
||||
/** Uses up available power, default implementation has no sanity checking, make sure that the requested power is lequal to the current power */
|
||||
public default void usePower(long power) {
|
||||
|
||||
@ -3,6 +3,8 @@ package api.hbm.energymk2;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.uninos.IGenReceiver;
|
||||
import com.hbm.uninos.networkproviders.PowerProvider;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||
@ -14,7 +16,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/** If it receives energy, use this */
|
||||
@NotableComments
|
||||
public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
|
||||
public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2, IGenReceiver<PowerProvider> {
|
||||
|
||||
public default long transferPower(long power) {
|
||||
if(power + this.getPower() <= this.getMaxPower()) {
|
||||
@ -76,31 +78,6 @@ public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Project MKUltra was an illegal human experiments program designed and undertaken by the U.S. Central Intelligence Agency (CIA)
|
||||
* to develop procedures and identify drugs that could be used during interrogations to weaken people and force confessions through
|
||||
* brainwashing and psychological torture. It began in 1953 and was halted in 1973. MKUltra used numerous methods to manipulate
|
||||
* its subjects' mental states and brain functions, such as the covert administration of high doses of psychoactive drugs (especially LSD)
|
||||
* and other chemicals without the subjects' consent, electroshocks, hypnosis, sensory deprivation, isolation, verbal and sexual
|
||||
* abuse, and other forms of torture.
|
||||
* MKUltra was preceded by Project Artichoke. It was organized through the CIA's Office of Scientific Intelligence and coordinated
|
||||
* with the United States Army Biological Warfare Laboratories. The program engaged in illegal activities, including the
|
||||
* use of U.S. and Canadian citizens as unwitting test subjects. MKUltra's scope was broad, with activities carried
|
||||
* out under the guise of research at more than 80 institutions aside from the military, including colleges and universities,
|
||||
* hospitals, prisons, and pharmaceutical companies. The CIA operated using front organizations, although some top officials at these
|
||||
* institutions were aware of the CIA's involvement.
|
||||
* MKUltra was revealed to the public in 1975 by the Church Committee of the United States Congress and Gerald Ford's United States
|
||||
* President's Commission on CIA activities within the United States (the Rockefeller Commission). Investigative efforts were hampered
|
||||
* by CIA Director Richard Helms's order that all MKUltra files be destroyed in 1973; the Church Committee and Rockefeller Commission
|
||||
* investigations relied on the sworn testimony of direct participants and on the small number of documents that survived Helms's order.
|
||||
* In 1977, a Freedom of Information Act request uncovered a cache of 20,000 documents relating to MKUltra, which led to Senate hearings.
|
||||
* Some surviving information about MKUltra was declassified in 2001.
|
||||
* */
|
||||
public default ConnectionPriority getPriority() {
|
||||
return ConnectionPriority.NORMAL;
|
||||
}
|
||||
|
||||
/** More is better-er */
|
||||
public enum ConnectionPriority {
|
||||
LOWEST,
|
||||
LOW,
|
||||
|
||||
@ -2,21 +2,28 @@ package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardSender;
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockFissure extends Block implements IBlockMultiPass {
|
||||
public class BlockFissure extends BlockContainer implements IBlockMultiPass {
|
||||
|
||||
private IIcon overlay;
|
||||
|
||||
@ -65,4 +72,31 @@ public class BlockFissure extends Block implements IBlockMultiPass {
|
||||
public int getRenderType(){
|
||||
return IBlockMultiPass.getRenderType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityFissure();
|
||||
}
|
||||
|
||||
public static class TileEntityFissure extends TileEntityLoadedBase implements IFluidStandardSender {
|
||||
|
||||
public FluidTank lava = new FluidTank(Fluids.LAVA, 1_000);
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
lava.setFill(1_000);
|
||||
this.sendFluid(lava, worldObj, xCoord, yCoord + 1, zCoord, ForgeDirection.UP);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(FluidType type, ForgeDirection dir) {
|
||||
return dir == ForgeDirection.DOWN && type == Fluids.LAVA;
|
||||
}
|
||||
|
||||
@Override public FluidTank[] getAllTanks() { return new FluidTank[] {lava}; }
|
||||
@Override public FluidTank[] getSendingTanks() { return new FluidTank[] {lava}; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.recipes.PedestalRecipes;
|
||||
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
@ -21,6 +24,7 @@ import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@ -169,6 +173,9 @@ public class BlockPedestal extends BlockContainer {
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
ExplosionSmallCreator.composeEffect(world, x + 0.5, y + 1.5, z + 0.5, 10, 2.5F, 1F);
|
||||
|
||||
List<EntityPlayer> players = world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x + 0.5, y, z + 0.5, x + 0.5, y, z + 0.5).expand(50, 50, 50));
|
||||
for(EntityPlayer player : players) player.addStat(MainRegistry.statLegendary, 1);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,10 +26,10 @@ public class CommandReloadRecipes extends CommandBase {
|
||||
@Override
|
||||
public void processCommand(ICommandSender sender, String[] args) {
|
||||
try {
|
||||
Fluids.reloadFluids();
|
||||
SerializableRecipe.initialize();
|
||||
ItemPoolConfigJSON.initialize();
|
||||
DamageResistanceHandler.init();
|
||||
Fluids.reloadFluids();
|
||||
|
||||
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Reload complete :)"));
|
||||
} catch(Exception ex) {
|
||||
|
||||
@ -74,6 +74,13 @@ public class WorldConfig {
|
||||
|
||||
public static int endTikiteSpawn = 8;
|
||||
|
||||
public static boolean enableHematite = true;
|
||||
public static boolean enableMalachite = true;
|
||||
public static boolean enableBauxite = true;
|
||||
|
||||
public static boolean enableSulfurCave = true;
|
||||
public static boolean enableAsbestosCave = true;
|
||||
|
||||
public static int radioStructure = 500;
|
||||
public static int antennaStructure = 250;
|
||||
public static int atomStructure = 500;
|
||||
@ -189,6 +196,13 @@ public class WorldConfig {
|
||||
|
||||
endTikiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.E00_tikiteSpawnrate", "Amount of end trixite per chunk", 8);
|
||||
|
||||
enableHematite = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.L00_enableHematite", "Toggles hematite deposits", true);
|
||||
enableMalachite = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.L01_enableMalachite", "Toggles malachite deposits", true);
|
||||
enableBauxite = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.L02_enableBauxite", "Toggles bauxite deposits", true);
|
||||
|
||||
enableSulfurCave = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.C00_enableSulfurCave", "Toggles sulfur caves", true);
|
||||
enableAsbestosCave = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.C01_enableAsbestosCave", "Toggles asbestos caves", true);
|
||||
|
||||
final String CATEGORY_DUNGEON = CommonConfig.CATEGORY_DUNGEONS;
|
||||
radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
|
||||
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);
|
||||
|
||||
@ -79,7 +79,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModItems.rtg_unit, 1), new AStack[] {new ComparableStack(ModItems.thermo_element, 2), new OreDictStack(CU.plateCast(), 1), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CAPACITOR.ordinal()), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.levitation_unit, 1), new AStack[] {new ComparableStack(ModItems.coil_copper, 4), new ComparableStack(ModItems.coil_tungsten, 2), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.nugget_schrabidium, 2), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.drill_titanium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(DURA.ingot(), 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack(TI.plate(), 6), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.entanglement_kit, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(DURA.ingot(), 4), new OreDictStack(CU.plate(), 24), new ComparableStack(ModBlocks.hadron_coil_gold, 4), new OreDictStack(Fluids.XENON.getDict(1_000))},200);
|
||||
makeRecipe(new ComparableStack(ModItems.entanglement_kit, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(DURA.ingot(), 4), new OreDictStack(CU.plate(), 24), new OreDictStack(GOLD.wireDense(), 16), new OreDictStack(Fluids.XENON.getDict(1_000))},200);
|
||||
makeRecipe(new ComparableStack(ModItems.dysfunctional_reactor, 1), new AStack[] {new OreDictStack(STEEL.plate(), 15), new OreDictStack(PB.ingot(), 5), new ComparableStack(ModItems.rod_quad_empty, 10), new OreDictStack("dyeBrown", 3), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_assembly, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new OreDictStack(AL.shell(), 2), new OreDictStack(TI.plate(), 8), new OreDictStack(ANY_PLASTIC.ingot(), 8), new ComparableStack(ModItems.rocket_fuel, 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), }, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_generic_small, 1), new AStack[] {new OreDictStack(TI.plate(), 5), new OreDictStack(STEEL.plate(), 3), new ComparableStack(ModItems.ball_dynamite, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CHIP) },100);
|
||||
@ -552,8 +552,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_cyclotron, 1), new AStack[] {
|
||||
new ComparableStack(ModBlocks.machine_lithium_battery, 3),
|
||||
new ComparableStack(ModBlocks.hadron_coil_neodymium, 8),
|
||||
new OreDictStack(ALLOY.wireDense(), 16),
|
||||
new OreDictStack(ND.wireDense(), 32),
|
||||
!exp ? new OreDictStack(STEEL.ingot(), 16) : new OreDictStack(STEEL.heavyComp(), 3),
|
||||
new OreDictStack(STEEL.plate528(), 32),
|
||||
new OreDictStack(AL.plate528(), 32),
|
||||
@ -1149,16 +1148,6 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
new ComparableStack(ModItems.circuit, 10, EnumCircuitType.CAPACITOR_BOARD),
|
||||
}, 300);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.hadron_core, 1), new AStack[] {
|
||||
new ComparableStack(ModBlocks.hadron_coil_alloy, 24),
|
||||
new OreDictStack(STEEL.ingot(), 8),
|
||||
new OreDictStack(ANY_PLASTIC.ingot(), 16),
|
||||
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8),
|
||||
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID),
|
||||
new ComparableStack(ModItems.circuit, 192, EnumCircuitType.CAPACITOR_BOARD),
|
||||
new ComparableStack(ModItems.crt_display, 1),
|
||||
}, 300);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.struct_launcher_core, 1), new AStack[] {
|
||||
new ComparableStack(ModBlocks.machine_battery, 3),
|
||||
new ComparableStack(ModBlocks.steel_scaffold, 10),
|
||||
|
||||
@ -56,18 +56,6 @@ public class MagicRecipes {
|
||||
new ComparableStack(ModItems.powder_dineutronium),
|
||||
new ComparableStack(ModItems.blades_desh),
|
||||
new ComparableStack(ModItems.diamond_gavel)));
|
||||
|
||||
recipes.add(new MagicRecipe(new ItemStack(ModBlocks.hadron_coil_mese),
|
||||
new ComparableStack(ModBlocks.hadron_coil_chlorophyte),
|
||||
new ComparableStack(ModItems.powder_dineutronium),
|
||||
new ComparableStack(ModItems.plate_desh),
|
||||
new OreDictStack(GOLD.dust())));
|
||||
|
||||
recipes.add(new MagicRecipe(new ItemStack(ModBlocks.hadron_coil_mese),
|
||||
new ComparableStack(ModBlocks.hadron_coil_chlorophyte),
|
||||
new OreDictStack(DNT.wireDense()),
|
||||
new OreDictStack(W.wireDense()),
|
||||
new OreDictStack(GOLD.wireDense())));
|
||||
}
|
||||
|
||||
public static List<MagicRecipe> getRecipes() {
|
||||
|
||||
@ -118,6 +118,10 @@ public class PyroOvenRecipes extends SerializableRecipe {
|
||||
recipes.add(new PyroOvenRecipe(60)
|
||||
.in(new FluidStack(GAS_COKER, 4_000))
|
||||
.out(new FluidStack(Fluids.REFORMGAS, 100)));
|
||||
//hydrogen and carbon from natgas
|
||||
recipes.add(new PyroOvenRecipe(60)
|
||||
.in(new FluidStack(Fluids.GAS, 12_000))
|
||||
.out(new FluidStack(Fluids.HYDROGEN, 8_000)).out(new ItemStack(ModItems.ingot_graphite, 1)));
|
||||
}
|
||||
|
||||
private static void registerSFAuto(FluidType fluid) {
|
||||
|
||||
@ -1417,7 +1417,6 @@ public class ModItems {
|
||||
|
||||
public static Item missile_custom;
|
||||
|
||||
public static Item missile_carrier;
|
||||
public static Item missile_soyuz;
|
||||
public static Item missile_soyuz_lander;
|
||||
public static Item sat_mapper;
|
||||
@ -2893,7 +2892,7 @@ public class ModItems {
|
||||
demon_core_open = new ItemDemonCore().setUnlocalizedName("demon_core_open").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":demon_core_open");
|
||||
demon_core_closed = new Item().setUnlocalizedName("demon_core_closed").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":demon_core_closed");
|
||||
|
||||
pa_coil = new ItemPACoil().setUnlocalizedName("pa_coil").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":pa_coil");
|
||||
pa_coil = new ItemPACoil().setUnlocalizedName("pa_coil").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pa_coil");
|
||||
|
||||
particle_empty = new Item().setUnlocalizedName("particle_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":particle_empty");
|
||||
particle_hydrogen = new Item().setUnlocalizedName("particle_hydrogen").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_hydrogen");
|
||||
@ -3649,7 +3648,6 @@ public class ModItems {
|
||||
missile_shuttle = new ItemMissile(MissileFormFactor.OTHER, MissileTier.TIER3, MissileFuel.KEROSENE_PEROXIDE).setUnlocalizedName("missile_shuttle").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_shuttle");
|
||||
missile_stealth = new ItemMissile(MissileFormFactor.STRONG, MissileTier.TIER1).setUnlocalizedName("missile_stealth").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_stealth");
|
||||
missile_test = new ItemMissile(MissileFormFactor.MICRO, MissileTier.TIER0).setUnlocalizedName("missile_test").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":missile_micro");
|
||||
missile_carrier = new Item().setUnlocalizedName("missile_carrier").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":missile_carrier");
|
||||
missile_soyuz = new ItemSoyuz().setUnlocalizedName("missile_soyuz").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz");
|
||||
missile_soyuz_lander = new ItemCustomLore().setUnlocalizedName("missile_soyuz_lander").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz_lander");
|
||||
missile_custom = new ItemCustomMissile().setUnlocalizedName("missile_custom").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":missile_custom");
|
||||
@ -6273,7 +6271,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(missile_doomsday, missile_doomsday.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_doomsday_rusted, missile_doomsday_rusted.getUnlocalizedName());
|
||||
//Rockets
|
||||
GameRegistry.registerItem(missile_carrier, missile_carrier.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_soyuz, missile_soyuz.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_soyuz_lander, missile_soyuz_lander.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_custom, missile_custom.getUnlocalizedName());
|
||||
|
||||
@ -168,14 +168,11 @@ public class ItemAssemblyTemplate extends Item {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean nbtType = true;
|
||||
|
||||
//NEW
|
||||
ComparableStack out = readType(stack);
|
||||
//LEGACY
|
||||
if(out == null) {
|
||||
out = AssemblerRecipes.recipeList.get(i);
|
||||
nbtType = false;
|
||||
}
|
||||
|
||||
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(out);
|
||||
@ -202,13 +199,6 @@ public class ItemAssemblyTemplate extends Item {
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", String.join(" / ", names)));
|
||||
|
||||
if(nbtType) {
|
||||
list.add(EnumChatFormatting.GREEN + "Persistent template");
|
||||
} else {
|
||||
list.add(EnumChatFormatting.RED + "Volatile template");
|
||||
}
|
||||
|
||||
list.add("");
|
||||
|
||||
if(out == null) {
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.inventory.gui.GUIScreenTemplateFolder;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -14,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemTemplateFolder extends Item implements IGUIProvider {
|
||||
@ -31,8 +33,9 @@ public class ItemTemplateFolder extends Item implements IGUIProvider {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
String[] lang = I18nUtil.resolveKeyArray(ModItems.template_folder.getUnlocalizedName() + ".desc");
|
||||
EnumChatFormatting color = BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW;
|
||||
for(String line : lang) {
|
||||
list.add(line);
|
||||
list.add(color + line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.particle.helper.AshesCreator;
|
||||
@ -10,6 +11,8 @@ import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@ -39,6 +42,12 @@ public class ConfettiUtil {
|
||||
}
|
||||
|
||||
public static void gib(EntityLivingBase entity) {
|
||||
if(entity instanceof EntityCyberCrab) return;
|
||||
if(entity instanceof EntityTeslaCrab) return;
|
||||
if(entity instanceof EntityTaintCrab) return;
|
||||
if(entity instanceof EntitySkeleton) return;
|
||||
if(entity instanceof EntitySlime) return;
|
||||
|
||||
NBTTagCompound vdat = new NBTTagCompound();
|
||||
vdat.setString("type", "giblets");
|
||||
vdat.setInteger("ent", entity.getEntityId());
|
||||
|
||||
@ -22,6 +22,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.SmokeNode;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.helper.BlackPowderCreator;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
@ -238,6 +239,7 @@ public class Lego {
|
||||
}
|
||||
}
|
||||
|
||||
if(player != null) player.addStat(MainRegistry.statBullets, 1);
|
||||
mag.useUpAmmo(stack, ctx.inventory, 1);
|
||||
if(calcWear) ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear, ctx.config.getDurability(stack)));
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
int colZ = (int) (colRand.nextGaussian() * 1500);
|
||||
int colRange = 750;
|
||||
|
||||
if((GeneralConfig.enable528BedrockSpawn || GeneralConfig.enable528BedrockDeposit) && rand.nextInt(GeneralConfig.bedrockRate) != 0) {
|
||||
if((GeneralConfig.enable528BedrockSpawn || GeneralConfig.enable528BedrockDeposit) && rand.nextInt(GeneralConfig.bedrockRate) == 0) {
|
||||
int x = i + rand.nextInt(16) + 8;
|
||||
int z = j + rand.nextInt(16) + 8;
|
||||
|
||||
@ -302,14 +302,6 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
/*if(WorldConfig.siloStructure > 0 && rand.nextInt(WorldConfig.siloStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
new Silo().generate(world, rand, x, y, z);
|
||||
}*/
|
||||
|
||||
if(WorldConfig.factoryStructure > 0 && rand.nextInt(WorldConfig.factoryStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
|
||||
@ -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 (5230)";
|
||||
public static final String VERSION = "1.0.27 BETA (5243)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -447,7 +447,7 @@ public class ClientProxy extends ServerProxy {
|
||||
double[] sfp = new double[] {1.36, 1.36, 0.68};
|
||||
double[] rir = new double[] {0, 0, 0};
|
||||
double[] tir = new double[] {0, 0, 0};
|
||||
double[] sir = new double[] {1.1, 1.1, 1.1};
|
||||
double[] sir = new double[] {1, 1, 1};
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.titanium_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.alloy_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
@ -500,7 +500,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.missile_volcano, new ItemRenderMissileGeneric(RenderMissileType.TYPE_NUCLEAR));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.missile_doomsday, new ItemRenderMissileGeneric(RenderMissileType.TYPE_NUCLEAR));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.missile_doomsday_rusted, new ItemRenderMissileGeneric(RenderMissileType.TYPE_NUCLEAR));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.missile_carrier, new ItemRenderMissileGeneric(RenderMissileType.TYPE_CARRIER));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.missile_shuttle, new ItemRenderMissileGeneric(RenderMissileType.TYPE_ROBIN));
|
||||
|
||||
//templates
|
||||
|
||||
@ -775,39 +775,50 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.mech_key, 1), new Object[] { "MCM", "MKM", "MMM", 'M', ModItems.ingot_meteorite_forged, 'C', ModItems.coin_maskman, 'K', ModItems.key });
|
||||
addRecipeAuto(new ItemStack(ModItems.spawn_ufo, 1), new Object[] { "MMM", "DCD", "MMM", 'M', ModItems.ingot_meteorite, 'D', DNT.ingot(), 'C', ModItems.coin_worm });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_alloy, 1), new Object[] { "WWW", "WCW", "WWW", 'W', ALLOY.wireFine(), 'C', ModBlocks.fusion_conductor });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 4, Mats.MAT_GOLD.id), new Object[] { ModBlocks.hadron_coil_gold });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 4, Mats.MAT_NEODYMIUM.id), new Object[] { ModBlocks.hadron_coil_neodymium });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 4, Mats.MAT_MAGTUNG.id), new Object[] { ModBlocks.hadron_coil_magtung });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 2, Mats.MAT_SCHRABIDIUM.id), new Object[] { ModBlocks.hadron_coil_schrabidium });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 2, Mats.MAT_SCHRABIDATE.id), new Object[] { ModBlocks.hadron_coil_schrabidate });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 2, Mats.MAT_STAR.id), new Object[] { ModBlocks.hadron_coil_starmetal });
|
||||
addShapelessAuto(new ItemStack(ModItems.powder_chlorophyte, 2), new Object[] { ModBlocks.hadron_coil_chlorophyte });
|
||||
addShapelessAuto(new ItemStack(ModItems.wire_dense, 1, Mats.MAT_DNT.id), new Object[] { ModBlocks.hadron_coil_mese });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_blue });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_black });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_yellow });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_striped });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_glass });
|
||||
addShapelessAuto(new ItemStack(ModItems.plate_cast, 1, Mats.MAT_STEEL.id), new Object[] { ModBlocks.hadron_plating_voltz });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), new Object[] { ModBlocks.hadron_analysis });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), new Object[] { ModBlocks.hadron_analysis_glass });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_alloy, 1), new Object[] { "WW", "WW", 'W', ALLOY.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_gold, 1), new Object[] { "PGP", "PCP", "PGP", 'G', GOLD.dust(), 'C', ModBlocks.hadron_coil_alloy, 'P', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_gold, 1), new Object[] { "WG", "GW", 'W', ALLOY.wireDense(), 'G', GOLD.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_neodymium, 1), new Object[] { "G", "C", "G", 'G', ND.dust(), 'C', ModBlocks.hadron_coil_gold });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_neodymium, 1), new Object[] { "WG", "GW", 'W', ND.wireDense(), 'G', GOLD.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_magtung, 1), new Object[] { "WW", "WW", 'W', MAGTUNG.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_schrabidium, 1), new Object[] { "WWW", "WCW", "WWW", 'W', SA326.wireFine(), 'C', ModBlocks.hadron_coil_magtung });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_schrabidium, 1), new Object[] { "WS", "SW", 'W', MAGTUNG.wireDense(), 'S', SA326.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_schrabidate, 1), new Object[] { " S ", "SCS", " S ", 'S', SBD.dust(), 'C', ModBlocks.hadron_coil_schrabidium });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_schrabidate, 1), new Object[] { "WS", "SW", 'W', SBD.wireDense(), 'S', SA326.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_starmetal, 1), new Object[] { "SNS", "SCS", "SNS", 'S', STAR.ingot(), 'N', ModBlocks.hadron_coil_neodymium, 'C', ModBlocks.hadron_coil_schrabidate });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_starmetal, 1), new Object[] { "SW", "WS", 'W', SBD.wireDense(), 'S', STAR.wireDense() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_chlorophyte, 1), new Object[] { "TCT", "TST", "TCT", 'T', ModItems.coil_tungsten, 'C', ModItems.powder_chlorophyte, 'S', ModBlocks.hadron_coil_starmetal });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_chlorophyte, 1), new Object[] { "TC", "CT", 'T', W.wireDense(), 'C', ModItems.powder_chlorophyte });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_diode, 1), new Object[] { "CIC", "ISI", "CIC", 'C', ModBlocks.hadron_coil_alloy, 'I', STEEL.ingot(), 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_plating, 16), new Object[] { "CC", "CC", 'C', STEEL.plateCast()});
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_blue, 1), new Object[] { ModBlocks.hadron_plating, KEY_BLUE });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_black, 1), new Object[] { ModBlocks.hadron_plating, KEY_BLACK });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_yellow, 1), new Object[] { ModBlocks.hadron_plating, KEY_YELLOW });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_striped, 1), new Object[] { ModBlocks.hadron_plating, KEY_BLACK, KEY_YELLOW });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_glass, 1), new Object[] { ModBlocks.hadron_plating, KEY_ANYGLASS });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_voltz, 1), new Object[] { ModBlocks.hadron_plating, KEY_RED });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_power, 1), new Object[] { "SFS", "FTF", "SFS", 'S', BIGMT.ingot(), 'T', ModBlocks.machine_transformer, 'F', ModItems.fuse });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_power_10m, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power, 'F', ModItems.fuse });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_power_100m, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power_10m, 'F', ModItems.fuse });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_power_1g, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power_100m, 'F', ModItems.fuse });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_power_10g, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power_1g, 'F', ModItems.fuse });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_analysis, 1), new Object[] { "IPI", "PCP", "IPI", 'I', TI.ingot(), 'P', getReflector(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.hadron_analysis_glass, 1), new Object[] { ModBlocks.hadron_analysis, KEY_ANYGLASS });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_access, 1), new Object[] { "IGI", "CRC", "IPI", 'I', ModItems.plate_polymer, 'G', KEY_ANYPANE, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'R', REDSTONE.block(), 'P', ModBlocks.hadron_plating_blue });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_cooler, 1, 0), new Object[] { "PCP", "CHC", "PCP", 'P', ANY_RESISTANTALLOY.plateCast(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'H', Fluids.HELIUM4.getDict(16_000) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_cooler, 1, 1), new Object[] { "PCP", "CHC", "PCP", 'P', GOLD.plateCast(), 'C', ModItems.motor_bismuth, 'H', new ItemStack(ModBlocks.hadron_cooler, 1, 0) });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_gold, 1), new Object[] { "WG", "GW", 'W', ALLOY.wireDense(), 'G', GOLD.wireDense() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_neodymium, 1), new Object[] { "WG", "GW", 'W', ND.wireDense(), 'G', GOLD.wireDense() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_magtung, 1), new Object[] { "WW", "WW", 'W', MAGTUNG.wireDense() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_schrabidium, 1), new Object[] { "WS", "SW", 'W', MAGTUNG.wireDense(), 'S', SA326.wireDense() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_schrabidate, 1), new Object[] { "WS", "SW", 'W', SBD.wireDense(), 'S', SA326.wireDense() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_starmetal, 1), new Object[] { "SW", "WS", 'W', SBD.wireDense(), 'S', STAR.wireDense() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_coil_chlorophyte, 1), new Object[] { "TC", "CT", 'T', CU.wireDense(), 'C', ModItems.powder_chlorophyte });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_diode, 1), new Object[] { "CIC", "ISI", "CIC", 'C', ModBlocks.hadron_coil_alloy, 'I', STEEL.ingot(), 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_plating, 16), new Object[] { "CC", "CC", 'C', STEEL.plateCast()});
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_blue, 1), new Object[] { ModBlocks.hadron_plating, KEY_BLUE });
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_black, 1), new Object[] { ModBlocks.hadron_plating, KEY_BLACK });
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_yellow, 1), new Object[] { ModBlocks.hadron_plating, KEY_YELLOW });
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_striped, 1), new Object[] { ModBlocks.hadron_plating, KEY_BLACK, KEY_YELLOW });
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_glass, 1), new Object[] { ModBlocks.hadron_plating, KEY_ANYGLASS });
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_plating_voltz, 1), new Object[] { ModBlocks.hadron_plating, KEY_RED });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_power, 1), new Object[] { "SFS", "FTF", "SFS", 'S', BIGMT.ingot(), 'T', ModBlocks.machine_transformer, 'F', ModItems.fuse });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_power_10m, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power, 'F', ModItems.fuse });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_power_100m, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power_10m, 'F', ModItems.fuse });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_power_1g, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power_100m, 'F', ModItems.fuse });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_power_10g, 1), new Object[] { "HF", 'H', ModBlocks.hadron_power_1g, 'F', ModItems.fuse });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_analysis, 1), new Object[] { "IPI", "PCP", "IPI", 'I', TI.ingot(), 'P', getReflector(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
//addShapelessAuto(new ItemStack(ModBlocks.hadron_analysis_glass, 1), new Object[] { ModBlocks.hadron_analysis, KEY_ANYGLASS });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_access, 1), new Object[] { "IGI", "CRC", "IPI", 'I', ModItems.plate_polymer, 'G', KEY_ANYPANE, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'R', REDSTONE.block(), 'P', ModBlocks.hadron_plating_blue });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_cooler, 1, 0), new Object[] { "PCP", "CHC", "PCP", 'P', ANY_RESISTANTALLOY.plateCast(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'H', Fluids.HELIUM4.getDict(16_000) });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.hadron_cooler, 1, 1), new Object[] { "PCP", "CHC", "PCP", 'P', GOLD.plateCast(), 'C', ModItems.motor_bismuth, 'H', new ItemStack(ModBlocks.hadron_cooler, 1, 0) });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fireworks, 1), new Object[] { "PPP", "PPP", "WIW", 'P', Items.paper, 'W', KEY_PLANKS, 'I', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.safety_fuse, 8), new Object[] { "SSS", "SGS", "SSS", 'S', Items.string, 'G', Items.gunpowder });
|
||||
@ -1140,8 +1151,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cm_flux, 1, 0), "NNN", "ZCZ", "NNN", 'Z', ZR.plateCast(), 'N', ModItems.neutron_reflector, 'C', ModItems.reactor_core);
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cm_heat, 1, 0), "PCP", "PCP", "PCP", 'P', ModItems.plate_polymer, 'C', CU.ingot());
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.missile_soyuz), new ItemStack(ModItems.missile_carrier));
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.plushie, 1, PlushieType.YOMI.ordinal()), "LCR", 'L', "cropCarrot", 'C', ModItems.rag, 'R', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE));
|
||||
addRecipeAuto(new ItemStack(ModBlocks.plushie, 1, PlushieType.NUMBERNINE.ordinal()), " C ", "LCR", " C ", 'L', ModItems.cigarette, 'C', ModItems.rag, 'R', COAL.gem());
|
||||
}
|
||||
|
||||
@ -73,7 +73,10 @@ import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.stats.StatBase;
|
||||
import net.minecraft.stats.StatBasic;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
@ -164,6 +167,11 @@ public class MainRegistry {
|
||||
public static CreativeTabs weaponTab = new WeaponTab(CreativeTabs.getNextID(), "tabWeapon"); // turrets, weapons, ammo
|
||||
public static CreativeTabs consumableTab = new ConsumableTab(CreativeTabs.getNextID(), "tabConsumable"); // drinks, kits, tools
|
||||
|
||||
// Statistics
|
||||
public static StatBase statLegendary;
|
||||
public static StatBase statMines;
|
||||
public static StatBase statBullets;
|
||||
|
||||
// Achievements
|
||||
public static Achievement achSacrifice;
|
||||
public static Achievement achImpossible;
|
||||
@ -656,6 +664,10 @@ public class MainRegistry {
|
||||
|
||||
RodRecipes.registerInit();
|
||||
|
||||
statLegendary = new StatBasic("stat.ntmLegendary", new ChatComponentTranslation("stat.ntmLegendary")).registerStat();
|
||||
statMines = new StatBasic("stat.ntmMines", new ChatComponentTranslation("stat.ntmMines")).registerStat();
|
||||
statBullets = new StatBasic("stat.ntmBullets", new ChatComponentTranslation("stat.ntmBullets")).registerStat();
|
||||
|
||||
achSacrifice = new Achievement("achievement.sacrifice", "sacrifice", -3, 1, ModItems.burnt_bark, null).initIndependentStat().setSpecial().registerStat();
|
||||
achImpossible = new Achievement("achievement.impossible", "impossible", 18, 10, ModItems.nothing, null).initIndependentStat().setSpecial().registerStat();
|
||||
achTOB = new Achievement("achievement.tasteofblood", "tasteofblood", 3, 10, new ItemStack(ModItems.fluid_icon, 1, Fluids.ASCHRAB.getID()), null).initIndependentStat().setSpecial().registerStat();
|
||||
@ -710,7 +722,7 @@ public class MainRegistry {
|
||||
achCentrifuge = new Achievement("achievement.centrifuge", "centrifuge", 12, -2, new ItemStack(ModBlocks.machine_centrifuge), achPolymer).initIndependentStat().registerStat();
|
||||
achFOEQ = new Achievement("achievement.FOEQ", "FOEQ", 5, 5, ModItems.sat_foeq, achDesh).initIndependentStat().setSpecial().registerStat();
|
||||
achSoyuz = new Achievement("achievement.soyuz", "soyuz", 7, 6, Items.baked_potato, achDesh).initIndependentStat().setSpecial().registerStat();
|
||||
achSpace = new Achievement("achievement.space", "space", 9, 7, ModItems.missile_carrier, achDesh).initIndependentStat().setSpecial().registerStat();
|
||||
achSpace = new Achievement("achievement.space", "space", 9, 7, ModItems.missile_soyuz, achDesh).initIndependentStat().setSpecial().registerStat();
|
||||
achSchrab = new Achievement("achievement.schrab", "schrab", 11, 3, ModItems.ingot_schrabidium, achDesh).initIndependentStat().registerStat();
|
||||
achAcidizer = new Achievement("achievement.acidizer", "acidizer", 11, 5, new ItemStack(ModBlocks.machine_crystallizer), achDesh).initIndependentStat().registerStat();
|
||||
achRadium = new Achievement("achievement.radium", "radium", 13, -4, ModItems.coffee_radium, achCentrifuge).initIndependentStat().setSpecial().registerStat();
|
||||
@ -870,11 +882,11 @@ public class MainRegistry {
|
||||
MinecraftForge.EVENT_BUS.register(new SchistStratum()); //DecorateBiomeEvent.Pre
|
||||
//MinecraftForge.EVENT_BUS.register(new DeepLayer()); //DecorateBiomeEvent.Pre
|
||||
|
||||
new OreCave(ModBlocks.stone_resource, 0).setThreshold(1.5D).setRangeMult(20).setYLevel(30).setMaxRange(20).withFluid(ModBlocks.sulfuric_acid_block); //sulfur
|
||||
new OreCave(ModBlocks.stone_resource, 1).setThreshold(1.75D).setRangeMult(20).setYLevel(25).setMaxRange(20); //asbestos
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.HEMATITE.ordinal()).setScaleH(0.04D).setScaleV(0.25D).setThreshold(230);
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.BAUXITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(300);
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.1D).setScaleV(0.15D).setThreshold(275);
|
||||
if(WorldConfig.enableSulfurCave) new OreCave(ModBlocks.stone_resource, 0).setThreshold(1.5D).setRangeMult(20).setYLevel(30).setMaxRange(20).withFluid(ModBlocks.sulfuric_acid_block); //sulfur
|
||||
if(WorldConfig.enableAsbestosCave) new OreCave(ModBlocks.stone_resource, 1).setThreshold(1.75D).setRangeMult(20).setYLevel(25).setMaxRange(20); //asbestos
|
||||
if(WorldConfig.enableHematite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.HEMATITE.ordinal()).setScaleH(0.04D).setScaleV(0.25D).setThreshold(230);
|
||||
if(WorldConfig.enableMalachite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.BAUXITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(300);
|
||||
if(WorldConfig.enableBauxite) new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.1D).setScaleV(0.15D).setThreshold(275);
|
||||
//new BiomeCave().setThreshold(1.5D).setRangeMult(20).setYLevel(40).setMaxRange(20);
|
||||
//new OreLayer(Blocks.coal_ore, 0.2F).setThreshold(4).setRangeMult(3).setYLevel(70);
|
||||
BedrockOre.init();
|
||||
@ -1647,6 +1659,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.bobmazon_machines");
|
||||
ignoreMappings.add("hbm:item.bobmazon_weapons");
|
||||
ignoreMappings.add("hbm:item.bobmazon_tools");
|
||||
ignoreMappings.add("hbm:item.missile_carrier");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -31,7 +31,6 @@ public class ItemRenderMissileGeneric implements IItemRenderer {
|
||||
TYPE_STEALTH,
|
||||
TYPE_ABM,
|
||||
TYPE_NUCLEAR,
|
||||
TYPE_CARRIER,
|
||||
TYPE_ROBIN
|
||||
}
|
||||
|
||||
@ -75,7 +74,6 @@ public class ItemRenderMissileGeneric implements IItemRenderer {
|
||||
case TYPE_STEALTH: guiScale = 1.75D; guiOffset = 4.75D; break;
|
||||
case TYPE_ABM: guiScale = 2.25D; guiOffset = 7D; break;
|
||||
case TYPE_NUCLEAR: guiScale = 1.375D; guiOffset = 1.5D; break;
|
||||
case TYPE_CARRIER: guiScale = 0.625D; guiOffset = -17D; break;
|
||||
case TYPE_ROBIN: guiScale = 1.25D; guiOffset = 2D; break;
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.blocks.generic.BlockBedrockOreTE.TileEntityBedrockOre;
|
||||
import com.hbm.blocks.generic.BlockBobble.TileEntityBobble;
|
||||
import com.hbm.blocks.generic.BlockDynamicSlag.TileEntitySlag;
|
||||
import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
||||
import com.hbm.blocks.generic.BlockFissure.TileEntityFissure;
|
||||
import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner;
|
||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
||||
@ -229,6 +230,7 @@ public class TileMappings {
|
||||
put(TileEntityProxyConductor.class, "tileentity_proxy_conductor");
|
||||
|
||||
put(TileEntityBedrockOre.class, "tileentity_bedrock_ore");
|
||||
put(TileEntityFissure.class, "tileentity_fissure");
|
||||
|
||||
put(TileEntityBlockPWR.class, "tileentity_block_pwr");
|
||||
put(TileEntityPWRController.class, "tileentity_pwr_controller");
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.bomb;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.bomb.Landmine;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -57,6 +58,7 @@ public class TileEntityLandmine extends TileEntity {
|
||||
if(isPrimed) {
|
||||
//the explosion is part of the mine block so that the IBomb interface works, i remember now
|
||||
landmine.explode(worldObj, xCoord, yCoord, zCoord);
|
||||
if(o instanceof EntityPlayer) ((EntityPlayer) o).addStat(MainRegistry.statMines, 1);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.packet.toclient.TEVaultPacket;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -289,7 +290,8 @@ public class TileEntityBlastDoor extends TileEntityLockableBase {
|
||||
|
||||
public boolean placeDummy(int x, int y, int z) {
|
||||
|
||||
if(!worldObj.getBlock(x, y, z).isReplaceable(worldObj, x, y, z)) worldObj.func_147480_a(x, y, z, false);
|
||||
Block present = worldObj.getBlock(x, y, z);
|
||||
if(!present.isReplaceable(worldObj, x, y, z) && present != ModBlocks.dummy_block_blast) worldObj.func_147480_a(x, y, z, false);
|
||||
|
||||
worldObj.setBlock(x, y, z, ModBlocks.dummy_block_blast);
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.packet.toclient.TEVaultPacket;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -195,7 +196,8 @@ public class TileEntityVaultDoor extends TileEntityLockableBase {
|
||||
|
||||
public boolean placeDummy(int x, int y, int z) {
|
||||
|
||||
if(!worldObj.getBlock(x, y, z).isReplaceable(worldObj, x, y, z)) worldObj.func_147480_a(x, y, z, false);
|
||||
Block present = worldObj.getBlock(x, y, z);
|
||||
if(!present.isReplaceable(worldObj, x, y, z) && present != ModBlocks.dummy_block_vault) worldObj.func_147480_a(x, y, z, false);
|
||||
|
||||
worldObj.setBlock(x, y, z, ModBlocks.dummy_block_vault);
|
||||
|
||||
|
||||
@ -557,7 +557,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
if(te instanceof TileEntityRBMKRod){
|
||||
TileEntityRBMKRod fuelChannel = (TileEntityRBMKRod)te;
|
||||
data_table.put("fluxQuantity", fuelChannel.lastFluxQuantity);
|
||||
data_table.put("fluxRatio", fuelChannel.fluxRatio);
|
||||
data_table.put("fluxRatio", fuelChannel.fluxFastRatio);
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityRBMKBoiler){
|
||||
|
||||
@ -45,7 +45,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
|
||||
// New system!!
|
||||
// Used for receiving flux (calculating outbound flux/burning rods)
|
||||
public double fluxRatio;
|
||||
public double fluxFastRatio;
|
||||
public double fluxQuantity;
|
||||
public double lastFluxQuantity;
|
||||
public double lastFluxRatio;
|
||||
@ -73,11 +73,11 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
|
||||
@Override
|
||||
public void receiveFlux(NeutronStream stream) {
|
||||
double fastFlux = this.fluxQuantity * this.fluxRatio;
|
||||
double fastFlux = this.fluxQuantity * this.fluxFastRatio;
|
||||
double fastFluxIn = stream.fluxQuantity * stream.fluxRatio;
|
||||
|
||||
this.fluxQuantity += stream.fluxQuantity;
|
||||
fluxRatio = (fastFlux + fastFluxIn) / fluxQuantity;
|
||||
fluxFastRatio = (fastFlux + fastFluxIn) / fluxQuantity;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -96,11 +96,11 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
// Again, nothing really uses this so its just idle code at the moment.
|
||||
if (rod.specialFluxCurve) {
|
||||
|
||||
fluxRatioOut = rod.fluxRatioOut(this.fluxRatio, ItemRBMKRod.getEnrichment(slots[0]));
|
||||
fluxRatioOut = rod.fluxRatioOut(this.fluxFastRatio, ItemRBMKRod.getEnrichment(slots[0]));
|
||||
|
||||
double fluxIn;
|
||||
|
||||
fluxIn = rod.fluxFromRatio(this.fluxQuantity, this.fluxRatio);
|
||||
fluxIn = rod.fluxFromRatio(this.fluxQuantity, this.fluxFastRatio);
|
||||
|
||||
fluxQuantityOut = rod.burn(worldObj, slots[0], fluxIn);
|
||||
} else {
|
||||
@ -141,10 +141,10 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
//for spreading, we want the buffered flux to be 0 because we want to know exactly how much gets reflected back
|
||||
|
||||
this.lastFluxQuantity = this.fluxQuantity;
|
||||
this.lastFluxRatio = this.fluxRatio;
|
||||
this.lastFluxRatio = this.fluxFastRatio;
|
||||
|
||||
this.fluxQuantity = 0;
|
||||
this.fluxRatio = 0;
|
||||
this.fluxFastRatio = 0;
|
||||
|
||||
spreadFlux(fluxQuantityOut, fluxRatioOut);
|
||||
|
||||
@ -155,7 +155,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
this.lastFluxRatio = 0;
|
||||
this.lastFluxQuantity = 0;
|
||||
this.fluxQuantity = 0;
|
||||
this.fluxRatio = 0;
|
||||
this.fluxFastRatio = 0;
|
||||
|
||||
hasRod = false;
|
||||
|
||||
@ -166,9 +166,12 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
|
||||
private double fluxFromType(NType type) {
|
||||
|
||||
double fastFlux = this.fluxQuantity * this.fluxFastRatio;
|
||||
double slowFlux = this.fluxQuantity * (1 - this.fluxFastRatio);
|
||||
|
||||
switch(type) {
|
||||
case SLOW: return (this.fluxQuantity * (1 - this.fluxRatio) + Math.min(this.fluxRatio * 0.5, 1));
|
||||
case FAST: return (this.fluxQuantity * (1 - this.fluxRatio) + Math.min(this.fluxRatio * 0.3, 1));
|
||||
case SLOW: return slowFlux + fastFlux * 0.5;
|
||||
case FAST: return fastFlux + slowFlux * 0.3;
|
||||
case ANY: return this.fluxQuantity;
|
||||
}
|
||||
|
||||
@ -219,12 +222,12 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
// recalculate new values to keep stable operations
|
||||
this.fluxQuantity = nbt.getDouble("fluxFast") + nbt.getDouble("fluxSlow");
|
||||
if (this.fluxQuantity > 0)
|
||||
this.fluxRatio = nbt.getDouble("fluxFast") / fluxQuantity;
|
||||
this.fluxFastRatio = nbt.getDouble("fluxFast") / fluxQuantity;
|
||||
else
|
||||
this.fluxRatio = 0;
|
||||
this.fluxFastRatio = 0;
|
||||
} else {
|
||||
this.fluxQuantity = nbt.getDouble("fluxQuantity");
|
||||
this.fluxRatio = nbt.getDouble("fluxMod");
|
||||
this.fluxFastRatio = nbt.getDouble("fluxMod");
|
||||
}
|
||||
this.hasRod = nbt.getBoolean("hasRod");
|
||||
}
|
||||
@ -237,8 +240,8 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
nbt.setDouble("fluxQuantity", this.lastFluxQuantity);
|
||||
nbt.setDouble("fluxMod", this.lastFluxRatio);
|
||||
} else {
|
||||
nbt.setDouble("fluxSlow", this.fluxQuantity * (1 - fluxRatio));
|
||||
nbt.setDouble("fluxFast", this.fluxQuantity * fluxRatio);
|
||||
nbt.setDouble("fluxSlow", this.fluxQuantity * (1 - fluxFastRatio));
|
||||
nbt.setDouble("fluxFast", this.fluxQuantity * fluxFastRatio);
|
||||
}
|
||||
nbt.setBoolean("hasRod", this.hasRod);
|
||||
}
|
||||
@ -255,7 +258,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.fluxQuantity = buf.readDouble();
|
||||
this.fluxRatio = buf.readDouble();
|
||||
this.fluxFastRatio = buf.readDouble();
|
||||
this.hasRod = buf.readBoolean();
|
||||
}
|
||||
|
||||
@ -398,7 +401,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getFluxRatio(Context context, Arguments args) {
|
||||
return new Object[] {fluxRatio};
|
||||
return new Object[] {fluxFastRatio};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@ -462,7 +465,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
|
||||
return new Object[] {
|
||||
heat, returnValues.get(0), returnValues.get(1),
|
||||
fluxQuantity, fluxRatio, returnValues.get(2), returnValues.get(3), returnValues.get(4),
|
||||
fluxQuantity, fluxFastRatio, returnValues.get(2), returnValues.get(3), returnValues.get(4),
|
||||
((RBMKRod)this.getBlockType()).moderated, xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ public class GenNode<T extends INetworkProvider> {
|
||||
|
||||
public BlockPos[] positions;
|
||||
public DirPos[] connections;
|
||||
public INodeNet<T> net;
|
||||
public NodeNet<T> net;
|
||||
public boolean expired = false;
|
||||
public boolean recentlyChanged = true;
|
||||
public T networkProvider;
|
||||
@ -34,7 +34,7 @@ public class GenNode<T extends INetworkProvider> {
|
||||
return this.net != null && this.net.isValid();
|
||||
}
|
||||
|
||||
public void setNet(INodeNet<T> net) {
|
||||
public void setNet(NodeNet<T> net) {
|
||||
this.net = net;
|
||||
this.recentlyChanged = true;
|
||||
}
|
||||
|
||||
5
src/main/java/com/hbm/uninos/IGenProvider.java
Normal file
5
src/main/java/com/hbm/uninos/IGenProvider.java
Normal file
@ -0,0 +1,5 @@
|
||||
package com.hbm.uninos;
|
||||
|
||||
public interface IGenProvider<T extends INetworkProvider> {
|
||||
|
||||
}
|
||||
10
src/main/java/com/hbm/uninos/IGenReceiver.java
Normal file
10
src/main/java/com/hbm/uninos/IGenReceiver.java
Normal file
@ -0,0 +1,10 @@
|
||||
package com.hbm.uninos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
|
||||
|
||||
public interface IGenReceiver<T extends INetworkProvider> {
|
||||
|
||||
public default ConnectionPriority getPriority() {
|
||||
return ConnectionPriority.NORMAL;
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@ package com.hbm.uninos;
|
||||
* Each instance of a network provider is a valid "type" of node in UNINOS
|
||||
* @author hbm
|
||||
*/
|
||||
public interface INetworkProvider {
|
||||
public interface INetworkProvider<T extends NodeNet> {
|
||||
|
||||
public INodeNet<? extends INetworkProvider> provideNetwork();
|
||||
public T provideNetwork();
|
||||
}
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
package com.hbm.uninos;
|
||||
|
||||
public interface INodeNet<T extends INetworkProvider> {
|
||||
|
||||
public boolean isValid();
|
||||
public void destroy();
|
||||
}
|
||||
81
src/main/java/com/hbm/uninos/NodeNet.java
Normal file
81
src/main/java/com/hbm/uninos/NodeNet.java
Normal file
@ -0,0 +1,81 @@
|
||||
package com.hbm.uninos;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class NodeNet<T extends INetworkProvider> {
|
||||
|
||||
public static Random rand = new Random();
|
||||
|
||||
public boolean valid = true;
|
||||
public Set<GenNode<T>> links = new HashSet();
|
||||
|
||||
public abstract HashMap<IGenReceiver<T>, Long> receiverEntries();
|
||||
public abstract HashMap<IGenProvider<T>, Long> providerEntries();
|
||||
|
||||
public NodeNet() {
|
||||
UniNodespace.activeNodeNets.add(this);
|
||||
}
|
||||
|
||||
/// SUBSCRIBER HANDLING ///
|
||||
public boolean isSubscribed(IGenReceiver<T> receiver) { return this.receiverEntries().containsKey(receiver); }
|
||||
public void addReceiver(IGenReceiver<T> receiver) { this.receiverEntries().put(receiver, System.currentTimeMillis()); }
|
||||
public void removeReceiver(IGenReceiver<T> receiver) { this.receiverEntries().remove(receiver); }
|
||||
|
||||
/// PROVIDER HANDLING ///
|
||||
public boolean isProvider(IGenProvider<T> provider) { return this.providerEntries().containsKey(provider); }
|
||||
public void addProvider(IGenProvider<T> provider) { this.providerEntries().put(provider, System.currentTimeMillis()); }
|
||||
public void removeProvider(IGenProvider<T> provider) { this.providerEntries().remove(provider); }
|
||||
|
||||
/** Combines two networks into one */
|
||||
public void joinNetworks(NodeNet<T> network) {
|
||||
if(network == this) return;
|
||||
|
||||
List<GenNode<T>> oldNodes = new ArrayList(network.links.size());
|
||||
oldNodes.addAll(network.links);
|
||||
|
||||
for(GenNode<T> conductor : oldNodes) forceJoinLink(conductor);
|
||||
network.links.clear();
|
||||
|
||||
for(IGenReceiver<T> connector : network.receiverEntries().keySet()) this.addReceiver(connector);
|
||||
for(IGenProvider<T> connector : network.providerEntries().keySet()) this.addProvider(connector);
|
||||
network.destroy();
|
||||
}
|
||||
|
||||
/** Adds the node as part of this network's links */
|
||||
public NodeNet<T> joinLink(GenNode<T> node) {
|
||||
if(node.net != null) node.net.leaveLink(node);
|
||||
return forceJoinLink(node);
|
||||
}
|
||||
|
||||
/** Adds the node as part of this network's links, skips the part about removing it from existing networks */
|
||||
public NodeNet<T> forceJoinLink(GenNode<T> node) {
|
||||
this.links.add(node);
|
||||
node.setNet(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Removes the specified node */
|
||||
public void leaveLink(GenNode<T> node) {
|
||||
node.setNet(null);
|
||||
this.links.remove(node);
|
||||
}
|
||||
|
||||
/// GENERAL POWER NET CONTROL ///
|
||||
public void invalidate() { this.valid = false; UniNodespace.activeNodeNets.remove(this); }
|
||||
public boolean isValid() { return this.valid; }
|
||||
public void resetTrackers() { }
|
||||
public abstract void update();
|
||||
|
||||
public void destroy() {
|
||||
this.invalidate();
|
||||
for(GenNode<T> link : this.links) if(link.net == this) link.setNet(null);
|
||||
this.links.clear();
|
||||
this.receiverEntries().clear();
|
||||
this.providerEntries().clear();
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.uninos;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
@ -10,6 +12,7 @@ import net.minecraft.world.World;
|
||||
public class UniNodespace {
|
||||
|
||||
public static HashMap<World, UniNodeWorld> worlds = new HashMap();
|
||||
public static Set<NodeNet> activeNodeNets = new HashSet<>();
|
||||
|
||||
public static GenNode getNode(World world, int x, int y, int z, INetworkProvider type) {
|
||||
UniNodeWorld nodeWorld = worlds.get(world);
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
package com.hbm.uninos.networkproviders;
|
||||
|
||||
import com.hbm.uninos.INetworkProvider;
|
||||
import com.hbm.uninos.INodeNet;
|
||||
import com.hbm.uninos.networks.PowerNetwork;
|
||||
|
||||
public class PowerProvider implements INetworkProvider {
|
||||
public class PowerProvider implements INetworkProvider<PowerNetwork> {
|
||||
|
||||
@Override
|
||||
public INodeNet<PowerProvider> provideNetwork() {
|
||||
public PowerNetwork provideNetwork() {
|
||||
return new PowerNetwork();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,116 @@
|
||||
package com.hbm.uninos.networks;
|
||||
|
||||
import com.hbm.uninos.INodeNet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class PowerNetwork implements INodeNet {
|
||||
import com.hbm.uninos.IGenProvider;
|
||||
import com.hbm.uninos.IGenReceiver;
|
||||
import com.hbm.uninos.NodeNet;
|
||||
import com.hbm.uninos.networkproviders.PowerProvider;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return false;
|
||||
import api.hbm.energymk2.IEnergyProviderMK2;
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
|
||||
|
||||
public class PowerNetwork extends NodeNet<PowerProvider> {
|
||||
|
||||
public HashMap<IEnergyReceiverMK2, Long> receiverEntries = new HashMap();
|
||||
public HashMap<IEnergyProviderMK2, Long> providerEntries = new HashMap();
|
||||
|
||||
public long energyTracker = 0L;
|
||||
|
||||
@Override // this was all fun and games but let's take a few steps back: this generics stuff is kinda breaking shit, and as it turns out, apparently nothing even uses the type
|
||||
public HashMap<IGenReceiver<PowerProvider>, Long> receiverEntries() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
@Override // therefore i should probably consider scrapping the majority of the generic types - they seem to be kinda useless with the current approach
|
||||
public HashMap<IGenProvider<PowerProvider>, Long> providerEntries() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected static int timeout = 3_000;
|
||||
|
||||
@Override public void resetTrackers() { this.energyTracker = 0; }
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
|
||||
if(providerEntries.isEmpty()) return;
|
||||
if(receiverEntries.isEmpty()) return;
|
||||
|
||||
long timestamp = System.currentTimeMillis();
|
||||
|
||||
List<Pair<IEnergyProviderMK2, Long>> providers = new ArrayList();
|
||||
long powerAvailable = 0;
|
||||
|
||||
Iterator<Entry<IEnergyProviderMK2, Long>> provIt = providerEntries.entrySet().iterator();
|
||||
while(provIt.hasNext()) {
|
||||
Entry<IEnergyProviderMK2, Long> entry = provIt.next();
|
||||
if(timestamp - entry.getValue() > timeout) { provIt.remove(); continue; }
|
||||
long src = Math.min(entry.getKey().getPower(), entry.getKey().getProviderSpeed());
|
||||
providers.add(new Pair(entry.getKey(), src));
|
||||
powerAvailable += src;
|
||||
}
|
||||
|
||||
List<Pair<IEnergyReceiverMK2, Long>>[] receivers = new ArrayList[ConnectionPriority.values().length];
|
||||
for(int i = 0; i < receivers.length; i++) receivers[i] = new ArrayList();
|
||||
long[] demand = new long[ConnectionPriority.values().length];
|
||||
long totalDemand = 0;
|
||||
|
||||
Iterator<Entry<IEnergyReceiverMK2, Long>> recIt = receiverEntries.entrySet().iterator();
|
||||
|
||||
while(recIt.hasNext()) {
|
||||
Entry<IEnergyReceiverMK2, Long> entry = recIt.next();
|
||||
if(timestamp - entry.getValue() > timeout) { recIt.remove(); continue; }
|
||||
long rec = Math.min(entry.getKey().getMaxPower() - entry.getKey().getPower(), entry.getKey().getReceiverSpeed());
|
||||
int p = entry.getKey().getPriority().ordinal();
|
||||
receivers[p].add(new Pair(entry.getKey(), rec));
|
||||
demand[p] += rec;
|
||||
totalDemand += rec;
|
||||
}
|
||||
|
||||
long toTransfer = Math.min(powerAvailable, totalDemand);
|
||||
long energyUsed = 0;
|
||||
|
||||
for(int i = ConnectionPriority.values().length - 1; i >= 0; i--) {
|
||||
List<Pair<IEnergyReceiverMK2, Long>> list = receivers[i];
|
||||
long priorityDemand = demand[i];
|
||||
|
||||
for(Pair<IEnergyReceiverMK2, Long> entry : list) {
|
||||
double weight = (double) entry.getValue() / (double) (priorityDemand);
|
||||
long toSend = (long) Math.max(toTransfer * weight, 0D);
|
||||
energyUsed += (toSend - entry.getKey().transferPower(toSend)); //leftovers are subtracted from the intended amount to use up
|
||||
}
|
||||
|
||||
toTransfer -= energyUsed;
|
||||
}
|
||||
|
||||
this.energyTracker += energyUsed;
|
||||
long leftover = energyUsed;
|
||||
|
||||
for(Pair<IEnergyProviderMK2, Long> entry : providers) {
|
||||
double weight = (double) entry.getValue() / (double) powerAvailable;
|
||||
long toUse = (long) Math.max(energyUsed * weight, 0D);
|
||||
entry.getKey().usePower(toUse);
|
||||
leftover -= toUse;
|
||||
}
|
||||
|
||||
//rounding error compensation, detects surplus that hasn't been used and removes it from random providers
|
||||
int iterationsLeft = 100; // whiles without emergency brakes are a bad idea
|
||||
while(iterationsLeft > 0 && leftover > 0 && providers.size() > 0) {
|
||||
iterationsLeft--;
|
||||
|
||||
Pair<IEnergyProviderMK2, Long> selected = providers.get(rand.nextInt(providers.size()));
|
||||
IEnergyProviderMK2 scapegoat = selected.getKey();
|
||||
|
||||
long toUse = Math.min(leftover, scapegoat.getPower());
|
||||
scapegoat.usePower(toUse);
|
||||
leftover -= toUse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3887,6 +3887,10 @@ shape.wiresDense=Dichte Drähte
|
||||
|
||||
soundCategory.ntmMachines=NTM Maschinen
|
||||
|
||||
stat.ntmBullets=Schüsse gefeuert
|
||||
stat.ntmLegendary=Legendäre Gegenstände hergestellt
|
||||
stat.ntmMines=Auf Minen getreten
|
||||
|
||||
tile.absorber.name=Strahlungs-Absorber
|
||||
tile.absorber_green.name=Fortgeschrittener Strahlungs-Absorber
|
||||
tile.absorber_pink.name=Elite Strahlungs-Absorber
|
||||
|
||||
@ -4970,6 +4970,10 @@ shape.wiresDense=Dense Wires
|
||||
|
||||
soundCategory.ntmMachines=NTM Machines
|
||||
|
||||
stat.ntmBullets=Rounds Fired
|
||||
stat.ntmLegendary=Legendary Items Created
|
||||
stat.ntmMines=Mines Stepped on
|
||||
|
||||
tile.absorber.name=Radiation Absorber
|
||||
tile.absorber_green.name=Advanced Radiation Absorber
|
||||
tile.absorber_pink.name=Elite Radiation Absorber
|
||||
|
||||
@ -6171,7 +6171,7 @@ pa.idle.desc=空闲
|
||||
pa.running.desc=正在运行
|
||||
pa.success.desc=成功
|
||||
pa.pause_unloaded.desc=粒子进入了未加载的区块。$在粒子与粒子源均被加载前,运行将暂停。
|
||||
pa.crash_defocus.desc=粒子失去焦距。$请确保加速器含有足够数量的四极磁铁。
|
||||
pa.crash_defocus.desc=粒子失焦。$请确保加速器含有足够数量的四极磁铁。
|
||||
pa.crash_derail.desc=粒子离开加速器。$请确保加速器未缺失部件,$且所有双极磁铁均正确配置。
|
||||
pa.crash_cannot_enter.desc=粒子尝试进入加速器某部件时失败。$请确保所有部件朝向正确。
|
||||
pa.crash_nocool.desc=粒子进入了未冷却的加速器部件。$请确保所有需冷却的部件正常连接,且内部含有冷四氟甲烷。
|
||||
@ -6184,3 +6184,16 @@ tile.pa_dipole.desc=需要冷却!$根据粒子动量使其转向$具有“低
|
||||
tile.pa_quadrupole.desc=需要冷却!$使粒子失焦程度减少100$需要大型线圈才能工作
|
||||
tile.pa_rfc.desc=需要冷却!$使粒子动量增加100,并使粒子失焦程度增加100$粒子失焦程度到达1000时会坍毁
|
||||
tile.pa_source.desc=需要冷却!$使用两个物品来创造一个粒子
|
||||
item.ammo_secret.p35_800.name=.35-800 V9
|
||||
item.bobmazon.name=Bobmazon
|
||||
item.gun_aberrator.name=离散者
|
||||
item.gun_aberrator_eott.name=暴风之眼
|
||||
pa.crash_norecipe=没有配方!
|
||||
pa.crash_norecipe.desc=粒子进入了检测器,但输入的粒子不与任何配方匹配。$请确保向粒子源输入的粒子符合正确的配方。
|
||||
pa.crash_underspeed=粒子速度过低!
|
||||
pa.crash_underspeed.desc=粒子进入了检测器,但其速度不足以进行此配方。$请确保加速器已为该配方正确配置。
|
||||
tile.deco_loot.name=战利品堆
|
||||
tile.refueler.name=燃料装填站
|
||||
tile.wand_air.name=结构魔杖方块(空气)
|
||||
tile.wand_loot.name=结构魔杖方块(战利品)
|
||||
tile.wand_jigsaw.name=结构魔杖方块(拼图)
|
||||
|
||||
7272
src/main/resources/assets/hbm/models/weapons/mas36.obj
Normal file
7272
src/main/resources/assets/hbm/models/weapons/mas36.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 211 B |
BIN
src/main/resources/assets/hbm/textures/models/weapons/mas36.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/weapons/mas36.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Loading…
x
Reference in New Issue
Block a user