Fix misc bugs

This commit is contained in:
raoulvdberge
2016-12-28 07:35:43 +01:00
parent a06e5313d3
commit 77238d978c
3 changed files with 16 additions and 2 deletions

View File

@@ -128,6 +128,8 @@ public abstract class NetworkNode implements INetworkNode, INetworkNeighborhoodA
@Override
public NBTTagCompound writeConfiguration(NBTTagCompound tag) {
redstoneMode.write(tag);
return tag;
}
@@ -138,6 +140,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNeighborhoodA
@Override
public void readConfiguration(NBTTagCompound tag) {
redstoneMode = RedstoneMode.read(tag);
}
@Nullable

View File

@@ -23,6 +23,6 @@ public class ContainerDetector extends ContainerBase {
return mergeItemStackToFilters(slot.getStack(), 0, 1);
}
return null;
return ItemStack.EMPTY;
}
}

View File

@@ -4,6 +4,7 @@ import com.raoulvdberge.refinedstorage.api.network.INetworkNode;
import com.raoulvdberge.refinedstorage.api.network.INetworkNodeHolder;
import com.raoulvdberge.refinedstorage.api.network.INetworkNodeProvider;
import com.raoulvdberge.refinedstorage.api.network.INetworkNodeProxy;
import com.raoulvdberge.refinedstorage.api.util.IWrenchable;
import com.raoulvdberge.refinedstorage.apiimpl.API;
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNode;
import com.raoulvdberge.refinedstorage.proxy.CapabilityNetworkNodeProxy;
@@ -20,7 +21,7 @@ import net.minecraftforge.items.IItemHandler;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public abstract class TileNode<N extends NetworkNode> extends TileBase implements INetworkNodeProxy<N>, INetworkNodeHolder, IRedstoneConfigurable {
public abstract class TileNode<N extends NetworkNode> extends TileBase implements INetworkNodeProxy<N>, INetworkNodeHolder, IRedstoneConfigurable, IWrenchable {
public static final TileDataParameter<Integer> REDSTONE_MODE = RedstoneMode.createParameter();
private NBTTagCompound legacyTagToRead;
@@ -90,6 +91,16 @@ public abstract class TileNode<N extends NetworkNode> extends TileBase implement
getNode().setRedstoneMode(mode);
}
@Override
public NBTTagCompound writeConfiguration(NBTTagCompound tag) {
return getNode().writeConfiguration(tag);
}
@Override
public void readConfiguration(NBTTagCompound tag) {
getNode().readConfiguration(tag);
}
@Override
public void read(NBTTagCompound tag) {
super.read(tag);