More fixes, bump to 0.8.4
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Refined Storage Changelog
|
||||
|
||||
### 0.8.4
|
||||
**Bugfixes**
|
||||
- Fixed delay until grid items are visible
|
||||
- Performance improvements
|
||||
|
||||
### 0.8.3
|
||||
**Bugfixes**
|
||||
- Fixed drawer controllers not working with external storage
|
||||
|
||||
@@ -12,7 +12,7 @@ buildscript {
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
|
||||
version = "0.8.3"
|
||||
version = "0.8.4"
|
||||
group = "refinedstorage"
|
||||
archivesBaseName = "refinedstorage"
|
||||
|
||||
|
||||
@@ -17,10 +17,13 @@ import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import refinedstorage.item.ItemStorageDisk;
|
||||
import refinedstorage.proxy.CommonProxy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Mod(modid = RefinedStorage.ID, version = RefinedStorage.VERSION)
|
||||
public final class RefinedStorage {
|
||||
public static final String ID = "refinedstorage";
|
||||
public static final String VERSION = "0.8.3";
|
||||
public static final String VERSION = "0.8.4";
|
||||
|
||||
public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ID);
|
||||
|
||||
@@ -42,6 +45,9 @@ public final class RefinedStorage {
|
||||
@Instance
|
||||
public static RefinedStorage INSTANCE;
|
||||
|
||||
public List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
public long lastItemUpdate;
|
||||
|
||||
public int cableRfUsage;
|
||||
public int constructorRfUsage;
|
||||
public int crafterRfUsage;
|
||||
|
||||
@@ -27,6 +27,8 @@ public class GroupedStorage implements IGroupedStorage {
|
||||
|
||||
@Override
|
||||
public void rebuild() {
|
||||
System.out.println("Rebuilding!");
|
||||
|
||||
storages.clear();
|
||||
|
||||
for (INetworkSlave slave : network.getSlaves()) {
|
||||
@@ -37,6 +39,8 @@ public class GroupedStorage implements IGroupedStorage {
|
||||
|
||||
stacks.clear();
|
||||
|
||||
System.out.println("Storages (" + storages.size() + ")");
|
||||
|
||||
for (IStorage storage : storages) {
|
||||
for (ItemStack stack : storage.getItems()) {
|
||||
add(stack);
|
||||
|
||||
@@ -118,7 +118,7 @@ public class GuiGrid extends GuiBase {
|
||||
items.clear();
|
||||
|
||||
if (grid.isConnected()) {
|
||||
items.addAll(grid.getItems());
|
||||
items.addAll(RefinedStorage.INSTANCE.items);
|
||||
|
||||
String query = searchField.getText().trim().toLowerCase();
|
||||
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package refinedstorage.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.network.ByteBufUtils;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import refinedstorage.RefinedStorage;
|
||||
import refinedstorage.api.network.INetworkMaster;
|
||||
import refinedstorage.container.ContainerGrid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -51,11 +49,8 @@ public class MessageGridItems implements IMessage, IMessageHandler<MessageGridIt
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(MessageGridItems message, MessageContext ctx) {
|
||||
Container container = Minecraft.getMinecraft().thePlayer.openContainer;
|
||||
|
||||
if (container instanceof ContainerGrid) {
|
||||
((ContainerGrid) container).getGrid().setItems(message.items);
|
||||
}
|
||||
RefinedStorage.INSTANCE.items = message.items;
|
||||
RefinedStorage.INSTANCE.lastItemUpdate = System.currentTimeMillis();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -376,6 +376,8 @@ public class TileController extends TileBase implements INetworkMaster, IEnergyR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
storage.rebuild();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
package refinedstorage.tile.grid;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import refinedstorage.api.network.IGridHandler;
|
||||
import refinedstorage.block.EnumGridType;
|
||||
import refinedstorage.tile.config.IRedstoneModeConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IGrid {
|
||||
EnumGridType getType();
|
||||
|
||||
List<ItemStack> getItems();
|
||||
|
||||
void setItems(List<ItemStack> items);
|
||||
|
||||
BlockPos getNetworkPosition();
|
||||
|
||||
IGridHandler getGridHandler();
|
||||
|
||||
@@ -66,9 +66,6 @@ public class TileGrid extends TileSlave implements IGrid {
|
||||
private int sortingType = SORTING_TYPE_NAME;
|
||||
private int searchBoxMode = SEARCH_BOX_MODE_NORMAL;
|
||||
|
||||
// Used clientside only
|
||||
private List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
|
||||
@Override
|
||||
public int getEnergyUsage() {
|
||||
switch (getType()) {
|
||||
@@ -95,16 +92,6 @@ public class TileGrid extends TileSlave implements IGrid {
|
||||
return type == null ? EnumGridType.NORMAL : type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItems(List<ItemStack> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getNetworkPosition() {
|
||||
return network != null ? network.getPosition() : null;
|
||||
|
||||
@@ -15,9 +15,6 @@ import refinedstorage.network.MessageWirelessGridSettingsUpdate;
|
||||
import refinedstorage.tile.config.IRedstoneModeConfig;
|
||||
import refinedstorage.tile.controller.TileController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WirelessGrid implements IGrid {
|
||||
private EnumHand hand;
|
||||
private World world;
|
||||
@@ -25,8 +22,6 @@ public class WirelessGrid implements IGrid {
|
||||
private int sortingType;
|
||||
private int sortingDirection;
|
||||
private int searchBoxMode;
|
||||
private List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
private long lastUpdate;
|
||||
|
||||
public WirelessGrid(World world, ItemStack stack, EnumHand hand) {
|
||||
this.hand = hand;
|
||||
@@ -42,17 +37,6 @@ public class WirelessGrid implements IGrid {
|
||||
return EnumGridType.NORMAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItems(List<ItemStack> items) {
|
||||
this.items = items;
|
||||
this.lastUpdate = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getNetworkPosition() {
|
||||
return controllerPos;
|
||||
@@ -122,6 +106,6 @@ public class WirelessGrid implements IGrid {
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return System.currentTimeMillis() - lastUpdate < 1000;
|
||||
return System.currentTimeMillis() - RefinedStorage.INSTANCE.lastItemUpdate < 1000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"modid": "refinedstorage",
|
||||
"name": "Refined Storage",
|
||||
"description": "A Minecraft mod all about storage.",
|
||||
"version": "0.8.3",
|
||||
"version": "0.8.4",
|
||||
"mcversion": "1.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Reference in New Issue
Block a user