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 # Refined Storage Changelog
### 1.5.15 ### 1.5.15
- Updated Forge to 2444 (MC 1.12.1) (raoulvdberge)
- Added InventoryTweaks Grid sorting (cooliojazz)
- Added CTM integration for Disk Manipulator (raoulvdberge) - Added CTM integration for Disk Manipulator (raoulvdberge)
### 1.5.14 ### 1.5.14

View File

@@ -28,10 +28,10 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
minecraft { minecraft {
version = "1.12-14.21.1.2426" version = "1.12.1-14.22.0.2444"
runDir = "run" runDir = "run"
useDepAts = true useDepAts = true
mappings = "snapshot_20170727" mappings = "snapshot_20170807"
} }
repositories { repositories {
@@ -54,8 +54,8 @@ repositories {
} }
dependencies { dependencies {
deobfCompile "mezz.jei:jei_1.12:4.7.2.77:api" deobfCompile "mezz.jei:jei_1.12:4.7.5.84:api"
runtime "mezz.jei:jei_1.12:4.7.2.77" runtime "mezz.jei:jei_1.12:4.7.5.84"
deobfCompile "MCMultiPart2:MCMultiPart:2.2.2" deobfCompile "MCMultiPart2:MCMultiPart:2.2.2"
// deobfCompile "li.cil.oc:OpenComputers:MC1.11.2-1.7.0.28:api" // 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" 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; import net.minecraftforge.fml.common.Loader;
public class GridSortingInventoryTweaks extends GridSorting { public class GridSortingInventoryTweaks extends GridSorting {
public static final String MOD_ID = "inventorytweaks";
private InvTweaksAPI api = null; private InvTweaksAPI api = null;
public GridSortingInventoryTweaks() { public GridSortingInventoryTweaks() {
try { try {
api = (InvTweaksAPI) Class.forName("invtweaks.forge.InvTweaksMod", true, Loader.instance().getModClassLoader()).getField("instance").get(null); api = (InvTweaksAPI) Class.forName("invtweaks.forge.InvTweaksMod", true, Loader.instance().getModClassLoader()).getField("instance").get(null);
} catch (Exception ex) { } } catch (Exception e) {
// NO OP
}
} }
@Override @Override
public int compare(IGridStack o1, IGridStack o2) { public int compare(IGridStack left, IGridStack right) {
if (api != null && o1 instanceof GridStackItem && o2 instanceof GridStackItem) { if (api != null && left instanceof GridStackItem && right instanceof GridStackItem) {
if (sortingDirection == NetworkNodeGrid.SORTING_DIRECTION_DESCENDING) { 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) { } 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; 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.api.network.grid.IGrid;
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeGrid; import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeGrid;
import com.raoulvdberge.refinedstorage.gui.GuiBase; import com.raoulvdberge.refinedstorage.gui.GuiBase;
import com.raoulvdberge.refinedstorage.gui.grid.sorting.GridSortingInventoryTweaks;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Loader;
@@ -39,7 +40,7 @@ public class SideButtonGridSortingType extends SideButton {
type = IGrid.SORTING_TYPE_ID; type = IGrid.SORTING_TYPE_ID;
} }
} else if (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; type = IGrid.SORTING_TYPE_QUANTITY;
} else { } else {
type = IGrid.SORTING_TYPE_INVENTORYTWEAKS; type = IGrid.SORTING_TYPE_INVENTORYTWEAKS;

View File

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