Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emissive fix #447

Merged
merged 7 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Network Receiver
- Network Card

### Fixed

- Inactive Wireless Transmitter model being emissive.

## [2.0.0-milestone.3.1] - 2023-10-30

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy;
import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy;
import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry;
import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource;
import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy;
import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy;
import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry;
import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource;
import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.refinedmods.refinedstorage2.platform.api.support.energy;

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support;
package com.refinedmods.refinedstorage2.platform.api.support.network;

import com.refinedmods.refinedstorage2.api.network.node.NetworkNode;
import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support;
package com.refinedmods.refinedstorage2.platform.api.support.network;

import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem;
package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem;
package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem;

import com.refinedmods.refinedstorage2.api.network.Network;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem;
package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem;
package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem;

import net.minecraft.network.FriendlyByteBuf;
import org.apiguardian.api.API;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem;
package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem;

import java.util.List;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage2.platform.forge.grid;
package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem;

import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem;
package com.refinedmods.refinedstorage2.platform.api.support.network;

import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"parent": "refinedstorage2:block/all_cutout",
"textures": {
"all": "refinedstorage2:block/network_receiver/base",
"cutout": "refinedstorage2:block/network_receiver/cutouts/inactive",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/black"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/blue"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/brown"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/cyan"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/gray"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/green"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/light_blue"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/light_gray"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/lime"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/magenta"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/orange"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/pink"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/purple"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/red"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/white"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "refinedstorage2:block/wireless_transmitter/inactive",
"parent": "refinedstorage2:block/wireless_transmitter/active",
"textures": {
"cutout": "refinedstorage2:block/wireless_transmitter/cutouts/yellow"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@
import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlock;
import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntity;
import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorContainerMenu;
import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl;
import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlock;
import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlockItem;
import com.refinedmods.refinedstorage2.platform.common.support.SimpleItem;
import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyLootItemFunctionSerializer;
import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl;
import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceFactory;
import com.refinedmods.refinedstorage2.platform.common.upgrade.FortuneUpgradeItem;
import com.refinedmods.refinedstorage2.platform.common.upgrade.RangeUpgradeItem;
Expand Down Expand Up @@ -155,10 +155,6 @@
public abstract class AbstractModInitializer {
private static final String FLUID_REGISTRY_KEY = "fluid";

protected final void initializePlatform(final Platform platform) {
((PlatformProxy) Platform.INSTANCE).setPlatform(platform);
}

protected final void initializePlatformApi() {
((PlatformApiProxy) PlatformApi.INSTANCE).setDelegate(new PlatformApiImpl());
registerAdditionalStorageTypes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,22 @@
import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications;
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener;
import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer;
import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting;

public abstract class AbstractPlatform implements Platform {
private final ServerToClientCommunications serverToClientCommunications;
private final ClientToServerCommunications clientToServerCommunications;
private final MenuOpener menuOpener;
private final BucketAmountFormatting bucketAmountFormatting;
private final FluidRenderer fluidRenderer;
private final GridInsertionStrategyFactory defaultGridInsertionStrategyFactory;

protected AbstractPlatform(final ServerToClientCommunications serverToClientCommunications,
final ClientToServerCommunications clientToServerCommunications,
final MenuOpener menuOpener,
final BucketAmountFormatting bucketAmountFormatting,
final FluidRenderer fluidRenderer,
final GridInsertionStrategyFactory defaultGridInsertionStrategyFactory) {
this.serverToClientCommunications = serverToClientCommunications;
this.clientToServerCommunications = clientToServerCommunications;
this.menuOpener = menuOpener;
this.bucketAmountFormatting = bucketAmountFormatting;
this.fluidRenderer = fluidRenderer;
this.defaultGridInsertionStrategyFactory = defaultGridInsertionStrategyFactory;
}
Expand All @@ -44,11 +40,6 @@ public MenuOpener getMenuOpener() {
return menuOpener;
}

@Override
public BucketAmountFormatting getBucketAmountFormatter() {
return bucketAmountFormatting;
}

@Override
public FluidRenderer getFluidRenderer() {
return fluidRenderer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener;
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager;
import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer;
import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting;

import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -58,8 +57,6 @@ public interface Platform {

TagKey<Item> getWrenchTag();

BucketAmountFormatting getBucketAmountFormatter();

Config getConfig();

boolean canEditBoxLoseFocus(EditBox editBox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy;
import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy;
import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry;
import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource;
import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource;
Expand All @@ -59,13 +59,13 @@
import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes;
import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorExtractionStrategy;
import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorInsertionStrategy;
import com.refinedmods.refinedstorage2.platform.common.support.LevelConnectionProvider;
import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl;
import com.refinedmods.refinedstorage2.platform.common.support.energy.ItemEnergyStorage;
import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.CompositeSlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.InventorySlotReference;
import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.InventorySlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemHelperImpl;
import com.refinedmods.refinedstorage2.platform.common.support.network.LevelConnectionProvider;
import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.CompositeSlotReferenceProvider;
import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.InventorySlotReference;
import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.InventorySlotReferenceFactory;
import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.NetworkBoundItemHelperImpl;
import com.refinedmods.refinedstorage2.platform.common.support.registry.PlatformRegistryImpl;
import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceFactory;
import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResourceFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener;
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager;
import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer;
import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting;

import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -48,11 +47,12 @@ public class PlatformProxy implements Platform {
@Nullable
private Platform platform;

public void setPlatform(final Platform platform) {
if (this.platform != null) {
public static void loadPlatform(final Platform platform) {
final PlatformProxy proxy = (PlatformProxy) Platform.INSTANCE;
if (proxy.platform != null) {
throw new IllegalStateException("Platform already set");
}
this.platform = platform;
proxy.platform = platform;
}

@Override
Expand Down Expand Up @@ -80,11 +80,6 @@ public TagKey<Item> getWrenchTag() {
return ensureLoaded().getWrenchTag();
}

@Override
public BucketAmountFormatting getBucketAmountFormatter() {
return ensureLoaded().getBucketAmountFormatter();
}

@Override
public Config getConfig() {
return ensureLoaded().getConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public Optional<TooltipComponent> getTooltipImage(final ItemStack stack) {
return Optional.of(new HelpTooltipComponent(isActive(stack) ? CONFIGURED_HELP : EMPTY_HELP));
}

public boolean isActive(final ItemStack stack) {
boolean isActive(final ItemStack stack) {
return stack.getTag() != null && stack.getTag().contains(TAG_TYPE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.refinedmods.refinedstorage2.platform.common.content.Blocks;
import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider;
import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem;
import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker;
import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker;

import javax.annotation.Nullable;

Expand Down
Loading
Loading