Repository navigation
Conversation
BasinBlockEntityMixin 的品质注入挂在 Create 原版 BasinBlockEntity#acceptOutputs 的 HEAD 上,而 FluidLogistics 的 CopperBasinBlockEntity 覆写了该方法:有流体产物时把流体从 super 调用里剥掉(传 Collections.emptyList()),改由 acceptFluidsIntoOutputTank 自己灌进 outputTank。父类的注入因此永远拿到空流体列表,守卫条件两个都不成立时直接放行,品质被静默跳过。 新增 CopperBasinBlockEntityMixin,在子类 acceptOutputs 的 HEAD 主动调用 BasinRecipeQualityContext.applyToOutputs,让品质写回 outputFluids,铜工作盆随后灌罐即为带品质流体。返回值语义与父类保持一致:上下文判定不通过时取消本次接受。 FluidLogistics 为可选依赖:QualityFoodFluidsMixinPlugin 增加判断,只有 fluidlogistics 与 create 同时加载时才应用该 Mixin;build.gradle 增加对应的 compileOnly 依赖。 影响:只作用于铜工作盆产出流体的配方,Create 原版工作盆行为不变;输入流体带品质的配方同样覆盖。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现象
动力搅拌器处理铜工作盆(FluidLogistics 的 Copper Basin)时,配方产物为流体会丢失品质;Create 原版工作盆不受影响。整合包侧反馈单 MQSM7F。
根因
BasinBlockEntityMixin的品质注入挂在 Create 原版BasinBlockEntity#acceptOutputs的 HEAD 上。而 FluidLogistics 的CopperBasinBlockEntity extends BasinBlockEntity覆写了该方法:父类的注入因此永远拿到空流体列表,
!hasQualityCapableOutput(空) && !hasQualityFluidSource(consumedFluids)成立时直接return true跳过——品质被静默丢弃。修法
新增
CopperBasinBlockEntityMixin,在子类acceptOutputs的 HEAD 主动走一次同样的上下文:此时
outputFluids仍是BasinRecipe传进来的可变原列表,applyToOutputs会把带品质的FluidStack写回该列表。返回值语义与BasinBlockEntityMixin保持一致——上下文判定不通过时取消本次接受。可选依赖处理
FluidLogistics 不是必需依赖,因此
QualityFoodFluidsMixinPlugin增加判断:缺少 FluidLogistics 时该 Mixin 不应用,不会因目标类不存在而报错。
改动清单
mixin/CopperBasinBlockEntityMixin.javasrc/main/resources/quality_food_fluids.mixins.jsonmixins数组登记mixin/QualityFoodFluidsMixinPlugin.javafluidlogistics+create判断build.gradlecreate-fluidlogistics的 compileOnly 依赖验证
cosmopolitan冰淇淋配方(带品质水果 1 + 冰块 1 + 糖 1 + 750mB 牛奶 → 750mB 冰淇淋流体),产出流体带品质。gradlew build:改动不涉及新增外部 API 调用(applyToOutputs是本项目已有方法),编译行为与既有BasinBlockEntityMixin一致;建议在合并前跑一次构建确认。影响
只作用于铜工作盆产出流体的配方,Create 原版工作盆行为不变;输入流体带品质的配方同样覆盖。