Skip to content

Commit

Permalink
Fix DoubleInventory to CompoundContainer rename
Browse files Browse the repository at this point in the history
  • Loading branch information
2No2Name committed Oct 4, 2024
1 parent 0db7a0d commit a9f24b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.caffeinemc.mods.lithium.common.block.entity.inventory_change_tracking.InventoryChangeListener;
import net.caffeinemc.mods.lithium.common.block.entity.inventory_change_tracking.InventoryChangeTracker;
import net.caffeinemc.mods.lithium.common.block.entity.inventory_comparator_tracking.ComparatorTracker;
import net.caffeinemc.mods.lithium.mixin.block.hopper.DoubleInventoryAccessor;
import net.caffeinemc.mods.lithium.mixin.block.hopper.CompoundContainerAccessor;
import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList;
import net.minecraft.world.CompoundContainer;
Expand All @@ -32,8 +32,8 @@ public class LithiumDoubleInventory extends CompoundContainer implements Lithium
* @return The only non-removed LithiumDoubleInventory instance for the double inventory. Null if not compatible
*/
public static LithiumDoubleInventory getLithiumInventory(CompoundContainer doubleInventory) {
Container vanillaFirst = ((DoubleInventoryAccessor) doubleInventory).getFirst();
Container vanillaSecond = ((DoubleInventoryAccessor) doubleInventory).getSecond();
Container vanillaFirst = ((CompoundContainerAccessor) doubleInventory).getFirst();
Container vanillaSecond = ((CompoundContainerAccessor) doubleInventory).getSecond();
if (vanillaFirst != vanillaSecond && vanillaFirst instanceof LithiumInventory first && vanillaSecond instanceof LithiumInventory second) {
LithiumDoubleInventory newDoubleInventory = new LithiumDoubleInventory(first, second);
LithiumDoubleStackList doubleStackList = LithiumDoubleStackList.getOrCreate(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.caffeinemc.mods.lithium.common.hopper;

import net.caffeinemc.mods.lithium.common.block.entity.inventory_change_tracking.InventoryChangeTracker;
import net.caffeinemc.mods.lithium.mixin.block.hopper.DoubleInventoryAccessor;
import net.caffeinemc.mods.lithium.mixin.block.hopper.CompoundContainerAccessor;
import net.minecraft.world.CompoundContainer;
import net.minecraft.world.Container;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -115,10 +115,10 @@ public void clearSignalStrengthOverride() {
public void runComparatorUpdatePatternOnFailedExtract(LithiumStackList masterStackList, Container inventory) {
if (inventory instanceof CompoundContainer) {
this.first.runComparatorUpdatePatternOnFailedExtract(
this, ((DoubleInventoryAccessor)inventory).getFirst()
this, ((CompoundContainerAccessor) inventory).getFirst()
);
this.second.runComparatorUpdatePatternOnFailedExtract(
this, ((DoubleInventoryAccessor)inventory).getSecond()
this, ((CompoundContainerAccessor) inventory).getSecond()
);
}
}
Expand Down

0 comments on commit a9f24b5

Please sign in to comment.