Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AssLine structure check #1226

Merged
merged 2 commits into from
Nov 5, 2017
Merged

Conversation

Antifluxfield
Copy link
Contributor

No description provided.

Listen to the BlockEvent of Reinforced Glass and trigger the update check.
@Dream-Master
Copy link

@Antifluxfield did we need that for GTNH too ?

@Antifluxfield
Copy link
Contributor Author

Antifluxfield commented Sep 20, 2017

@Dream-Master Yes.

@Technus
Copy link
Contributor

Technus commented Sep 20, 2017

Try registering reinforced glass as gt casing?

@Technus
Copy link
Contributor

Technus commented Sep 20, 2017

@Technus
Copy link
Contributor

Technus commented Sep 20, 2017

https://github.com/Blood-Asp/GT5-Unofficial/blob/unstable/src/main/java/gregtech/api/GregTech_API.java#L294

And here you have explicit warning to not do what u did (does not apply here due to class being read only unles u inject this)

@Technus
Copy link
Contributor

Technus commented Sep 20, 2017

Disregard my last post looks like the only thing that needs to be changed is the addition of the glass to gt api so the state update can propagate properly trough glass (not exacly necessary since glass always touches the proper casing)

@Antifluxfield
Copy link
Contributor Author

@Technus It's ok to register the glass as a casing; but don't you think that the critical point of this issue is just what GregTech_API.java#L294 said?

You should call @causeMachineUpdate in @Block.breakBlock and in @Block.onBlockAdded of your registered Block.

When placing or breaking the reinforced glass, it doesn't trigger the upgrade. Register the block as a gt casing can only make it possible to transmit an upgrade through it; but an about-to-complete or a just-be-broken AssLine structure can always transmit a triggered upgrade to its controller. So if the glass doesn't call the causeMachineUpdate method, nothing will be fixed.

@Technus
Copy link
Contributor

Technus commented Sep 22, 2017

This is why i corrected myself. Only thing that need to be done is to add the casing to gt api.

@Technus
Copy link
Contributor

Technus commented Sep 22, 2017

(Add to api on top of your changes to be precise)

@Antifluxfield
Copy link
Contributor Author

That's fine.

Dream-Master referenced this pull request in GTNewHorizons/GT5-Unofficial Oct 6, 2017
@Blood-Asp Blood-Asp merged commit de7195f into Blood-Asp:unstable Nov 5, 2017
@Antifluxfield Antifluxfield deleted the patch-1 branch November 6, 2017 02:32
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