This commit is contained in:
Boblet 2025-02-10 16:53:37 +01:00
parent d34624a224
commit 614f5db7dc
7 changed files with 77 additions and 68 deletions

View File

@ -1,9 +1,17 @@
## 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
## Fixed
* Fixed items being annihilated when shift clicking them into the particle source
@ -11,3 +19,4 @@
* 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

View File

@ -106,8 +106,8 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler implemen
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> other = new ArrayList();
for(PositionedStack pos : output) {
other.add(pos);
for(int i = 1; i < output.length; i++) {
other.add(output[i]);
}
other.add(machinePositioned);
return getCycledIngredients(cycleticks / 20, other);

View File

@ -38,8 +38,8 @@ public class RBMKDials {
KEY_MODERATOR_EFFICIENCY("dialModeratorEfficiency", 1.0),
KEY_ABSORBER_EFFICIENCY("dialAbsorberEfficiency", 1.0),
KEY_REFLECTOR_EFFICIENCY("dialReflectorEfficiency", 1.0),
KEY_DISABLE_DEPLETION("dialDisableDepletion", true),
KEY_DISABLE_XENON("dialDisableXenon", true);
KEY_DISABLE_DEPLETION("dialDisableDepletion", false),
KEY_DISABLE_XENON("dialDisableXenon", false);
public final String keyString;
public final Object defValue;

View File

@ -1,10 +1,12 @@
package com.hbm.uninos;
import com.hbm.uninos.UniNodespace.UniNodeWorld;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
public class GenNode<T> {
public long id;
public BlockPos[] positions;
public DirPos[] connections;
public INodeNet<T> net;
@ -12,6 +14,7 @@ public class GenNode<T> {
public boolean recentlyChanged = true;
public GenNode(BlockPos... positions) {
this.id = UniNodeWorld.nextId++;
this.positions = positions;
}
@ -37,3 +40,12 @@ public class GenNode<T> {
this.recentlyChanged = true;
}
}
/*
*
* ok so here's the deal: attempt #1 SUCKED.
* making a central nodespaces hashmap that holds one instance of each possible nodespace sounds like a great and simple solution
* until you realize that every single fucking fluid under the sun needs to be its own nodespace. which means the update function
* has to iterate over every world instance, and for every world instance there's 150 or so nodespaces for fluids alone. not good.
*
*/

View File

@ -1,29 +0,0 @@
package com.hbm.uninos;
import java.util.HashMap;
import com.hbm.util.fauxpointtwelve.BlockPos;
public class GenNodeWorld<T> {
public HashMap<BlockPos, GenNode<T>> nodes = new HashMap();
public void pushNode(GenNode<T> node) {
for(BlockPos pos : node.positions) {
nodes.put(pos, node);
}
}
public void popNode(GenNode<T> node) {
if(node.net != null) node.net.destroy();
for(BlockPos pos : node.positions) {
nodes.remove(pos);
node.expired = true;
}
}
public void popNode(BlockPos pos) {
GenNode<T> node = nodes.get(pos);
if(node != null) popNode(node);
}
}

View File

@ -1,34 +0,0 @@
package com.hbm.uninos;
import java.util.HashMap;
import com.hbm.util.fauxpointtwelve.BlockPos;
import net.minecraft.world.World;
public class GenNodespace<T> {
public HashMap<World, GenNodeWorld<T>> worlds = new HashMap<>();
public GenNode<T> getNode(World world, int x, int y, int z) {
GenNodeWorld nodeWorld = worlds.get(world);
if(nodeWorld != null) return (GenNode<T>) nodeWorld.nodes.get(new BlockPos(x, y, z));
return null;
}
public void createNode(World world, GenNode<T> node) {
GenNodeWorld nodeWorld = worlds.get(world);
if(nodeWorld == null) {
nodeWorld = new GenNodeWorld();
worlds.put(world, nodeWorld);
}
nodeWorld.pushNode(node);
}
public void destroyNode(World world, int x, int y, int z) {
GenNode<T> node = getNode(world, x, y, z);
if(node != null) {
worlds.get(world).popNode(node);
}
}
}

View File

@ -1,8 +1,59 @@
package com.hbm.uninos;
import java.util.HashMap;
import java.util.HashSet;
import com.hbm.util.fauxpointtwelve.BlockPos;
import net.minecraft.world.World;
public class UniNodespace {
public static HashMap<World, UniNodeWorld> worlds = new HashMap();
/*
* attempt #1 went south because there would be an entirely separate nodespace for every single possible type
* which for fluids means at least 150 alone, and that's not great.
* this is attempt #2 which is not good for reasons explained below
*/
public static class UniNodeWorld {
public static int nextId = 0;
public static HashMap<INetworkProvider, GenNodespace> nodespaces = new HashMap();
//shot in the dark: how well is the dual hashmap system gonna perform?
//how are we gonna handle type segregation for network forming?
public HashMap<BlockPos, HashSet<Long>> posToId = new HashMap<>();
public HashMap<Long, GenNode> idToNode = new HashMap<>();
/** Adds a node at all its positions to the nodespace */
public void pushNode(GenNode node) {
for(BlockPos pos : node.positions) {
HashSet<Long> set = posToId.get(pos);
if(set == null) {
set = new HashSet();
posToId.put(pos, set);
}
set.add(node.id);
}
}
/** Removes the specified node from all positions from nodespace */
public void popNode(GenNode node) {
if(node.net != null) node.net.destroy();
for(BlockPos pos : node.positions) {
HashSet<Long> set = posToId.get(pos);
if(set != null) {
set.remove(node.id);
if(set.isEmpty()) posToId.remove(pos);
}
}
node.expired = true;
}
}
/*
* yeah this shit isn't gonna work because this allows multiple nodes of the same type in the same pos
* (we don't want that) which also makes it near impossible to do per-type position node lookups
* (sure it's possible but we are gonna have to iterate over every possible node in that spot, which is
* usually 1, but who knows how we end up using this system so i'd rather not)
*/
}