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 GT bug that spawns a water source when breaking ice with a saw/ch… #103

Merged
merged 3 commits into from
Sep 9, 2022

Conversation

Alexdoru
Copy link
Member

@Alexdoru Alexdoru commented Sep 8, 2022

…ainsaw

@@ -9,6 +9,7 @@

public enum Mixins {
// Vanilla Fixes
FIX_SAW_ICE_BREAK("minecraft.MixinBlockIce", () -> true, TargetedMod.VANILLA),
Copy link
Member

Choose a reason for hiding this comment

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

Please make this mixin optional, like all others

Copy link
Member Author

@Alexdoru Alexdoru Sep 9, 2022

Choose a reason for hiding this comment

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

It fixes a water dupe bug, why make it optional ?

Copy link
Member

Choose a reason for hiding this comment

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

Because A) it is good practice and B) this will throw an ClassNotFoundException if GregTech is not installed

Copy link
Contributor

Choose a reason for hiding this comment

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

People outside of the pack use hodgepodge, and I'll likely be pushing it to CF/Modrinth. All patches need to be configurable. This patch should also depend on GT, not vanilla.

Copy link
Member Author

Choose a reason for hiding this comment

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

should be good

if (itemStack == null
|| !(itemStack.getItem() instanceof GT_MetaGenerated_Tool)
|| !(((GT_MetaGenerated_Tool) itemStack.getItem()).getToolStats(itemStack) instanceof GT_Tool_Saw)) {
return instance.setBlock(x, y, z, block);
Copy link
Member

Choose a reason for hiding this comment

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

I think this will cause an infinite loop and end in an StackOverflowError

Copy link
Member Author

Choose a reason for hiding this comment

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

I tested in full pack and no errors, works as intended

@Alexdoru
Copy link
Member Author

Alexdoru commented Sep 9, 2022

need to close this once it's merged GTNewHorizons/GT-New-Horizons-Modpack#11240

@Alexdoru Alexdoru merged commit da7b1ab into master Sep 9, 2022
@Alexdoru Alexdoru deleted the fix_break_ice_saw branch September 9, 2022 18:40
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.

3 participants