This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated antimatter, added super buffer tile class
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
Submodule AntimatterAPI
updated
20 files
28 changes: 28 additions & 0 deletions
28
common/src/main/java/muramasa/gregtech/tile/single/TileEntitySuperBuffer.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package muramasa.gregtech.tile.single; | ||
|
||
import muramasa.antimatter.capability.item.TrackedItemHandler; | ||
import muramasa.antimatter.capability.machine.MachineItemHandler; | ||
import muramasa.antimatter.gui.SlotType; | ||
import muramasa.antimatter.machine.event.ContentEvent; | ||
import muramasa.antimatter.machine.types.Machine; | ||
import muramasa.antimatter.tile.TileEntityMachine; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import tesseract.api.item.ExtendedItemContainer; | ||
import tesseract.util.ItemHandlerUtils; | ||
|
||
public class TileEntitySuperBuffer extends TileEntityMachine<TileEntitySuperBuffer> { | ||
public TileEntitySuperBuffer(Machine<?> type, BlockPos pos, BlockState state) { | ||
super(type, pos, state); | ||
itemHandler.set(() -> new SuperBufferItemHandler(this)); | ||
} | ||
|
||
public static class SuperBufferItemHandler extends MachineItemHandler<TileEntitySuperBuffer> { | ||
|
||
public SuperBufferItemHandler(TileEntitySuperBuffer tile) { | ||
super(tile); | ||
this.inventories.put(SlotType.STORAGE, new TrackedItemHandler<>(tile, 256, true, true, (t, s) -> true, ContentEvent.ITEM_INPUT_CHANGED)); | ||
} | ||
} | ||
} |