Skip to content

Commit

Permalink
Update AbstractFurnaceBlockEntityMixin.java
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr authored Dec 7, 2023
1 parent a5dfb73 commit 6117d0d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@

@Mixin(AbstractFurnaceBlockEntity.class)
abstract public class AbstractFurnaceBlockEntityMixin<T> extends BaseContainerBlockEntity implements WorldlyContainer, RecipeHolder, StackedContentsCompatible, SidedStorageBlockEntity {
private static final FluidVariant EXPERIENCE = FluidVariant.of(CeiFluids.EXPERIENCE.getSource());

protected AbstractFurnaceBlockEntityMixin(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
}
Expand All @@ -74,12 +72,12 @@ private void injectSetRecipeUsed(@Nullable Recipe<?> recipe, CallbackInfo ci) {
long amount = internalTank.getFluidAmount();
amount += (amount == 0) ? calculateExperienceStored() :
Math.floor(((AbstractCookingRecipe) recipe).getExperience() * UNIT_PER_MB);
internalTank.setFluid(new FluidStack(EXPERIENCE, amount));
internalTank.setFluid(new FluidStack(FluidVariant.of(CeiFluids.EXPERIENCE.getSource()), amount));
}
}

@Unique
protected final FluidTank internalTank = new FluidTank(java.lang.Long.MAX_VALUE, fs -> fs.getType().equals(EXPERIENCE)) {
protected final FluidTank internalTank = new FluidTank(java.lang.Long.MAX_VALUE, fs -> fs.getType().equals(FluidVariant.of(CeiFluids.EXPERIENCE.getSource()))) {
@Override
protected void onContentsChanged() {
long total = calculateExperienceStored();
Expand Down

0 comments on commit 6117d0d

Please sign in to comment.