Skip to content

Commit

Permalink
Deprecate for removal problematic impetus node loading method, and re…
Browse files Browse the repository at this point in the history
…place with safer alternatives (#379)
  • Loading branch information
TheCodex6824 committed Dec 9, 2024
1 parent 0790179 commit a94ebfd
Show file tree
Hide file tree
Showing 15 changed files with 2,550 additions and 2,458 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IImpetusNode extends INode<IImpetusGraph, IImpetusNode> {
public Set<DimensionalBlockPos> getOutputLocations();

public default long onTransaction(Deque<IImpetusNode> path, long energy, boolean simulate) {
return energy;
return energy;
}

public DimensionalBlockPos getLocation();
Expand Down Expand Up @@ -67,6 +67,15 @@ public default long onTransaction(Deque<IImpetusNode> path, long energy, boolean

public boolean removeOutputLocation(DimensionalBlockPos toRemove);

/**
* @deprecated This does not work for its intended purpose, since the world is not
* guaranteed to be available in TileEntity#onLoad. {@link NodeHelper#validate(IImpetusNode, World)}
* and {@link NodeHelper#tryConnectNewlyLoadedPeers(IImpetusNode, World)} called during tick methods or when
* receiving synced data fulfill similar purposes and should be used instead.
*
* This will be removed in the next major version.
*/
@Deprecated
public void init(World world);

public void unload();
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit a94ebfd

Please sign in to comment.