Skip to content

Commit

Permalink
Remove 1024k and 4096k stuff,
Browse files Browse the repository at this point in the history
Update gradle,
Fix screen handler registration
  • Loading branch information
ProjectET committed Dec 7, 2023
1 parent f85a13c commit 5d493ac
Show file tree
Hide file tree
Showing 44 changed files with 55 additions and 339 deletions.
12 changes: 9 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'fabric-loom' version '0.13-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -52,21 +52,27 @@ dependencies {
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modLocalRuntime("dev.architectury:architectury:${project.arch_version}")

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation("appeng:appliedenergistics2-fabric:${project.ae2_version}")

modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
modLocalRuntime("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
}

modImplementation("me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}")
modCompileOnly("me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}")

modCompileOnly("mcp.mobius.waila:wthit-api:fabric-${project.wthit_version}") {
exclude group: "net.fabricmc.fabric-api"
}

modLocalRuntime("teamreborn:energy:${project.tr_energy_version}") {
exclude group: "net.fabricmc.fabric-api"
}

// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
}
Expand Down
14 changes: 8 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19
minecraft_version=1.19.2
loader_version=0.14.8
# Mod Properties
mod_version=1.1.0-beta.8
maven_group=io.github.projectet
archives_base_name=AE2Things
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.57.0+1.19
ae2_version=12.0.2-alpha
cloth_config_version=7.0.69
rei_version=9.1.503
wthit_version=5.5.1
fabric_version=0.76.1+1.19.2
ae2_version=12.9.8
cloth_config_version=8.3.103
arch_version=6.5.85
rei_version=9.1.668
wthit_version=5.9.0
tr_energy_version=2.0.0-beta1
5 changes: 3 additions & 2 deletions src/main/java/io/github/projectet/ae2things/AE2Things.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import appeng.api.upgrades.Upgrades;
import appeng.block.AEBaseBlockItem;
import appeng.block.AEBaseEntityBlock;
import appeng.core.AppEng;
import appeng.core.definitions.AEItems;
import appeng.menu.AEBaseMenu;
import appeng.menu.SlotSemantic;
Expand Down Expand Up @@ -80,7 +81,7 @@ public void onAe2Initialized() {
STORAGE_INSTANCE = StorageManager.getInstance(world.getServer());
}));

