Bump Forge and JEI version, update changelog, small improvements

This commit is contained in:
raoulvdberge
2017-08-08 09:48:10 +02:00
parent 90a137ea10
commit 11e420ea58
5 changed files with 20 additions and 12 deletions

View File

@@ -1,6 +1,8 @@
# Refined Storage Changelog
### 1.5.15
- Updated Forge to 2444 (MC 1.12.1) (raoulvdberge)
- Added InventoryTweaks Grid sorting (cooliojazz)
- Added CTM integration for Disk Manipulator (raoulvdberge)
### 1.5.14

View File

@@ -28,10 +28,10 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
version = "1.12-14.21.1.2426"
version = "1.12.1-14.22.0.2444"
runDir = "run"
useDepAts = true
mappings = "snapshot_20170727"
mappings = "snapshot_20170807"
}
repositories {
@@ -54,8 +54,8 @@ repositories {
}
dependencies {
deobfCompile "mezz.jei:jei_1.12:4.7.2.77:api"
runtime "mezz.jei:jei_1.12:4.7.2.77"
deobfCompile "mezz.jei:jei_1.12:4.7.5.84:api"
runtime "mezz.jei:jei_1.12:4.7.5.84"
deobfCompile "MCMultiPart2:MCMultiPart:2.2.2"
// deobfCompile "li.cil.oc:OpenComputers:MC1.11.2-1.7.0.28:api"
deobfCompile "com.jaquadro.minecraft.storagedrawers:StorageDrawers:1.12-5.2.9:api"

View File

@@ -7,23 +7,28 @@ import invtweaks.api.InvTweaksAPI;
import net.minecraftforge.fml.common.Loader;
public class GridSortingInventoryTweaks extends GridSorting {
public static final String MOD_ID = "inventorytweaks";
private InvTweaksAPI api = null;
public GridSortingInventoryTweaks() {
try {
api = (InvTweaksAPI) Class.forName("invtweaks.forge.InvTweaksMod", true, Loader.instance().getModClassLoader()).getField("instance").get(null);
} catch (Exception ex) { }
} catch (Exception e) {
// NO OP
}
}
@Override
public int compare(IGridStack o1, IGridStack o2) {
if (api != null && o1 instanceof GridStackItem && o2 instanceof GridStackItem) {
public int compare(IGridStack left, IGridStack right) {
if (api != null && left instanceof GridStackItem && right instanceof GridStackItem) {
if (sortingDirection == NetworkNodeGrid.SORTING_DIRECTION_DESCENDING) {
return api.compareItems(((GridStackItem) o1).getStack(), ((GridStackItem) o2).getStack());
return api.compareItems(((GridStackItem) left).getStack(), ((GridStackItem) right).getStack());
} else if (sortingDirection == NetworkNodeGrid.SORTING_DIRECTION_ASCENDING) {
return api.compareItems(((GridStackItem) o2).getStack(), ((GridStackItem) o1).getStack());
return api.compareItems(((GridStackItem) right).getStack(), ((GridStackItem) left).getStack());
}
}
return 0;
}
}

View File

@@ -4,6 +4,7 @@ import com.raoulvdberge.refinedstorage.api.network.grid.GridType;
import com.raoulvdberge.refinedstorage.api.network.grid.IGrid;
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeGrid;
import com.raoulvdberge.refinedstorage.gui.GuiBase;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSortingInventoryTweaks;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.common.Loader;
@@ -39,7 +40,7 @@ public class SideButtonGridSortingType extends SideButton {
type = IGrid.SORTING_TYPE_ID;
}
} else if (type == IGrid.SORTING_TYPE_ID) {
if (grid.getType() == GridType.FLUID || !Loader.isModLoaded("inventorytweaks")) {
if (grid.getType() == GridType.FLUID || !Loader.isModLoaded(GridSortingInventoryTweaks.MOD_ID)) {
type = IGrid.SORTING_TYPE_QUANTITY;
} else {
type = IGrid.SORTING_TYPE_INVENTORYTWEAKS;

View File

@@ -4,7 +4,7 @@
"name": "Refined Storage",
"description": "An elegant solution to your hoarding problem",
"version": "1.5.15",
"mcversion": "1.12",
"mcversion": "1.12.1",
"url": "https://refinedstorage.raoulvdberge.com",
"updateUrl": "",
"authorList": ["Refined Storage contributors"],