Skip to content

ref/1.18 new network system for signalbox#267

Open
Uhutown wants to merge 48 commits into1.18-masterfrom
1.18-network
Open

ref/1.18 new network system for signalbox#267
Uhutown wants to merge 48 commits into1.18-masterfrom
1.18-network

Conversation

@Uhutown
Copy link
Copy Markdown
Collaborator

@Uhutown Uhutown commented Feb 10, 2026

No description provided.

@Uhutown Uhutown self-assigned this Feb 10, 2026
@MrTroble MrTroble self-requested a review February 26, 2026 12:48
Comment thread src/main/java/com/troblecodings/signals/blocks/Signal.java Outdated
SIGNAL_IDS.add(this);
this.id = name.hashCode();
if (SIGNAL_IDS.containsKey(this.id)) {
OpenSignalsMain.exitMinecraftWithMessage("Hash [" + this.id + "] already exists for ["
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or use a better hash ...

if (currentTime - startTime >= 5000)
return;
continue;
mc.doRunTask(() -> {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we defer this here?

public <T> Optional<T> getEntry(final PathEntryType<T> type) {
final Optional<T> entry = super.getEntry(type);
if (entry.filter(n -> n.equals(EnumPathUsage.SELECTED)).isPresent()) {
return entry;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok why this change. This is to set a break point

protected void setSignals(final SignalStateInfo lastSignal) {
if (isExecutingSignalSet || tile == null)
return;
isExecutingSignalSet = true;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be a critical section? If so this is non atomic, writes might be discarded!

Comment thread src/main/java/com/troblecodings/signals/blocks/Signal.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants