mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-28 05:58:33 +01:00
Compare commits
No commits in common. "6b5c63059d6fce214be7cf599c59b9454965774d" and "ad981047d7d7459b36860e1fd8658d4f277187c4" have entirely different histories.
6b5c63059d
...
ad981047d7
3 changed files with 6 additions and 7 deletions
|
@ -32,7 +32,7 @@ mod_name=PrettyPipes
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=MIT
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=1.16.1
|
||||
mod_version=1.16.0
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
@ -21,7 +21,6 @@ import net.minecraft.world.item.ItemStack;
|
|||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.saveddata.SavedData;
|
||||
import net.neoforged.neoforge.items.IItemHandler;
|
||||
import net.neoforged.neoforge.network.PacketDistributor;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.jgrapht.ListenableGraph;
|
||||
|
@ -340,7 +339,7 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
|
|||
if (!this.isNode(node))
|
||||
return Collections.emptyList();
|
||||
this.startProfile("get_network_items");
|
||||
var ret = new HashMap<IItemHandler, NetworkLocation>();
|
||||
List<NetworkLocation> info = new ArrayList<>();
|
||||
for (var dest : this.getOrderedNetworkNodes(node)) {
|
||||
if (!this.level.isLoaded(dest))
|
||||
continue;
|
||||
|
@ -350,15 +349,15 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
|
|||
if (handler == null || !pipe.canNetworkSee(dir, handler))
|
||||
continue;
|
||||
// check if this handler already exists (double-connected pipes, double chests etc.)
|
||||
if (ret.containsKey(handler))
|
||||
if (info.stream().anyMatch(l -> handler.equals(l.getItemHandler(this.level))))
|
||||
continue;
|
||||
var location = new NetworkLocation(dest, dir);
|
||||
if (!location.isEmpty(this.level))
|
||||
ret.put(handler, location);
|
||||
info.add(location);
|
||||
}
|
||||
}
|
||||
this.endProfile();
|
||||
return new ArrayList<>(ret.values());
|
||||
return info;
|
||||
}
|
||||
|
||||
public void createNetworkLock(NetworkLock lock) {
|
||||
|
|
|
@ -45,7 +45,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class PipeBlock extends BaseEntityBlock implements SimpleWaterloggedBlock {
|
||||
public class PipeBlock extends BaseEntityBlock {
|
||||
|
||||
public static final MapCodec<PipeBlock> CODEC = BlockBehaviour.simpleCodec(PipeBlock::new);
|
||||
|
||||
|
|
Loading…
Reference in a new issue