-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #50
- Loading branch information
Showing
40 changed files
with
870 additions
and
53 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
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
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
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
29 changes: 29 additions & 0 deletions
29
module-base/api/src/main/java/lol/bai/megane/api/provider/base/IoLessProgressProvider.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,29 @@ | ||
package lol.bai.megane.api.provider.base; | ||
|
||
import lol.bai.megane.api.provider.ProgressProvider; | ||
import net.minecraft.item.ItemStack; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public abstract class IoLessProgressProvider<T> extends ProgressProvider<T> { | ||
|
||
@Override | ||
public int getInputSlotCount() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int getOutputSlotCount() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public @NotNull ItemStack getInputStack(int slot) { | ||
return ItemStack.EMPTY; | ||
} | ||
|
||
@Override | ||
public @NotNull ItemStack getOutputStack(int slot) { | ||
return ItemStack.EMPTY; | ||
} | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
module-base/api/src/main/java/lol/bai/megane/api/util/BarFormat.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,6 @@ | ||
package lol.bai.megane.api.util; | ||
|
||
public enum BarFormat { | ||
FRACTION, | ||
PERCENT | ||
} |
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
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
43 changes: 42 additions & 1 deletion
43
module-compat/create/src/main/java/lol/bai/megane/module/create/MeganeCreate.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,27 +1,68 @@ | ||
package lol.bai.megane.module.create; | ||
|
||
import com.simibubi.create.content.contraptions.components.actors.BlockBreakingKineticTileEntity; | ||
import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerTileEntity; | ||
import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity; | ||
import com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity; | ||
import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity; | ||
import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankTileEntity; | ||
import com.simibubi.create.content.contraptions.fluids.tank.FluidTankTileEntity; | ||
import com.simibubi.create.content.contraptions.processing.BasinTileEntity; | ||
import com.simibubi.create.content.logistics.block.vault.ItemVaultTileEntity; | ||
import com.simibubi.create.content.schematics.block.SchematicTableTileEntity; | ||
import com.simibubi.create.content.schematics.block.SchematicannonTileEntity; | ||
import com.tterrag.registrate.fabric.SimpleFlowableFluid; | ||
import lol.bai.megane.api.MeganeModule; | ||
import lol.bai.megane.api.registry.ClientRegistrar; | ||
import lol.bai.megane.api.registry.CommonRegistrar; | ||
import lol.bai.megane.module.create.provider.BasinFluidProvider; | ||
import lol.bai.megane.module.create.provider.BasinItemProvider; | ||
import lol.bai.megane.module.create.provider.BasinProgressProvider; | ||
import lol.bai.megane.module.create.provider.BlockBreakingProgressProvider; | ||
import lol.bai.megane.module.create.provider.CreativeFluidTankFluidProvider; | ||
import lol.bai.megane.module.create.provider.CrushingWheelControllerProgressProvider; | ||
import lol.bai.megane.module.create.provider.DeployerItemProvider; | ||
import lol.bai.megane.module.create.provider.FluidTankFluidProvider; | ||
import lol.bai.megane.module.create.provider.ItemStackHandlerItemProvider; | ||
import lol.bai.megane.module.create.provider.MechanicalMixerProgressProvider; | ||
import lol.bai.megane.module.create.provider.MillstoneItemProvider; | ||
import lol.bai.megane.module.create.provider.MillstoneProgressProvider; | ||
import lol.bai.megane.module.create.provider.SchematicannonEnergyInfoProvider; | ||
import lol.bai.megane.module.create.provider.SchematicannonEnergyProvider; | ||
import lol.bai.megane.module.create.provider.SchematicannonProgressProvider; | ||
import lol.bai.megane.module.create.provider.SimpleFlowableFluidInfoProvider; | ||
|
||
@SuppressWarnings("unused") | ||
public class MeganeCreate implements MeganeModule { | ||
|
||
@Override | ||
public void registerCommon(CommonRegistrar registrar) { | ||
registrar.addFluid(CreativeFluidTankTileEntity.class, new CreativeFluidTankFluidProvider()); | ||
registrar.addFluid(999, CreativeFluidTankTileEntity.class, new CreativeFluidTankFluidProvider()); | ||
registrar.addFluid(BasinTileEntity.class, new BasinFluidProvider()); | ||
registrar.addFluid(FluidTankTileEntity.class, new FluidTankFluidProvider<>()); | ||
|
||
registrar.addEnergy(SchematicannonTileEntity.class, new SchematicannonEnergyProvider()); | ||
|
||
registrar.addProgress(BasinTileEntity.class, new BasinProgressProvider()); | ||
registrar.addProgress(BlockBreakingKineticTileEntity.class, new BlockBreakingProgressProvider()); | ||
registrar.addProgress(CrushingWheelControllerTileEntity.class, new CrushingWheelControllerProgressProvider()); | ||
registrar.addProgress(MechanicalMixerTileEntity.class, new MechanicalMixerProgressProvider()); | ||
registrar.addProgress(MillstoneTileEntity.class, new MillstoneProgressProvider()); | ||
registrar.addProgress(SchematicannonTileEntity.class, new SchematicannonProgressProvider()); | ||
|
||
registrar.addItem(BasinTileEntity.class, new BasinItemProvider()); | ||
registrar.addItem(DeployerTileEntity.class, new DeployerItemProvider()); | ||
registrar.addItem(ItemVaultTileEntity.class, new ItemStackHandlerItemProvider.Single<>(ItemVaultTileEntity::getInventoryOfBlock)); | ||
registrar.addItem(MillstoneTileEntity.class, new MillstoneItemProvider()); | ||
registrar.addItem(SchematicannonTileEntity.class, new ItemStackHandlerItemProvider.Single<>(t -> t.inventory)); | ||
registrar.addItem(SchematicTableTileEntity.class, new ItemStackHandlerItemProvider.Single<>(t -> t.inventory)); | ||
} | ||
|
||
@Override | ||
public void registerClient(ClientRegistrar registrar) { | ||
registrar.addFluidInfo(SimpleFlowableFluid.class, new SimpleFlowableFluidInfoProvider()); | ||
|
||
registrar.addEnergyInfo(SchematicannonTileEntity.class, new SchematicannonEnergyInfoProvider()); | ||
} | ||
|
||
} |
Oops, something went wrong.