AdvancedInscriberMenu.ADVANCED_INSCRIBER_SHT = MenuTypeBuilder.create(AdvancedInscriberMenu::new, BEAdvancedInscriber.class).build("advanced_inscriber");
CrystalGrowthMenu.CRYSTAL_GROWTH_SHT = MenuTypeBuilder.create(CrystalGrowthMenu::new, BECrystalGrowth.class).build("crystal_growth");
Registry.register(Registry.MENU, AppEng.makeId("advanced_inscriber"),AdvancedInscriberMenu.ADVANCED_INSCRIBER_SHT);
Registry.register(Registry.MENU, AppEng.makeId("crystal_growth"),CrystalGrowthMenu.CRYSTAL_GROWTH_SHT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.github.projectet.ae2things.AE2Things;
import io.github.projectet.ae2things.block.entity.BEAdvancedInscriber;
import io.github.projectet.ae2things.gui.advancedInscriber.AdvancedInscriberMenu;
import javax.annotation.Nullable;
import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
Expand All @@ -20,6 +19,7 @@
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;

public class BlockAdvancedInscriber extends AEBaseEntityBlock<BEAdvancedInscriber> {

Expand Down Expand Up @@ -51,8 +51,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {

@Override
public InteractionResult onActivated(final Level level, final BlockPos pos, final Player p,
final InteractionHand hand,
final @Nullable ItemStack heldItem, final BlockHitResult hit) {
final InteractionHand hand,
final @Nullable ItemStack heldItem, final BlockHitResult hit) {
if (!InteractionUtil.isInAlternateUseMode(p)) {
final BEAdvancedInscriber ai = (BEAdvancedInscriber) level.getBlockEntity(pos);
if (ai != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.github.projectet.ae2things.AE2Things;
import io.github.projectet.ae2things.block.entity.BECrystalGrowth;
import io.github.projectet.ae2things.gui.crystalGrowth.CrystalGrowthMenu;
import javax.annotation.Nullable;
import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
Expand All @@ -20,6 +19,7 @@
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;

public class BlockCrystalGrowth extends AEBaseEntityBlock<BECrystalGrowth> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;


import javax.annotation.Nullable;
import java.util.EnumSet;
import java.util.IdentityHashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.*;

public class BECrystalGrowth extends AENetworkPowerBlockEntity implements IGridTickable, IUpgradeableObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public void onAe2Initialized() {
});

ColorProviderRegistry.ITEM.register(DISKDrive::getColor, AETItems.DISK_DRIVE_1K, AETItems.DISK_DRIVE_4K, AETItems.DISK_DRIVE_16K, AETItems.DISK_DRIVE_64K);
ColorProviderRegistry.ITEM.register(BasicStorageCell::getColor, AETItems.FLUID_CELL_1024K, AETItems.FLUID_CELL_4096K, AETItems.ITEM_CELL_1024K, AETItems.ITEM_CELL_4096K);
ColorProviderRegistry.ITEM.register(PortableDISKItem::getColor, AETItems.PORTABLE_DISK_1K, AETItems.PORTABLE_DISK_4K, AETItems.PORTABLE_DISK_16K, AETItems.PORTABLE_DISK_64K);
ColorProviderRegistry.ITEM.register(PortableCellItem::getColor, AETItems.PORTABLE_ITEM_1024K, AETItems.PORTABLE_ITEM_4096K, AETItems.PORTABLE_FLUID_1024K, AETItems.PORTABLE_FLUID_4096K);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

public class AdvancedInscriberMenu extends UpgradeableMenu<BEAdvancedInscriber> implements IProgressProvider, IUpgradeableObject {

public static MenuType<AdvancedInscriberMenu> ADVANCED_INSCRIBER_SHT;
public static MenuType<AdvancedInscriberMenu> ADVANCED_INSCRIBER_SHT = MenuTypeBuilder.create(AdvancedInscriberMenu::new, BEAdvancedInscriber.class).build("advanced_inscriber");

private InternalInventory inventory;
private Level world;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import appeng.api.inventories.InternalInventory;
import appeng.menu.SlotSemantics;
import appeng.menu.implementations.MenuTypeBuilder;
import appeng.menu.implementations.UpgradeableMenu;
import appeng.menu.interfaces.IProgressProvider;
import io.github.projectet.ae2things.AE2Things;
Expand All @@ -13,7 +14,7 @@

public class CrystalGrowthMenu extends UpgradeableMenu<BECrystalGrowth> {

public static MenuType<CrystalGrowthMenu> CRYSTAL_GROWTH_SHT;
public static MenuType<CrystalGrowthMenu> CRYSTAL_GROWTH_SHT = MenuTypeBuilder.create(CrystalGrowthMenu::new, BECrystalGrowth.class).build("crystal_growth");;

private final InternalInventory inventory;
private final Level world;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;

import javax.annotation.Nullable;
import java.util.List;
import java.util.function.Function;

Expand Down
29 changes: 1 addition & 28 deletions src/main/java/io/github/projectet/ae2things/item/AETItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import appeng.items.materials.StorageComponentItem;
import appeng.items.materials.UpgradeCardItem;
import appeng.items.storage.BasicStorageCell;
import appeng.items.storage.StorageTier;
import appeng.items.tools.powered.PortableCellItem;
import appeng.menu.me.common.MEStorageMenu;
import io.github.projectet.ae2things.AE2Things;
Expand All @@ -21,11 +22,6 @@

public class AETItems {

public static final PortableCellItem.StorageTier SIZE_1024K = new PortableCellItem.StorageTier("1024k", 524288, 18, 8192,
() -> AETItems.CELL_COMPONENT_1024K);
public static final PortableCellItem.StorageTier SIZE_4096K = new PortableCellItem.StorageTier("4096k", 2097152, 9, 32768,
() -> AETItems.CELL_COMPONENT_4096K);

public static final ResourceLocation MODEL_DISK_DRIVE_1K = AE2Things.id("model/drive/cells/disk_1k");
public static final ResourceLocation MODEL_DISK_DRIVE_4K = AE2Things.id("model/drive/cells/disk_4k");
public static final ResourceLocation MODEL_DISK_DRIVE_16K = AE2Things.id("model/drive/cells/disk_16k");
Expand All @@ -40,27 +36,11 @@ public class AETItems {
public static final DISKDrive DISK_DRIVE_4K = registerCell(AETItems.MODEL_DISK_DRIVE_4K, new DISKDrive(AEItems.CELL_COMPONENT_4K, 4, 1.0f), "disk_drive_4k");
public static final DISKDrive DISK_DRIVE_16K = registerCell(AETItems.MODEL_DISK_DRIVE_16K, new DISKDrive(AEItems.CELL_COMPONENT_16K, 16, 1.5f), "disk_drive_16k");
public static final DISKDrive DISK_DRIVE_64K = registerCell(AETItems.MODEL_DISK_DRIVE_64K, new DISKDrive(AEItems.CELL_COMPONENT_64K, 64, 2.0f), "disk_drive_64k");

public static final StorageComponentItem CELL_COMPONENT_1024K = item(new StorageComponentItem(DEFAULT_SETTINGS.stacksTo(64), 1024),"cell_component_1024k");
public static final StorageComponentItem CELL_COMPONENT_4096K = item(new StorageComponentItem(DEFAULT_SETTINGS.stacksTo(64), 4096),"cell_component_4096k");

public static final BasicStorageCell ITEM_CELL_1024K = registerCell(new ResourceLocation("ae2:block/drive/cells/64k_item_cell"), new BasicStorageCell(DEFAULT_SETTINGS.stacksTo(1), CELL_COMPONENT_1024K, AEItems.ITEM_CELL_HOUSING, 3.0f, 1024, 8192,63, AEKeyType.items()), "item_storage_cell_1024k");
public static final BasicStorageCell ITEM_CELL_4096K = registerCell(new ResourceLocation("ae2:block/drive/cells/64k_item_cell"), new BasicStorageCell(DEFAULT_SETTINGS.stacksTo(1), CELL_COMPONENT_4096K, AEItems.ITEM_CELL_HOUSING, 3.5f, 4096, 32768,63, AEKeyType.items()), "item_storage_cell_4096k");

public static final BasicStorageCell FLUID_CELL_1024K = registerCell(new ResourceLocation("ae2:block/drive/cells/64k_fluid_cell"), new BasicStorageCell(DEFAULT_SETTINGS.stacksTo(1), CELL_COMPONENT_1024K, AEItems.FLUID_CELL_HOUSING, 3.0f, 1024, 8192,5, AEKeyType.fluids()),"fluid_storage_cell_1024k");
public static final BasicStorageCell FLUID_CELL_4096K = registerCell(new ResourceLocation("ae2:block/drive/cells/64k_fluid_cell"), new BasicStorageCell(DEFAULT_SETTINGS.stacksTo(1), CELL_COMPONENT_4096K, AEItems.FLUID_CELL_HOUSING, 3.5f, 4096, 32768,5, AEKeyType.fluids()),"fluid_storage_cell_4096k");

public static final Item PORTABLE_DISK_1K = registerPortableDISK("portable_disk_1k", AEItems.CELL_COMPONENT_1K.asItem());
public static final Item PORTABLE_DISK_4K = registerPortableDISK("portable_disk_4k", AEItems.CELL_COMPONENT_4K.asItem());
public static final Item PORTABLE_DISK_16K = registerPortableDISK("portable_disk_16k", AEItems.CELL_COMPONENT_16K.asItem());
public static final Item PORTABLE_DISK_64K = registerPortableDISK("portable_disk_64k", AEItems.CELL_COMPONENT_64K.asItem());

public static final Item PORTABLE_ITEM_1024K = registerPortableItemCell("portable_item_cell_1024k", SIZE_1024K);
public static final Item PORTABLE_ITEM_4096K = registerPortableItemCell("portable_item_cell_4096k", SIZE_4096K);

public static final Item PORTABLE_FLUID_1024K = registerPortableFluidCell("portable_fluid_cell_1024k", SIZE_1024K);
public static final Item PORTABLE_FLUID_4096K = registerPortableFluidCell("portable_fluid_cell_4096k", SIZE_4096K);

public static final UpgradeCardItem FORTUNE_CARD = item(new UpgradeCardItem(DEFAULT_SETTINGS.stacksTo(64)), "fortune_upgrade");

public static void init() {
Expand All @@ -85,11 +65,4 @@ private static Item registerPortableDISK(String id, StorageComponentItem sizeCom
return item(new PortableDISKItem(sizeComponent, DEFAULT_SETTINGS.stacksTo(1).fireResistant()), id);
}

private static Item registerPortableItemCell(String id, PortableCellItem.StorageTier tier) {
return item(new PortableCellItem(AEKeyType.items(), MEStorageMenu.PORTABLE_ITEM_CELL_TYPE, tier, DEFAULT_SETTINGS.stacksTo(1)), id);
}

private static Item registerPortableFluidCell(String id, PortableCellItem.StorageTier tier) {
return item(new PortableCellItem(AEKeyType.fluids(), MEStorageMenu.PORTABLE_FLUID_CELL_TYPE, tier, DEFAULT_SETTINGS.stacksTo(1)), id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import appeng.api.upgrades.IUpgradeInventory;
import appeng.api.upgrades.IUpgradeableItem;
import appeng.api.upgrades.UpgradeInventories;
import appeng.block.AEBaseBlockItemChargeable;
import appeng.block.networking.EnergyCellBlockItem;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.definitions.AEItems;
Expand All @@ -34,7 +34,6 @@
import io.github.projectet.ae2things.storage.IDISKCellItem;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -134,7 +133,7 @@ private boolean disassembleDrive(ItemStack stack, Level level, Player player) {
var ingredientStack = ingredient.getItems()[0].copy();

// Dump remaining energy into whatever can accept it
if (remainingEnergy > 0 && ingredientStack.getItem() instanceof AEBaseBlockItemChargeable chargeable) {
if (remainingEnergy > 0 && ingredientStack.getItem() instanceof EnergyCellBlockItem chargeable) {
remainingEnergy = chargeable.injectAEPower(ingredientStack, remainingEnergy, Actionable.MODULATE);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package io.github.projectet.ae2things.recipe;

public class CrystalGrowthBuilder {
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5d493ac

Please sign in to comment.