-
Notifications
You must be signed in to change notification settings - Fork 28
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
added lightningcraft compat #283
base: master
Are you sure you want to change the base?
added lightningcraft compat #283
Conversation
New WR adding a gs compat
src/main/java/com/cleanroommc/groovyscript/compat/mods/ModSupport.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Infusion.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is also lightning transforming recipes, according to MoreTweaker, although those might deserve a similar treatment to Pneu explosion (creation of native functionality + suggestion to use that instead of custom compat)
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Crusher.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Crusher.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Infusion.java
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Infusion.java
Outdated
Show resolved
Hide resolved
I've heard the LC's own lightning transform is really buggy (see: DJ2 where you can only craft electricium in a specific order), which is why I haven't implemented it. Do not mind trying to implement lightning transform properly under in-world crafting. |
updated |
public @Nullable LightningInfusionRecipe register() { | ||
if (!validate()) return null; | ||
|
||
ItemStack centerItem = this.centerItem.getMatchingStacks()[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should loop for each of getMatchingStacks()
instead of only taking the first.
if (!validate()) return null; | ||
|
||
ItemStack centerItem = this.centerItem.getMatchingStacks()[0]; | ||
ItemStack[] inputs = input.stream().map(i -> i.getMatchingStacks()[0]).toArray(ItemStack[]::new); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while it is not currently on main
and is still just in the Betweenlands PR, IngredientHelper.cartesianProductItemStacks
would be very useful here to, once again, use all values of getMatchingStacks()
instead of just the first.
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Infusion.java
Outdated
Show resolved
Hide resolved
@Property(defaultValue = "determined automatically based on the input items") | ||
private boolean nbtSensitive = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why having this be directly configurable by the player is required? if it can be automatically determined, why not simply not expose it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there are cases where it's automatically configured value is wrong. For example, if you want to allow only input item that has no NBT in it (say, it's some tool that stores durability in NBT). You need to enable nbtSensitive = true, and there's not really another way to do it
src/main/java/com/cleanroommc/groovyscript/compat/mods/lightningcraft/Infusion.java
Outdated
Show resolved
Hide resolved
going to wait until betweenlands is merged for the cartesian product thing because I do not feel like reinventing the wheel and also because I feel like I'll have to rewrite to it anyway. |
literally no one asked for this but here we go
oh wait Lord_Chaos did