-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CraftingProvider and StorageProvider Bugs
- Loading branch information
Showing
29 changed files
with
375 additions
and
1,145 deletions.
There are no files selected for viewing
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
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
54 changes: 52 additions & 2 deletions
54
...ssi/dedicated_applied_energistics/blockentities/InterDimensionalInterfaceBlockEntity.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 |
---|---|---|
@@ -1,18 +1,68 @@ | ||
package net.nussi.dedicated_applied_energistics.blockentities; | ||
|
||
import appeng.api.crafting.IPatternDetails; | ||
import appeng.api.networking.crafting.ICraftingProvider; | ||
import appeng.api.stacks.AEKey; | ||
import appeng.api.stacks.KeyCounter; | ||
import appeng.api.storage.IStorageMounts; | ||
import appeng.api.storage.IStorageProvider; | ||
import appeng.blockentity.grid.AENetworkBlockEntity; | ||
import com.mojang.logging.LogUtils; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.block.entity.BlockEntity; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.nussi.dedicated_applied_energistics.init.BlockEntityTypeInit; | ||
import net.nussi.dedicated_applied_energistics.providers.InterDimensionalInterfaceCrafting; | ||
import net.nussi.dedicated_applied_energistics.providers.InterDimensionalInterfaceStorage; | ||
import org.slf4j.Logger; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class InterDimensionalInterfaceBlockEntity extends BlockEntity { | ||
|
||
public class InterDimensionalInterfaceBlockEntity extends AENetworkBlockEntity implements IStorageProvider, ICraftingProvider { | ||
private static final Logger LOGGER = LogUtils.getLogger(); | ||
private InterDimensionalInterfaceStorage storage; | ||
private InterDimensionalInterfaceCrafting crafting; | ||
|
||
public InterDimensionalInterfaceBlockEntity(BlockPos pos, BlockState state) { | ||
super(BlockEntityTypeInit.INTER_DIMENSIONAL_INTERFACE_ENTITY_TYPE.get(), pos, state); | ||
|
||
this.getMainNode().addService(IStorageProvider.class, this); | ||
this.storage = new InterDimensionalInterfaceStorage(this); | ||
|
||
this.getMainNode().addService(ICraftingProvider.class, this); | ||
this.crafting = new InterDimensionalInterfaceCrafting(this); | ||
} | ||
|
||
@Override | ||
public void mountInventories(IStorageMounts storageMounts) { | ||
storage.mountInventories(storageMounts); | ||
} | ||
|
||
@Override | ||
public List<IPatternDetails> getAvailablePatterns() { | ||
return crafting.getAvailablePatterns(); | ||
} | ||
|
||
@Override | ||
public int getPatternPriority() { | ||
return crafting.getPatternPriority(); | ||
} | ||
|
||
@Override | ||
public boolean pushPattern(IPatternDetails patternDetails, KeyCounter[] inputHolder) { | ||
return crafting.pushPattern(patternDetails, inputHolder); | ||
} | ||
|
||
@Override | ||
public boolean isBusy() { | ||
return crafting.isBusy(); | ||
} | ||
|
||
@Override | ||
public Set<AEKey> getEmitableItems() { | ||
return crafting.getEmitableItems(); | ||
} | ||
|
||
|
||
} |
33 changes: 0 additions & 33 deletions
33
src/main/java/net/nussi/dedicated_applied_energistics/commands/GuiCommand.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/main/java/net/nussi/dedicated_applied_energistics/init/CellInit.java
This file was deleted.
Oops, something went wrong.
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
17 changes: 0 additions & 17 deletions
17
src/main/java/net/nussi/dedicated_applied_energistics/init/MenuInit.java
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
...ava/net/nussi/dedicated_applied_energistics/items/InterDimensionalStorageCellHandler.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.