mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
eggplant emoji, droplets emoji, weary face emoji
This commit is contained in:
parent
4d6a92e015
commit
12e8da8750
11
changelog
11
changelog
@ -5,10 +5,11 @@
|
||||
* Mining level of iron tools by default
|
||||
* AoE, melee damage, reach and mining level can be upgraded with drill bits
|
||||
* Mining speed and fuel used can be changed with engines (diesel, aviation, electric, turbo)
|
||||
* Fortune can be added as mods (both mods do in fact stack)
|
||||
* Fortune can be added as mods (both mods do in fact stack, yielding fortune III)
|
||||
* Not a precision tool, intended to be used alongside pickaxes instead of replacing them
|
||||
* Despite this, sneaking allows the AoE to be disabled
|
||||
* Unlike pickaxes, shows a preview for what area is to be mined
|
||||
* Due to not being considered a tool like a vanilla one, it's not affected by dig speed penalties from fatigue, being underwater or on a ladder
|
||||
|
||||
## Changed
|
||||
* Updated russian and chinese localization
|
||||
@ -34,6 +35,14 @@
|
||||
* Given the cycle delay and the lid's movement speed, the inserters should now be fast enough to fully supply a speed III arc furnace
|
||||
* Skeletons can now be gibbed by explosions, although it will spawn clean bone particles and omit the gore splash effect
|
||||
* Polymer power tools now only have AoE 1 instead of AoE 2
|
||||
* The fluid container NEI handler now also includes the empty container, making it easier to find what fluids a canister for example is usable for
|
||||
* Changed Mk2 infinite water barrel to use generic cast parts instead of a very specific type of pipe
|
||||
* Retextured the multi fluid IDs to look more like the old IDs they replaced
|
||||
* Logistics provider and requester crates can now only connect to a path node if that path is a dedicated waypoint
|
||||
* This means that requesters and providers will no longer connect automatically, a logistics net now requires at least one dedicated waypoint
|
||||
* This also means that in larger networks with many providers and requesters, all the useless connections between them which scale exponentially will no longer exist
|
||||
* This is a band-aid fix for logistics nets destroying the game even at lower scales due to the path finding being unperformant as hell
|
||||
* The system will have to be reworked entirely sooner or later (ough)
|
||||
|
||||
## Fixed
|
||||
* Fixed the T-51b set not having radiation resistance
|
||||
|
||||
@ -97,6 +97,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.gun_double_barrel_sacred_dragon, 1), new Object[] { ModItems.gun_double_barrel, DictFrame.fromOne(ModItems.item_secret, EnumSecretType.SELENIUM_STEEL) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_charge_thrower, 1), new Object[] { "MMM", "BBL", "GG ", 'M', GUNMETAL.mechanism(), 'B', STEEL.heavyBarrel(), 'G', STEEL.grip(), 'L', Items.leather });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_charge_thrower, 1), new Object[] { "MMM", "BBL", "GG ", 'M', GUNMETAL.mechanism(), 'B', STEEL.heavyBarrel(), 'G', STEEL.grip(), 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_drill, 1), new Object[] { " GL", "IBP", " GL", 'G', GUNMETAL.ingot(), 'L', ANY_RUBBER.ingot(), 'I', TI.ingot(), 'B', STEEL.block(), 'P', ModItems.piston_selenium });
|
||||
|
||||
//SEDNA Ammo
|
||||
CraftingManager.addRecipeAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.STONE, 6), new Object[] { "C", "P", "G", 'C', KEY_COBBLESTONE, 'P', Items.paper, 'G', Items.gunpowder });
|
||||
@ -140,6 +141,17 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.LAS_SHOTGUN.ordinal()), new Object[] { "PPP", "RCR", "PPP", 'P', ANY_HARDPLASTIC.ingot(), 'R', ModItems.crystal_redstone, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.LAS_CAPACITOR.ordinal()), new Object[] { "CCC", "PIP", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR_TANTALIUM), 'P', ANY_HARDPLASTIC.ingot(), 'I', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_BISMOID) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.LAS_AUTO.ordinal()), new Object[] { " C ", "RFR", " C ", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_BISMOID), 'R', ModItems.crystal_redstone, 'F', ANY_BISMOIDBRONZE.heavyReceiver() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.DRILL_HSS.ordinal()), new Object[] { " IP", "IIM", " IP", 'I', DURA.ingot(), 'P', ANY_PLASTIC.ingot(), 'M', GUNMETAL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.DRILL_WEAPONSTEEL.ordinal()), new Object[] { " IP", "IIM", " IP", 'I', WEAPONSTEEL.ingot(), 'P', RUBBER.ingot(), 'M', GUNMETAL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.DRILL_TCALLOY.ordinal()), new Object[] { " IP", "IIM", " IP", 'I', ANY_RESISTANTALLOY.ingot(), 'P', RUBBER.ingot(), 'M', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.DRILL_SATURNITE.ordinal()), new Object[] { " IP", "IIM", " IP", 'I', BIGMT.ingot(), 'P', ANY_HARDPLASTIC.ingot(), 'M', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_DIESEL.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', DURA.plate(), 'P', ModItems.piston_selenium, 'S', STEEL.pipe() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_AVIATION.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', DURA.plateCast(), 'P', ModItems.piston_selenium, 'S', GUNMETAL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_ELECTRIC.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', ANY_PLASTIC.ingot(), 'P', GOLD.wireDense(), 'S', ModBlocks.capacitor_gold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.ENGINE_TURBO.ordinal()), new Object[] { "DSD", "PPP", "DSD", 'D', ANY_BISMOIDBRONZE.plateCast(), 'P', ModItems.piston_selenium, 'S', WEAPONSTEEL.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.MAGNET.ordinal()), new Object[] { "RGR", "GBG", "RGR", 'R', RUBBER.ingot(), 'G', GOLD.wireDense(), 'B', NB.block() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.SIFTER.ordinal()), new Object[] { "IGI", "IGI", 'I', DURA.ingot(), 'G', ModBlocks.steel_grate });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.CANISTERS.ordinal()), new Object[] { " R ", "CCC", "SSS", 'R', RUBBER.pipe(), 'C', ModItems.canister_empty, 'S', STEEL.plate() });
|
||||
|
||||
//Nitra!
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.M357_SP, 6), new Object[] { DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.M357_SP), ModItems.nitra });
|
||||
|
||||
@ -3,12 +3,12 @@ package com.hbm.handler.nei;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.handler.imc.ICompatNHNEI;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.Tuple.Triplet;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
@ -34,28 +34,31 @@ public class FluidRecipeHandler extends TemplateRecipeHandler implements ICompat
|
||||
return "fluidcons";
|
||||
}
|
||||
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
PositionedStack input;
|
||||
PositionedStack result;
|
||||
|
||||
public SmeltingSet(ItemStack input, ItemStack result) {
|
||||
input.stackSize = 1;
|
||||
this.input = new PositionedStack(input, 83 - 27 - 18 + 1, 5 + 18 + 1);
|
||||
this.result = new PositionedStack(result, 83 + 27 + 18 + 1 - 18, 5 + 18 + 1);
|
||||
}
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
|
||||
|
||||
PositionedStack[] input;
|
||||
PositionedStack result;
|
||||
|
||||
@Override
|
||||
public SmeltingSet(ItemStack fluid, ItemStack empty, ItemStack full) {
|
||||
fluid.stackSize = 1;
|
||||
|
||||
this.input = new PositionedStack[empty == null ? 1 : 2];
|
||||
this.input[0] = new PositionedStack(fluid, 30, 24);
|
||||
if(empty != null) this.input[1] = new PositionedStack(empty, 48, 24);
|
||||
this.result = new PositionedStack(full, 120, 24);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
|
||||
}
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(input));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Fluid Containers";
|
||||
@ -69,9 +72,9 @@ public class FluidRecipeHandler extends TemplateRecipeHandler implements ICompat
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if ((outputId.equals("fluidcons")) && getClass() == FluidRecipeHandler.class) {
|
||||
Map<Object, Object> recipes = MachineRecipes.instance().getFluidContainers();
|
||||
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()));
|
||||
List<Triplet<ItemStack, ItemStack, ItemStack>> recipes = MachineRecipes.instance().getFluidContainers();
|
||||
for(Triplet<ItemStack, ItemStack, ItemStack> recipe : recipes) {
|
||||
this.arecipes.add(new SmeltingSet(recipe.getX(), recipe.getY(), recipe.getZ()));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
@ -80,10 +83,12 @@ public class FluidRecipeHandler extends TemplateRecipeHandler implements ICompat
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
Map<Object, Object> recipes = MachineRecipes.instance().getFluidContainers();
|
||||
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), result) || compareFluidStacks(result, (ItemStack)recipe.getKey()))
|
||||
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()));
|
||||
List<Triplet<ItemStack, ItemStack, ItemStack>> recipes = MachineRecipes.instance().getFluidContainers();
|
||||
for(Triplet<ItemStack, ItemStack, ItemStack> recipe : recipes) {
|
||||
if(NEIServerUtils.areStacksSameType(recipe.getY(), result) ||
|
||||
NEIServerUtils.areStacksSameType(recipe.getZ(), result) ||
|
||||
compareFluidStacks(result, recipe.getX()))
|
||||
this.arecipes.add(new SmeltingSet(recipe.getX(), recipe.getY(), recipe.getZ()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,10 +103,12 @@ public class FluidRecipeHandler extends TemplateRecipeHandler implements ICompat
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
Map<Object, Object> recipes = MachineRecipes.instance().getFluidContainers();
|
||||
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), ingredient) || compareFluidStacks(ingredient, (ItemStack)recipe.getKey()))
|
||||
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()));
|
||||
List<Triplet<ItemStack, ItemStack, ItemStack>> recipes = MachineRecipes.instance().getFluidContainers();
|
||||
for(Triplet<ItemStack, ItemStack, ItemStack> recipe : recipes) {
|
||||
if(NEIServerUtils.areStacksSameType(recipe.getY(), ingredient) ||
|
||||
NEIServerUtils.areStacksSameType(recipe.getZ(), ingredient) ||
|
||||
compareFluidStacks(ingredient, recipe.getX()))
|
||||
this.arecipes.add(new SmeltingSet(recipe.getX(), recipe.getY(), recipe.getZ()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,16 +116,14 @@ public class FluidRecipeHandler extends TemplateRecipeHandler implements ICompat
|
||||
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
//return GUIMachineShredder.class;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6 - 18, 23, 42, 18), "fluidcons"));
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(71, 23, 42, 18), "fluidcons"));
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,9 +11,7 @@ public class FluidLoaderStandard extends FluidLoadingHandler {
|
||||
public boolean fillItem(ItemStack[] slots, int in, int out, FluidTank tank) {
|
||||
|
||||
if(tank.pressure != 0) return false;
|
||||
|
||||
if(slots[in] == null)
|
||||
return true;
|
||||
if(slots[in] == null) return true;
|
||||
|
||||
FluidType type = tank.getTankType();
|
||||
ItemStack full = FluidContainerRegistry.getFullContainer(slots[in], type);
|
||||
|
||||
@ -1,14 +1,12 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.inventory.FluidContainer;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.Tuple.Triplet;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@ -24,15 +22,6 @@ public class MachineRecipes {
|
||||
public static MachineRecipes instance() {
|
||||
return new MachineRecipes();
|
||||
}
|
||||
|
||||
//return: FluidType, amount produced, amount required, heat required (°C * 100)
|
||||
public static Object[] getBoilerOutput(FluidType type) {
|
||||
|
||||
if(type == Fluids.OIL) return new Object[] { Fluids.HOTOIL, 5, 5, 35000 };
|
||||
if(type == Fluids.CRACKOIL) return new Object[] { Fluids.HOTCRACKOIL, 5, 5, 35000 };
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public ArrayList<ItemStack> getAlloyFuels() {
|
||||
@ -133,18 +122,20 @@ public class MachineRecipes {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map<Object, Object> getFluidContainers() {
|
||||
Map<Object, Object> map = new HashMap<Object, Object>();
|
||||
public List<Triplet<ItemStack, ItemStack, ItemStack>> getFluidContainers() {
|
||||
List<Triplet<ItemStack, ItemStack, ItemStack>> list = new ArrayList();
|
||||
|
||||
for(FluidContainer con : FluidContainerRegistry.allContainers) {
|
||||
|
||||
if(con != null) {
|
||||
|
||||
ItemStack fluid = new ItemStack(ModItems.fluid_icon, 1, con.type.getID());
|
||||
fluid.stackTagCompound = new NBTTagCompound();
|
||||
fluid.stackTagCompound.setInteger("fill", con.content);
|
||||
map.put(fluid, con.fullContainer);
|
||||
list.add(new Triplet(fluid, con.emptyContainer, con.fullContainer));
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ public class XFactoryDrill {
|
||||
.addBus("EQUIP", new BusAnimationSequence().setPos(-1, 0, 0).addPos(0, 0, 0, 750, IType.SIN_DOWN));
|
||||
case CYCLE:
|
||||
double deploy = HbmAnimations.getRelevantTransformation("DEPLOY")[0];
|
||||
double spin = HbmAnimations.getRelevantTransformation("SPIN")[2] % 360;
|
||||
double spin = HbmAnimations.getRelevantTransformation("SPIN")[0] % 360; // seamlessly continue from the previous animation state
|
||||
return new BusAnimation()
|
||||
.addBus("DEPLOY", new BusAnimationSequence().setPos(deploy, 0, 0).addPos(1, 0, 0, (int) (500 * (1 - deploy)), IType.SIN_FULL).hold(1000).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("SPIN", new BusAnimationSequence().setPos(spin, 0, 0).addPos(spin + 360 * 1.5, 0, 0, 1500).addPos(spin + 360 * 2, 0, 0, 750, IType.SIN_DOWN));
|
||||
|
||||
@ -623,7 +623,7 @@ public class CraftingManager {
|
||||
|
||||
if(!GeneralConfig.enable528) {
|
||||
addRecipeAuto(new ItemStack(ModItems.inf_water, 1), new Object[] { "222", "131", "222", '1', Items.water_bucket, '2', AL.plate(), '3', DIAMOND.gem() });
|
||||
addRecipeAuto(new ItemStack(ModItems.inf_water_mk2, 1), new Object[] { "BPB", "PTP", "BPB", 'B', ModItems.inf_water, 'P', ModBlocks.fluid_duct_neo, 'T', ModItems.tank_steel });
|
||||
addRecipeAuto(new ItemStack(ModItems.inf_water_mk2, 1), new Object[] { "BPB", "PTP", "BPB", 'B', ModItems.inf_water, 'P', STEEL.pipe(), 'T', STEEL.shell() });
|
||||
}
|
||||
|
||||
//not so Temporary Crappy Recipes
|
||||
|
||||
@ -19,6 +19,25 @@ public class RequestNetwork {
|
||||
public static HashMap<World, HashMap<ChunkCoordIntPair, HashedSet<PathNode>>> activeWaypoints = new HashMap();
|
||||
public static final int maxAge = 2_000;
|
||||
|
||||
/*
|
||||
* this entire system sucks
|
||||
*
|
||||
* 1. a lot of the logic is fragmented between the tile entity base class and this one
|
||||
* 2. it's structured in a way where i can't even tell wtf is going on anymore
|
||||
* 3. is lags and the drones are dumb as shit
|
||||
*
|
||||
* plan of action:
|
||||
*
|
||||
* 1. nodespace all of it
|
||||
* 2. limit waypoints to only connect to the three closest waypoints
|
||||
* 3. limit crates to only connect to whatever waypoint is closest (bypasses the aforementioned cap)
|
||||
* 4. make pathfinding less stupid
|
||||
* 5. once a path has been found cache it, and only reset the cache when the nodespace changes
|
||||
* 6. realistically, blocks shouldn't change to block paths that often, do LOS checks like every 10 seconds or so
|
||||
* 7. LOS and connections could be directly handled by nodespace, which should make things like connections way easier to handle
|
||||
* 8. the "neighborhood" close waypoint detection system was a cool idea, keep that
|
||||
*/
|
||||
|
||||
public static void updateEntries() {
|
||||
|
||||
if(timer < 0) {
|
||||
@ -71,11 +90,13 @@ public class RequestNetwork {
|
||||
public BlockPos pos;
|
||||
public long lease;
|
||||
public boolean active = true;
|
||||
public boolean torchWaypoint;
|
||||
public HashedSet<PathNode> reachableNodes;
|
||||
public PathNode(BlockPos pos, HashedSet<PathNode> reachableNodes) {
|
||||
this.pos = pos;
|
||||
this.reachableNodes = new HashedSet<>(reachableNodes);
|
||||
this.lease = System.currentTimeMillis();
|
||||
this.torchWaypoint = true;
|
||||
}
|
||||
|
||||
@Override public int hashCode() { return pos.hashCode(); }
|
||||
@ -103,6 +124,7 @@ public class RequestNetwork {
|
||||
public OfferNode(BlockPos pos, HashedSet<PathNode> reachableNodes, List<ItemStack> offer) {
|
||||
super(pos, reachableNodes);
|
||||
this.offer = offer;
|
||||
this.torchWaypoint = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,6 +134,7 @@ public class RequestNetwork {
|
||||
public RequestNode(BlockPos pos, HashedSet<PathNode> reachableNodes, List<AStack> request) {
|
||||
super(pos, reachableNodes);
|
||||
this.request = request;
|
||||
this.torchWaypoint = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ public class TileEntityCraneInserter extends TileEntityCraneBase implements IGUI
|
||||
|
||||
if(ret == null || ret.stackSize != stack.stackSize) {
|
||||
slots[i] = ret;
|
||||
if(slots[1] != null) {
|
||||
if(slots[i] != null) {
|
||||
slots[i].stackSize += overshoot;
|
||||
} else if(overshoot > 0){
|
||||
slots[i] = stack.copy();
|
||||
|
||||
@ -90,6 +90,7 @@ public abstract class TileEntityRequestNetwork extends TileEntityLoadedBase {
|
||||
//discover new nodes
|
||||
int newNodeLimit = 5;
|
||||
for(PathNode node : localNodes) {
|
||||
if(!areNodesConnectable(node, newNode)) continue;
|
||||
|
||||
if(!knownNodes.contains(node) && !node.equals(pos)) {
|
||||
newNodeLimit--;
|
||||
@ -102,6 +103,10 @@ public abstract class TileEntityRequestNetwork extends TileEntityLoadedBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean areNodesConnectable(PathNode node1, PathNode node2) {
|
||||
return node1.torchWaypoint || node2.torchWaypoint;
|
||||
}
|
||||
|
||||
public abstract PathNode createNode(BlockPos pos);
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 825 B |
Binary file not shown.
|
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 311 B |
Loading…
x
Reference in New Issue
Block a user