mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
hue hue hue
This commit is contained in:
parent
d3fe5c479d
commit
ab5e5d9be2
66
changelog
66
changelog
@ -1,62 +1,14 @@
|
|||||||
## Added
|
## Added
|
||||||
* New Chicago Pile
|
* Wideband Radio Emission Detector Satellite
|
||||||
* Assembled multiblock, similar to the PWR
|
* Detects high-energy events like nuclear explosions, particle accelerator operations and radar from the entire map
|
||||||
* Requires new chicago pile graphite bricks
|
* Not terribly accurate, positioning may be off by hundreds or thousands of blocks depending on the emission intensity
|
||||||
* Assembled with a hand drill out of a box made from graphite bricks, at least 5x5x5, and at most 15x15x15 blocks large
|
* Narrowband Emission Scanning Satellite
|
||||||
* Drilling the assembled reactor will add channels at the selected locations
|
* Detects high-energy events like radar, particle accelerator operations, nuclear or fusion reactors
|
||||||
* Drilling along the reactor's orientation will add a fuel channel
|
* Can pinpoint exact locations, but is limited in its field of view
|
||||||
* Drilling perpendicular to fuel channels will add a ventilation channel
|
|
||||||
* Drilling vertically will add a control rod channel
|
|
||||||
* Fuel insertion is now done with a dedicated fuel loader which can be operated by hand or automated with hopper IO and redstone
|
|
||||||
* Ventilation channels need chicago pile vents which are powered with compressed air at 1 PU
|
|
||||||
* Chicago pile control rods can either be fully withdrawn with redstone or fine tuned with RoR
|
|
||||||
* Additionally, channels can be drilled by right clicking a pile addon device with the hand drill, the addon doesn't need to be removed beforehand
|
|
||||||
* This is mainly for convenience when disassembling and reassembling the reactor, which requires all channels to be drilled again
|
|
||||||
* Piles that overheat will explode, throwing flaming graphite everywhere
|
|
||||||
* Satelllite Ground Station
|
|
||||||
* Can relay RoR commands to connected satellites and satellite info back to RoR
|
|
||||||
* Platemetal
|
|
||||||
* Decorative connected texture metal block
|
|
||||||
* Comes in all colors except brown
|
|
||||||
* NTM poop theory debunked
|
|
||||||
* Make a nice clanking noise when placing and breaking
|
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* Updated all oil well GUI textures
|
* AUTOCAL's `first` and `last` instructions now support variable substitution
|
||||||
* There's now only two upgrade slots instead of three
|
|
||||||
* All legacy pixel gauges have been replaced with smooth ones (watz, ZIRNOX, CCGT) making them more accurate
|
|
||||||
* Updated the diesel generator's GUI
|
|
||||||
* The diesel gen now also has an in-GUI button for turning it on and off like the industrial combustion engine
|
|
||||||
* MS-ESv1.1 `split` instruction now supports variable substitution
|
|
||||||
* Multiblocks now display a wireframe preview of how much space they take up
|
|
||||||
* This preview is green if it can be placed and red if it can not
|
|
||||||
* On some machines, this preview might not be perfect, but the check on whether it can be placed should always be accurate
|
|
||||||
* This makes it easier to anticipate how much space a machine takes up, as well as lining up large parts like fusion reactor components which were notoriously hard to place down right
|
|
||||||
* Updated the small pylon model
|
|
||||||
* The small pylon now has a steel variant
|
|
||||||
* Items in the battery socket which previously didn't show up in the socket's model are now rendered
|
|
||||||
* Reduced the cost for the heavy stirling engine
|
|
||||||
* Removed the satellite interface item for being basically completely useless
|
|
||||||
* Updated the satellite ID manager texture and recipe
|
|
||||||
* Satellite ID chips are now soldered
|
|
||||||
* Overhauled all satellites
|
|
||||||
* Satellites now use one item ID with meta, most satellites now have new textures
|
|
||||||
* Satellites can now be connected to ground stations and controlled with RoR commands
|
|
||||||
* Satellites now have manual pages detailing the commands
|
|
||||||
* The recipes have been updated, they now use mostly common parts and no longer feature the satellite base and heads items which are welded together
|
|
||||||
* Legacy satellites still function and can still be launched
|
|
||||||
* The PWR's coolant levels can now be read with RoR
|
|
||||||
* Soyuz and related assembly recipes now use 25kHE/t instead of just 100
|
|
||||||
* Updated the GUI textures for the refinery, various particle accelerator parts and a few other machines
|
|
||||||
* Glyphid hive blocks now use state-of-the-fart flesh sounds
|
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed held block being placed when not sneaking when opening the cable diode's GUI
|
* Fixed pile fuel loader temperature reading not working
|
||||||
* Fixed an issue where the diesel generator's fuel capacity is the original 4,000mB instead of the intended new 16,000mB
|
* Fixed mining satellite NEI handling
|
||||||
* This means that explosive barrels and universal barrels can now be loaded into the diesel generator
|
|
||||||
* Fixed RoR terminal's `set` command not working
|
|
||||||
* Fixed a longstanding issue where the transparent part of beams from tile entity models would often have incorrect render order, sometimes rendering things behind them invisible
|
|
||||||
* This also fixes the same phenomenon for other types of beams, such as those from hitscan laser and tesla weapons
|
|
||||||
* Fixed some issues regarding the new crane structure
|
|
||||||
* Fixed skeletonizer ashes floating over the floor after landing
|
|
||||||
* Fixed backface rendering of the capacitor frames when inserted in the battery socket
|
|
||||||
@ -5,13 +5,13 @@ import codechicken.nei.PositionedStack;
|
|||||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.handler.imc.ICompatNHNEI;
|
import com.hbm.handler.imc.ICompatNHNEI;
|
||||||
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
import com.hbm.itempool.ItemPool;
|
import com.hbm.itempool.ItemPool;
|
||||||
import com.hbm.itempool.ItemPoolsSatellite;
|
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.items.special.ItemSatellite.EnumSatType;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.saveddata.satellites.SatelliteMiner;
|
import com.hbm.saveddata.satellites.SatelliteMiner;
|
||||||
import com.hbm.util.ItemStackUtil;
|
import com.hbm.util.ItemStackUtil;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.WeightedRandomChestContent;
|
import net.minecraft.util.WeightedRandomChestContent;
|
||||||
@ -45,15 +45,24 @@ public class SatelliteHandler extends TemplateRecipeHandler implements ICompatNH
|
|||||||
return RefStrings.MODID + ":textures/gui/nei/gui_nei_anvil.png";
|
return RefStrings.MODID + ":textures/gui/nei/gui_nei_anvil.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ComparableStack[] getMiningSatellites() {
|
||||||
|
return new ComparableStack[] {
|
||||||
|
new ComparableStack(ModItems.satellite, 1, EnumSatType.MINER_ASTRO),
|
||||||
|
new ComparableStack(ModItems.satellite, 1, EnumSatType.MINER_LUNAR),
|
||||||
|
new ComparableStack(ModItems.sat_miner),
|
||||||
|
new ComparableStack(ModItems.sat_lunar_miner),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||||
if(outputId.equals("ntmSatellite")) {
|
if(outputId.equals("ntmSatellite")) {
|
||||||
for(Item satelliteItem : new Item[]{ModItems.sat_miner, ModItems.sat_lunar_miner}) {
|
for(ComparableStack satelliteItem : getMiningSatellites()) {
|
||||||
String poolName = SatelliteMiner.getCargoForItem(satelliteItem);
|
String poolName = SatelliteMiner.getCargoForItem(satelliteItem);
|
||||||
if(poolName == null) {
|
if(poolName == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
this.addRecipeToList(satelliteItem, ItemPool.getPool(poolName));
|
this.addRecipeToList(satelliteItem.toStack(), ItemPool.getPool(poolName));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
super.loadCraftingRecipes(outputId, results);
|
super.loadCraftingRecipes(outputId, results);
|
||||||
@ -62,7 +71,7 @@ public class SatelliteHandler extends TemplateRecipeHandler implements ICompatNH
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadCraftingRecipes(ItemStack result) {
|
public void loadCraftingRecipes(ItemStack result) {
|
||||||
for(Item satelliteItem : new Item[]{ModItems.sat_miner, ModItems.sat_lunar_miner}) {
|
for(ComparableStack satelliteItem : getMiningSatellites()) {
|
||||||
String poolName = SatelliteMiner.getCargoForItem(satelliteItem);
|
String poolName = SatelliteMiner.getCargoForItem(satelliteItem);
|
||||||
if(poolName == null) {
|
if(poolName == null) {
|
||||||
continue;
|
continue;
|
||||||
@ -70,7 +79,7 @@ public class SatelliteHandler extends TemplateRecipeHandler implements ICompatNH
|
|||||||
WeightedRandomChestContent[] pool = ItemPool.getPool(poolName);
|
WeightedRandomChestContent[] pool = ItemPool.getPool(poolName);
|
||||||
for(WeightedRandomChestContent poolEntry : pool) {
|
for(WeightedRandomChestContent poolEntry : pool) {
|
||||||
if(NEIServerUtils.areStacksSameTypeCrafting(poolEntry.theItemId, result)) {
|
if(NEIServerUtils.areStacksSameTypeCrafting(poolEntry.theItemId, result)) {
|
||||||
this.addRecipeToList(satelliteItem, pool);
|
this.addRecipeToList(satelliteItem.toStack(), pool);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,15 +97,18 @@ public class SatelliteHandler extends TemplateRecipeHandler implements ICompatNH
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadUsageRecipes(ItemStack ingredient) {
|
public void loadUsageRecipes(ItemStack ingredient) {
|
||||||
if(ingredient.getItem() == ModItems.sat_miner) {
|
for(ComparableStack satelliteItem : getMiningSatellites()) {
|
||||||
this.addRecipeToList(ModItems.sat_miner, ItemPool.getPool(ItemPoolsSatellite.POOL_SAT_MINER));
|
if(satelliteItem.matchesRecipe(ingredient, true)) {
|
||||||
} else if(ingredient.getItem() == ModItems.sat_lunar_miner) {
|
String poolName = SatelliteMiner.getCargoForItem(satelliteItem);
|
||||||
this.addRecipeToList(ModItems.sat_lunar_miner, ItemPool.getPool(ItemPoolsSatellite.POOL_SAT_LUNAR));
|
if(poolName == null) continue;
|
||||||
|
WeightedRandomChestContent[] pool = ItemPool.getPool(poolName);
|
||||||
|
this.addRecipeToList(satelliteItem.toStack(), pool);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void addRecipeToList(Item poolItem, WeightedRandomChestContent[] poolEntries) {
|
private void addRecipeToList(ItemStack poolItem, WeightedRandomChestContent[] poolEntries) {
|
||||||
List<ItemStack> outs = new ArrayList<>();
|
List<ItemStack> outs = new ArrayList<>();
|
||||||
int weight = Arrays.stream(poolEntries).mapToInt(poolEntry -> poolEntry.itemWeight).sum();
|
int weight = Arrays.stream(poolEntries).mapToInt(poolEntry -> poolEntry.itemWeight).sum();
|
||||||
|
|
||||||
@ -109,7 +121,7 @@ public class SatelliteHandler extends TemplateRecipeHandler implements ICompatNH
|
|||||||
outs.add(stack);
|
outs.add(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.arecipes.add(new RecipeSet(new ItemStack(poolItem), outs));
|
this.arecipes.add(new RecipeSet(poolItem, outs));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -1021,6 +1021,20 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
|||||||
new ComparableStack(ModItems.circuit, 24, EnumCircuitType.BISMOID),
|
new ComparableStack(ModItems.circuit, 24, EnumCircuitType.BISMOID),
|
||||||
new ComparableStack(ModItems.part_generic, 4, EnumPartType.LDE),
|
new ComparableStack(ModItems.part_generic, 4, EnumPartType.LDE),
|
||||||
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_ADVANCED)));
|
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_ADVANCED)));
|
||||||
|
this.register(new GenericRecipe("ass.detectorsat").setup(1_200, 25_000).outputItems(new ItemStack(ModItems.satellite, 1, EnumSatType.DETECTOR.ordinal()))
|
||||||
|
.inputItems(new OreDictStack(GOLD.plateCast(), 16),
|
||||||
|
new ComparableStack(ModItems.photo_panel, 64),
|
||||||
|
new OreDictStack(BSCCO.wireDense(), 16),
|
||||||
|
new ComparableStack(ModItems.circuit, 24, EnumCircuitType.BISMOID),
|
||||||
|
new ComparableStack(ModItems.part_generic, 16, EnumPartType.LDE),
|
||||||
|
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_ADVANCED)));
|
||||||
|
this.register(new GenericRecipe("ass.detectorsat").setup(1_200, 25_000).outputItems(new ItemStack(ModItems.satellite, 1, EnumSatType.RAY_SCAN.ordinal()))
|
||||||
|
.inputItems(new OreDictStack(BIGMT.shell(), 16),
|
||||||
|
new ComparableStack(ModItems.photo_panel, 32),
|
||||||
|
new OreDictStack(SBD.wireDense(), 16),
|
||||||
|
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.QUANTUM),
|
||||||
|
new ComparableStack(ModItems.part_generic, 16, EnumPartType.LDE),
|
||||||
|
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER_ADVANCED)));
|
||||||
|
|
||||||
this.register(new GenericRecipe("ass.satlink").setup(100, 1_000).outputItems(new ItemStack(ModBlocks.machine_satlink))
|
this.register(new GenericRecipe("ass.satlink").setup(100, 1_000).outputItems(new ItemStack(ModBlocks.machine_satlink))
|
||||||
.inputItems(new ComparableStack(ModBlocks.steel_scaffold, 16),
|
.inputItems(new ComparableStack(ModBlocks.steel_scaffold, 16),
|
||||||
|
|||||||
@ -26,6 +26,7 @@ public class ItemSatellite extends ItemEnumMulti implements ISatChip {
|
|||||||
XENIUM_RESONATOR,
|
XENIUM_RESONATOR,
|
||||||
RELAY,
|
RELAY,
|
||||||
DETECTOR,
|
DETECTOR,
|
||||||
|
RAY_SCAN,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -49,6 +49,7 @@ import com.hbm.packet.toclient.SerializableRecipePacket;
|
|||||||
import com.hbm.particle.helper.BlackPowderCreator;
|
import com.hbm.particle.helper.BlackPowderCreator;
|
||||||
import com.hbm.potion.HbmPotion;
|
import com.hbm.potion.HbmPotion;
|
||||||
import com.hbm.saveddata.satellites.SatelliteDetector;
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||||
import com.hbm.tileentity.network.RTTYSystem;
|
import com.hbm.tileentity.network.RTTYSystem;
|
||||||
@ -636,6 +637,8 @@ public class ModEventHandler {
|
|||||||
TimedGenerator.automaton(world, 100);
|
TimedGenerator.automaton(world, 100);
|
||||||
|
|
||||||
SatelliteDetector.updateSystem(world);
|
SatelliteDetector.updateSystem(world);
|
||||||
|
if(world.getTotalWorldTime() % 20 == 10)
|
||||||
|
SatelliteRayScan.updateSystem(world);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,10 +17,7 @@ public class SatelliteDetector extends SatelliteBase {
|
|||||||
|
|
||||||
public SatelliteDetector() { }
|
public SatelliteDetector() { }
|
||||||
|
|
||||||
@Override
|
@Override public String getType() { return "UWB_EMISSION_DETECTOR"; }
|
||||||
public String getType() {
|
|
||||||
return "RAY_DETECTOR";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCommandImpl(World world, String... cmd) {
|
public void onCommandImpl(World world, String... cmd) {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package com.hbm.saveddata.satellites;
|
package com.hbm.saveddata.satellites;
|
||||||
|
|
||||||
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
import com.hbm.itempool.ItemPoolsSatellite;
|
import com.hbm.itempool.ItemPoolsSatellite;
|
||||||
import com.hbm.util.WeightedRandomObject;
|
import com.hbm.util.WeightedRandomObject;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -48,7 +48,7 @@ public class SatelliteMiner extends SatelliteBase {
|
|||||||
* @param satelliteItem - Satellite item
|
* @param satelliteItem - Satellite item
|
||||||
* @return - Returns {@link com.hbm.itempool.ItemPool} key or null if the item is not a mining satellite.
|
* @return - Returns {@link com.hbm.itempool.ItemPool} key or null if the item is not a mining satellite.
|
||||||
*/
|
*/
|
||||||
public static String getCargoForItem(Item satelliteItem) {
|
public static String getCargoForItem(ComparableStack satelliteItem) {
|
||||||
Class<? extends SatelliteBase> satelliteClass = XSatelliteRegistry.itemToClass.getOrDefault(satelliteItem, null);
|
Class<? extends SatelliteBase> satelliteClass = XSatelliteRegistry.itemToClass.getOrDefault(satelliteItem, null);
|
||||||
return satelliteClass != null ? CARGO.getOrDefault(satelliteClass, null) : null;
|
return satelliteClass != null ? CARGO.getOrDefault(satelliteClass, null) : null;
|
||||||
}
|
}
|
||||||
|
|||||||
109
src/main/java/com/hbm/saveddata/satellites/SatelliteRayScan.java
Normal file
109
src/main/java/com/hbm/saveddata/satellites/SatelliteRayScan.java
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
package com.hbm.saveddata.satellites;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import com.hbm.util.fauxpointtwelve.DimPos;
|
||||||
|
|
||||||
|
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class SatelliteRayScan extends SatelliteBase {
|
||||||
|
|
||||||
|
public List<RayEvent> cachedResults = new ArrayList();
|
||||||
|
|
||||||
|
public static final int MAX_SCAN_RANGE = 250;
|
||||||
|
|
||||||
|
public static final String CMD_SURVEY = "survey";
|
||||||
|
public static final String CMD_COUNT = "count";
|
||||||
|
public static final String CMD_GETINFO = "getinfo";
|
||||||
|
public static final String CMD_GETPOSITION = "getposition";
|
||||||
|
|
||||||
|
public SatelliteRayScan() { }
|
||||||
|
|
||||||
|
@Override public String getType() { return "NB_RAY_SCANNER"; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCommandImpl(World world, String... cmd) {
|
||||||
|
if(cmd.length <= 0) return;
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_SURVEY)) {
|
||||||
|
this.cachedResults.clear();
|
||||||
|
|
||||||
|
for(Entry<DimPos, RayEvent> entry : rayEvent.entrySet()) {
|
||||||
|
DimPos pos = entry.getKey();
|
||||||
|
RayEvent event = entry.getValue();
|
||||||
|
if(pos.getDim() != world.provider.dimensionId) continue;
|
||||||
|
int dX = pos.getX() - this.targetX;
|
||||||
|
int dZ = pos.getZ() - this.targetZ;
|
||||||
|
|
||||||
|
if(dX * dX + dZ * dZ <= MAX_SCAN_RANGE * MAX_SCAN_RANGE) {
|
||||||
|
this.cachedResults.add(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_COUNT)) {
|
||||||
|
this.tx = "" + cachedResults.size();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_GETINFO) && cmd.length == 2) {
|
||||||
|
RayEvent event = getEventFromIndex(cmd[1]);
|
||||||
|
if(event == null) { this.tx = ""; return; }
|
||||||
|
this.tx = "" + event.info;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_GETPOSITION) && cmd.length == 2) {
|
||||||
|
RayEvent event = getEventFromIndex(cmd[1]);
|
||||||
|
if(event == null) { this.tx = ""; return; }
|
||||||
|
this.tx = event.x + ";" + event.z;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RayEvent getEventFromIndex(String cmd) {
|
||||||
|
if(cachedResults.size() <= 0) return null;
|
||||||
|
int index = IRORInteractive.parseInt(cmd, 0, cachedResults.size()) - 1;
|
||||||
|
return cachedResults.get(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LinkedHashMap<DimPos, RayEvent> rayEvent = new LinkedHashMap();
|
||||||
|
|
||||||
|
public static void reportEvent(World world, int x, int y, int z, String info, int lifetime) {
|
||||||
|
rayEvent.put(new DimPos(x, y, z, world.provider.dimensionId), new RayEvent(world, lifetime, x, z, info));
|
||||||
|
}
|
||||||
|
|
||||||
|
// only once per second
|
||||||
|
public static void updateSystem(World world) {
|
||||||
|
|
||||||
|
rayEvent.entrySet().removeIf(entry -> {
|
||||||
|
return world.provider.dimensionId == entry.getKey().getDim() && world.getTotalWorldTime() > entry.getValue().expiresOn;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class RayEvent {
|
||||||
|
|
||||||
|
public static final String INFO_ARC_FLASH = "ARC_FLASH";
|
||||||
|
public static final String INFO_NUCLEAR = "NEUTRON_EMISSION";
|
||||||
|
public static final String INFO_PARTICLE = "HIGH_ENERGY_PARTICLES";
|
||||||
|
public static final String INFO_RADAR = "RADAR_WAVES";
|
||||||
|
public static final String INFO_RADIO = "RADIO_WAVES";
|
||||||
|
|
||||||
|
public long expiresOn;
|
||||||
|
public String info;
|
||||||
|
public int x;
|
||||||
|
public int z;
|
||||||
|
|
||||||
|
public RayEvent(World world, int lifetime, int x, int z, String info) {
|
||||||
|
this.expiresOn = world.getTotalWorldTime() + lifetime;
|
||||||
|
this.x = x;
|
||||||
|
this.z = z;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,6 +30,7 @@ public class XSatelliteRegistry {
|
|||||||
registerSatellite(SatelliteHorizons.class, ModItems.sat_gerald);
|
registerSatellite(SatelliteHorizons.class, ModItems.sat_gerald);
|
||||||
registerSatellite(SatellitePrecisionLaser.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.PRECISION_LASER));
|
registerSatellite(SatellitePrecisionLaser.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.PRECISION_LASER));
|
||||||
registerSatellite(SatelliteDetector.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.DETECTOR));
|
registerSatellite(SatelliteDetector.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.DETECTOR));
|
||||||
|
registerSatellite(SatelliteRayScan.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.RAY_SCAN));
|
||||||
|
|
||||||
|
|
||||||
registerSatellite(SatelliteMapper.class, ModItems.sat_mapper);
|
registerSatellite(SatelliteMapper.class, ModItems.sat_mapper);
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.machine.ItemCatalyst;
|
import com.hbm.items.machine.ItemCatalyst;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.lib.ModDamageSource;
|
import com.hbm.lib.ModDamageSource;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.util.ArmorUtil;
|
import com.hbm.util.ArmorUtil;
|
||||||
@ -136,8 +138,11 @@ public class TileEntityCore extends TileEntityMachineBase implements IGUIProvide
|
|||||||
else
|
else
|
||||||
color = 0;
|
color = 0;
|
||||||
|
|
||||||
if(heat > 0)
|
if(heat > 0) {
|
||||||
radiation();
|
radiation();
|
||||||
|
if(worldObj.getTotalWorldTime() % 100 == 0)
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_PARTICLE, 200);
|
||||||
|
}
|
||||||
|
|
||||||
networkPackNT(250);
|
networkPackNT(250);
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,8 @@ import com.hbm.items.machine.ItemICFPellet;
|
|||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.tileentity.IFluidCopiable;
|
import com.hbm.tileentity.IFluidCopiable;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.util.CompatEnergyControl;
|
import com.hbm.util.CompatEnergyControl;
|
||||||
@ -112,6 +114,10 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
|||||||
markDirty = true;
|
markDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(worldObj.getTotalWorldTime() % 20 == 15) {
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_PARTICLE, 200);
|
||||||
|
}
|
||||||
|
|
||||||
tanks[2].setFill(tanks[2].getFill() + (int) Math.ceil(this.heat * 10D / this.maxHeat));
|
tanks[2].setFill(tanks[2].getFill() + (int) Math.ceil(this.heat * 10D / this.maxHeat));
|
||||||
if(tanks[2].getFill() > tanks[2].getMaxFill()) tanks[2].setFill(tanks[2].getMaxFill());
|
if(tanks[2].getFill() > tanks[2].getMaxFill()) tanks[2].setFill(tanks[2].getMaxFill());
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,8 @@ import com.hbm.main.MainRegistry;
|
|||||||
import com.hbm.saveddata.SatelliteSavedData;
|
import com.hbm.saveddata.SatelliteSavedData;
|
||||||
import com.hbm.saveddata.satellites.SatelliteBase;
|
import com.hbm.saveddata.satellites.SatelliteBase;
|
||||||
import com.hbm.saveddata.satellites.SatelliteDetector;
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
import com.hbm.tileentity.IConfigurableMachine;
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
@ -362,8 +364,10 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(worldObj.getTotalWorldTime() % 20 == 0)
|
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||||
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_MEDIUM, BurstIntensity.MEDIUM, xCoord, zCoord);
|
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_MEDIUM, BurstIntensity.MEDIUM, xCoord, zCoord);
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_RADAR, 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRedPower() {
|
public int getRedPower() {
|
||||||
|
|||||||
@ -2,6 +2,8 @@ package com.hbm.tileentity.machine;
|
|||||||
|
|
||||||
import com.hbm.saveddata.SatelliteSavedData;
|
import com.hbm.saveddata.SatelliteSavedData;
|
||||||
import com.hbm.saveddata.satellites.SatelliteBase;
|
import com.hbm.saveddata.satellites.SatelliteBase;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.tileentity.TileEntityTickingBase;
|
import com.hbm.tileentity.TileEntityTickingBase;
|
||||||
|
|
||||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||||
@ -160,6 +162,7 @@ public class TileEntityMachineSatLink extends TileEntityTickingBase implements I
|
|||||||
if(sat != null) {
|
if(sat != null) {
|
||||||
sat.onCommand(worldObj, cmd);
|
sat.onCommand(worldObj, cmd);
|
||||||
}
|
}
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_RADIO, 300);
|
||||||
this.markChanged();
|
this.markChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,8 @@ import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
|
|||||||
import com.hbm.items.machine.ItemPWRPrinter;
|
import com.hbm.items.machine.ItemPWRPrinter;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.main.NTMSounds;
|
import com.hbm.main.NTMSounds;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.sound.AudioWrapper;
|
import com.hbm.sound.AudioWrapper;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
@ -255,6 +257,9 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
|||||||
this.amountLoaded--;
|
this.amountLoaded--;
|
||||||
this.markChanged();
|
this.markChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(worldObj.getTotalWorldTime() % 100 == 0)
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_NUCLEAR, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.amountLoaded <= 0) {
|
if(this.amountLoaded <= 0) {
|
||||||
|
|||||||
@ -22,6 +22,8 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.machine.ItemZirnoxRod;
|
import com.hbm.items.machine.ItemZirnoxRod;
|
||||||
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
|
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityMachineBase;
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
import com.hbm.util.CompatEnergyControl;
|
import com.hbm.util.CompatEnergyControl;
|
||||||
@ -226,6 +228,8 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IC
|
|||||||
this.heat -= 10;
|
this.heat -= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(worldObj.getTotalWorldTime() % 100 == 0)
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_NUCLEAR, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.tilted) for(DirPos pos : getConPos()) {
|
if(!this.tilted) for(DirPos pos : getConPos()) {
|
||||||
|
|||||||
@ -11,7 +11,9 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.saveddata.satellites.SatelliteDetector;
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
||||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||||
@ -163,6 +165,7 @@ public class TileEntityPADetector extends TileEntityCooledBase implements IGUIPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_MEDIUM, BurstIntensity.MEDIUM, xCoord, zCoord);
|
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_MEDIUM, BurstIntensity.MEDIUM, xCoord, zCoord);
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_PARTICLE, 600);
|
||||||
particle.crash(PAState.SUCCESS);
|
particle.crash(PAState.SUCCESS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,8 @@ import com.hbm.lib.Library;
|
|||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.main.NTMSounds;
|
import com.hbm.main.NTMSounds;
|
||||||
import com.hbm.module.machine.ModuleMachineFusion;
|
import com.hbm.module.machine.ModuleMachineFusion;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.sound.AudioWrapper;
|
import com.hbm.sound.AudioWrapper;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
@ -188,6 +190,10 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
|
|||||||
r = recipe.r;
|
r = recipe.r;
|
||||||
g = recipe.g;
|
g = recipe.g;
|
||||||
b = recipe.b;
|
b = recipe.b;
|
||||||
|
|
||||||
|
if(worldObj.getTotalWorldTime() % 20 == 15) {
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_PARTICLE, 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double outputIntensity = this.getOuputIntensity(receiverCount);
|
double outputIntensity = this.getOuputIntensity(receiverCount);
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import com.hbm.inventory.container.ContainerRBMKRod;
|
|||||||
import com.hbm.inventory.gui.GUIRBMKRod;
|
import com.hbm.inventory.gui.GUIRBMKRod;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemRBMKRod;
|
import com.hbm.items.machine.ItemRBMKRod;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteRayScan.RayEvent;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||||
import com.hbm.util.BufferUtil;
|
import com.hbm.util.BufferUtil;
|
||||||
import com.hbm.util.CompatEnergyControl;
|
import com.hbm.util.CompatEnergyControl;
|
||||||
@ -118,6 +120,9 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
|||||||
|
|
||||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||||
|
|
||||||
|
if(this.fluxQuantity > 0 && worldObj.getTotalWorldTime() % 200 == 0)
|
||||||
|
SatelliteRayScan.reportEvent(worldObj, xCoord, yCoord, zCoord, RayEvent.INFO_NUCLEAR, 300);
|
||||||
|
|
||||||
ItemRBMKRod rod = ((ItemRBMKRod)slots[0].getItem());
|
ItemRBMKRod rod = ((ItemRBMKRod)slots[0].getItem());
|
||||||
this.rodColor = rod.colorTint;
|
this.rodColor = rod.colorTint;
|
||||||
|
|
||||||
|
|||||||
28
src/main/java/com/hbm/util/fauxpointtwelve/DimPos.java
Normal file
28
src/main/java/com/hbm/util/fauxpointtwelve/DimPos.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package com.hbm.util.fauxpointtwelve;
|
||||||
|
|
||||||
|
public class DimPos extends BlockPos {
|
||||||
|
|
||||||
|
private int dimension;
|
||||||
|
|
||||||
|
public DimPos(double x, double y, double z, int dim) {
|
||||||
|
super(x, y, z);
|
||||||
|
this.dimension = dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DimPos(int x, int y, int z, int dim) {
|
||||||
|
super(x, y, z);
|
||||||
|
this.dimension = dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDim() {
|
||||||
|
return this.dimension;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return getDimIdentity(this.getX(), this.getY(), this.getZ(), this.getDim());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getDimIdentity(int x, int y, int z, int dim) {
|
||||||
|
return ((y + dim * 27644437) + z * 27644437) * 27644437 + x;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4415,6 +4415,7 @@ item.satellite.miner_astro.name=Asteroid Mining Ship
|
|||||||
item.satellite.miner_lunar.name=Lunar Mining Ship
|
item.satellite.miner_lunar.name=Lunar Mining Ship
|
||||||
item.satellite.precision_laser.name=Orbital Precision Laser
|
item.satellite.precision_laser.name=Orbital Precision Laser
|
||||||
item.satellite.radar.name=Radar Satellite
|
item.satellite.radar.name=Radar Satellite
|
||||||
|
item.satellite.ray_scan.name=Narrowband Emission Scanning Satellite
|
||||||
item.satellite.relay.name=Relay Satellite
|
item.satellite.relay.name=Relay Satellite
|
||||||
item.satellite.scanner.name=Depth Scanning Satellite
|
item.satellite.scanner.name=Depth Scanning Satellite
|
||||||
item.satellite.spy.name=Spy Satellite
|
item.satellite.spy.name=Spy Satellite
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 421 B |
Loading…
x
Reference in New Issue
Block a user