From e2e7ca77da938104a903ca03d696ec76c8f13076 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Thu, 24 Aug 2023 21:48:25 +0200 Subject: [PATCH] fix: comment --- .../platform/api/PlatformApi.java | 4 ++-- .../platform/api/PlatformApiProxy.java | 6 ++--- .../item/AbstractStorageContainerItem.java | 4 ++-- ...r.java => StorageContainerItemHelper.java} | 2 +- .../AbstractStorageContainerBlockItem.java | 6 ++--- .../platform/common/PlatformApiImpl.java | 10 ++++---- .../common/block/AbstractStorageBlock.java | 2 +- .../platform/common/content/ContentNames.java | 24 +++++++++---------- ...va => StorageContainerItemHelperImpl.java} | 4 ++-- .../common/item/FluidStorageDiskItem.java | 2 +- .../common/item/ItemStorageDiskItem.java | 2 +- .../block/FluidStorageBlockBlockItem.java | 2 +- .../item/block/ItemStorageBlockBlockItem.java | 2 +- .../fabric/ClientModInitializerImpl.java | 15 ++++-------- .../platform/forge/ConfigImpl.java | 4 ++-- .../energy/ForgeEnergyCapabilityProvider.java | 2 +- 16 files changed, 41 insertions(+), 50 deletions(-) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/{StorageContainerHelper.java => StorageContainerItemHelper.java} (97%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/{StorageContainerHelperImpl.java => StorageContainerItemHelperImpl.java} (98%) diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java index 859718d8b..64524468d 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java @@ -17,7 +17,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; +import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; @@ -48,7 +48,7 @@ public interface PlatformApi { StorageRepository getStorageRepository(Level level); - StorageContainerHelper getStorageContainerHelper(); + StorageContainerItemHelper getStorageContainerItemHelper(); PlatformRegistry> getStorageChannelTypeRegistry(); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java index 1760d0c5d..f370f3ff1 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java @@ -17,7 +17,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; +import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; @@ -62,8 +62,8 @@ public StorageRepository getStorageRepository(final Level level) { } @Override - public StorageContainerHelper getStorageContainerHelper() { - return ensureLoaded().getStorageContainerHelper(); + public StorageContainerItemHelper getStorageContainerItemHelper() { + return ensureLoaded().getStorageContainerItemHelper(); } @Override diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java index 2b18688f8..42109c34a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java @@ -26,12 +26,12 @@ // TODO: Tags/ore dict in recipes @API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0") public abstract class AbstractStorageContainerItem extends Item implements StorageContainerItem { - protected final StorageContainerHelper helper; + protected final StorageContainerItemHelper helper; private final StorageChannelType type; protected AbstractStorageContainerItem(final Properties properties, final StorageChannelType type, - final StorageContainerHelper helper) { + final StorageContainerItemHelper helper) { super(properties); this.type = type; this.helper = helper; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItemHelper.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItemHelper.java index d69b5a77d..4121a6b9b 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItemHelper.java @@ -19,7 +19,7 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.2.5") -public interface StorageContainerHelper { +public interface StorageContainerItemHelper { Optional> resolve(StorageRepository storageRepository, ItemStack stack); void set(StorageRepository storageRepository, ItemStack stack, Storage storage); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java index 828382572..928d8b643 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.api.item.block; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; +import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.List; @@ -24,12 +24,12 @@ @API(status = API.Status.STABLE, since = "2.0.0-milestone.1.4") public abstract class AbstractStorageContainerBlockItem extends BlockItem { - protected final StorageContainerHelper helper; + protected final StorageContainerItemHelper helper; protected AbstractStorageContainerBlockItem( final Block block, final Properties properties, - final StorageContainerHelper helper + final StorageContainerItemHelper helper ) { super(block, properties); this.helper = helper; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java index 213ea92e6..4ced31cce 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java @@ -21,7 +21,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; +import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; @@ -39,7 +39,7 @@ import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.common.internal.grid.NoOpGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.common.internal.item.StorageContainerHelperImpl; +import com.refinedmods.refinedstorage2.platform.common.internal.item.StorageContainerItemHelperImpl; import com.refinedmods.refinedstorage2.platform.common.internal.network.LevelConnectionProvider; import com.refinedmods.refinedstorage2.platform.common.internal.registry.PlatformRegistryImpl; import com.refinedmods.refinedstorage2.platform.common.internal.resource.FluidResourceFactory; @@ -108,7 +108,7 @@ public class PlatformApiImpl implements PlatformApi { Comparator.comparingInt(ConstructorStrategyFactory::getPriority) ); private final CompositeIngredientConverter compositeConverter = new CompositeIngredientConverter(); - private final StorageContainerHelper storageContainerHelper = new StorageContainerHelperImpl(); + private final StorageContainerItemHelper storageContainerItemHelper = new StorageContainerItemHelperImpl(); private final List gridInsertionStrategyFactories = new ArrayList<>(); private final GridInsertionHintsImpl gridInsertionHints = new GridInsertionHintsImpl( new ItemGridInsertionHint(), @@ -142,8 +142,8 @@ public StorageRepository getStorageRepository(final Level level) { } @Override - public StorageContainerHelper getStorageContainerHelper() { - return storageContainerHelper; + public StorageContainerItemHelper getStorageContainerItemHelper() { + return storageContainerItemHelper; } private StorageRepositoryImpl createStorageRepository(final CompoundTag tag) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java index 35a5b3287..7bf6b4629 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java @@ -65,7 +65,7 @@ private void apply(final ItemStack stack, final AbstractStorageBlockBlockEntity< final UUID storageId = storageBlockEntity.getStorageId(); if (storageId != null) { LOGGER.debug("Transferred storage {} at {} to stack", storageId, storageBlockEntity.getBlockPos()); - PlatformApi.INSTANCE.getStorageContainerHelper().setId(stack, storageId); + PlatformApi.INSTANCE.getStorageContainerItemHelper().setId(stack, storageId); } else { LOGGER.warn("Storage block {} has no associated storage ID!", storageBlockEntity.getBlockPos()); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java index 5d036ebb8..3feb4311d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java @@ -5,19 +5,17 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; public final class ContentNames { - private static final String BLOCK_CATEGORY = "block"; - - public static final MutableComponent CABLE = createTranslation(BLOCK_CATEGORY, "cable"); - public static final MutableComponent GRID = createTranslation(BLOCK_CATEGORY, "grid"); - public static final MutableComponent CRAFTING_GRID = createTranslation(BLOCK_CATEGORY, "crafting_grid"); - public static final MutableComponent DETECTOR = createTranslation(BLOCK_CATEGORY, "detector"); - public static final MutableComponent IMPORTER = createTranslation(BLOCK_CATEGORY, "importer"); - public static final MutableComponent EXPORTER = createTranslation(BLOCK_CATEGORY, "exporter"); - public static final MutableComponent EXTERNAL_STORAGE = createTranslation(BLOCK_CATEGORY, "external_storage"); - public static final MutableComponent CONSTRUCTOR = createTranslation(BLOCK_CATEGORY, "constructor"); - public static final MutableComponent DESTRUCTOR = createTranslation(BLOCK_CATEGORY, "destructor"); - public static final MutableComponent CONTROLLER = createTranslation(BLOCK_CATEGORY, "controller"); - public static final MutableComponent CREATIVE_CONTROLLER = createTranslation(BLOCK_CATEGORY, "creative_controller"); + public static final MutableComponent CABLE = createTranslation("block", "cable"); + public static final MutableComponent GRID = createTranslation("block", "grid"); + public static final MutableComponent CRAFTING_GRID = createTranslation("block", "crafting_grid"); + public static final MutableComponent DETECTOR = createTranslation("block", "detector"); + public static final MutableComponent IMPORTER = createTranslation("block", "importer"); + public static final MutableComponent EXPORTER = createTranslation("block", "exporter"); + public static final MutableComponent EXTERNAL_STORAGE = createTranslation("block", "external_storage"); + public static final MutableComponent CONSTRUCTOR = createTranslation("block", "constructor"); + public static final MutableComponent DESTRUCTOR = createTranslation("block", "destructor"); + public static final MutableComponent CONTROLLER = createTranslation("block", "controller"); + public static final MutableComponent CREATIVE_CONTROLLER = createTranslation("block", "creative_controller"); public static final MutableComponent WIRELESS_GRID = createTranslation("item", "wireless_grid"); private ContentNames() { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerItemHelperImpl.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerItemHelperImpl.java index 6f88b224d..8f2688022 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerItemHelperImpl.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; +import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import com.refinedmods.refinedstorage2.platform.common.internal.storage.StorageTooltipHelper; @@ -25,7 +25,7 @@ import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -public class StorageContainerHelperImpl implements StorageContainerHelper { +public class StorageContainerItemHelperImpl implements StorageContainerItemHelper { private static final String TAG_ID = "id"; @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java index 320d8edb6..d439ac758 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java @@ -29,7 +29,7 @@ public FluidStorageDiskItem(final FluidStorageType.Variant variant) { super( new Item.Properties().stacksTo(1).fireResistant(), StorageChannelTypes.FLUID, - PlatformApi.INSTANCE.getStorageContainerHelper() + PlatformApi.INSTANCE.getStorageContainerItemHelper() ); this.variant = variant; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java index 658df67bd..e9efa237b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java @@ -29,7 +29,7 @@ public ItemStorageDiskItem(final ItemStorageType.Variant variant) { super( new Item.Properties().stacksTo(1).fireResistant(), StorageChannelTypes.ITEM, - PlatformApi.INSTANCE.getStorageContainerHelper() + PlatformApi.INSTANCE.getStorageContainerItemHelper() ); this.variant = variant; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java index ed5683cec..fc90f5772 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java @@ -28,7 +28,7 @@ public FluidStorageBlockBlockItem(final Block block, final FluidStorageType.Vari super( block, new Item.Properties().stacksTo(1).fireResistant(), - PlatformApi.INSTANCE.getStorageContainerHelper() + PlatformApi.INSTANCE.getStorageContainerItemHelper() ); this.variant = variant; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java index 3622ded74..f34d72258 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java @@ -28,7 +28,7 @@ public ItemStorageBlockBlockItem(final Block block, final ItemStorageType.Varian super( block, new Item.Properties().stacksTo(1).fireResistant(), - PlatformApi.INSTANCE.getStorageContainerHelper() + PlatformApi.INSTANCE.getStorageContainerItemHelper() ); this.variant = variant; } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 2a857227e..4845a2739 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -39,7 +39,6 @@ import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; -import net.fabricmc.fabric.api.client.model.loading.v1.ModelResolver; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.client.rendering.v1.TooltipComponentCallback; import net.fabricmc.loader.api.FabricLoader; @@ -51,13 +50,11 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; import net.minecraft.client.renderer.item.ItemProperties; -import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.MenuType; import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.block.Block; -import org.jetbrains.annotations.Nullable; import org.lwjgl.glfw.GLFW; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -225,15 +222,11 @@ private void registerCustomModels() { final ResourceLocation diskDriveIdentifier = createIdentifier("block/disk_drive"); final ResourceLocation diskDriveIdentifierItem = createIdentifier("item/disk_drive"); - ModelLoadingPlugin.register(pluginContext -> pluginContext.resolveModel().register(new ModelResolver() { - @Override - @Nullable - public UnbakedModel resolveModel(final Context context) { - if (context.id().equals(diskDriveIdentifier) || context.id().equals(diskDriveIdentifierItem)) { - return new DiskDriveUnbakedModel(); - } - return null; + ModelLoadingPlugin.register(pluginContext -> pluginContext.resolveModel().register(context -> { + if (context.id().equals(diskDriveIdentifier) || context.id().equals(diskDriveIdentifierItem)) { + return new DiskDriveUnbakedModel(); } + return null; })); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java index 396053595..cb67f1fd6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java @@ -613,9 +613,9 @@ private class WirelessGridEntryImpl implements WirelessGridEntry { .defineInRange("energyCapacity", DefaultEnergyUsage.WIRELESS_GRID_CAPACITY, 0, Long.MAX_VALUE); openEnergyUsage = builder.comment("The energy used by the Wireless Grid to open") .defineInRange("openEnergyUsage", DefaultEnergyUsage.WIRELESS_GRID_OPEN, 0, Long.MAX_VALUE); - extractEnergyUsage = builder.comment("The energy used by the Wireless Grid to extract items") + extractEnergyUsage = builder.comment("The energy used by the Wireless Grid to extract resources") .defineInRange("extractEnergyUsage", DefaultEnergyUsage.WIRELESS_GRID_EXTRACT, 0, Long.MAX_VALUE); - insertEnergyUsage = builder.comment("The energy used by the Wireless Grid to insert items") + insertEnergyUsage = builder.comment("The energy used by the Wireless Grid to insert resources") .defineInRange("insertEnergyUsage", DefaultEnergyUsage.WIRELESS_GRID_INSERT, 0, Long.MAX_VALUE); builder.pop(); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/energy/ForgeEnergyCapabilityProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/energy/ForgeEnergyCapabilityProvider.java index 8bbf30cc8..7c72772d0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/energy/ForgeEnergyCapabilityProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/energy/ForgeEnergyCapabilityProvider.java @@ -26,4 +26,4 @@ public LazyOptional getCapability(@Nonnull final Capability cap, @Null } return LazyOptional.empty(); } -} \ No newline at end of file +}