mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -6,98 +6,76 @@ import java.util.ArrayList;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import tconstruct.TConstruct;
|
||||
|
||||
public class DimensionBlacklist
|
||||
{
|
||||
public class DimensionBlacklist {
|
||||
public static ArrayList<Integer> blacklistedDims = new ArrayList<Integer>();
|
||||
public static ArrayList<Integer> noPoolDims = new ArrayList<Integer>();
|
||||
|
||||
public static int promisedLandDimensionID = -100;
|
||||
public static int twilightForestDimensionID = -100;
|
||||
|
||||
public static void getBadBimensions ()
|
||||
{
|
||||
public static void getBadBimensions() {
|
||||
updateModDimIDs();
|
||||
|
||||
blacklistedDims.add(1);
|
||||
if (twilightForestDimensionID != -100)
|
||||
{
|
||||
if (twilightForestDimensionID != -100) {
|
||||
blacklistedDims.add(twilightForestDimensionID);
|
||||
}
|
||||
if (PHConstruct.cfgDimBlackList.length > 0)
|
||||
{
|
||||
for (int numdim = 0; numdim < PHConstruct.cfgDimBlackList.length; numdim++)
|
||||
{
|
||||
if (PHConstruct.cfgDimBlackList.length > 0) {
|
||||
for (int numdim = 0; numdim < PHConstruct.cfgDimBlackList.length; numdim++) {
|
||||
blacklistedDims.add(PHConstruct.cfgDimBlackList[numdim]);
|
||||
}
|
||||
}
|
||||
if (promisedLandDimensionID != -100)
|
||||
{
|
||||
if (promisedLandDimensionID != -100) {
|
||||
noPoolDims.add(promisedLandDimensionID);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDimInBlacklist (int dim)
|
||||
{
|
||||
if (dim < 0)
|
||||
return false;
|
||||
if (dim == 0)
|
||||
return PHConstruct.slimeIslGenDim0;
|
||||
if (PHConstruct.slimeIslGenDim0Only)
|
||||
{
|
||||
public static boolean isDimInBlacklist(int dim) {
|
||||
if (dim < 0) return false;
|
||||
if (dim == 0) return PHConstruct.slimeIslGenDim0;
|
||||
if (PHConstruct.slimeIslGenDim0Only) {
|
||||
return false;
|
||||
}
|
||||
for (int len = 0; len < blacklistedDims.size(); len++)
|
||||
{
|
||||
if (blacklistedDims.get(len) == dim)
|
||||
return false;
|
||||
for (int len = 0; len < blacklistedDims.size(); len++) {
|
||||
if (blacklistedDims.get(len) == dim) return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public static boolean isDimNoPool (int dim)
|
||||
{
|
||||
public static boolean isDimNoPool(int dim) {
|
||||
return noPoolDims.contains(dim);
|
||||
}
|
||||
|
||||
private static void updateModDimIDs ()
|
||||
{
|
||||
private static void updateModDimIDs() {
|
||||
updateTwiForestID();
|
||||
updateBoPID();
|
||||
}
|
||||
|
||||
private static void updateTwiForestID ()
|
||||
{
|
||||
private static void updateTwiForestID() {
|
||||
String location = Loader.instance().getConfigDir().getPath();
|
||||
File newFile = new File(location + File.separator + "TwilightForest.cfg");
|
||||
if (newFile.exists())
|
||||
{
|
||||
if (newFile.exists()) {
|
||||
Configuration config = new Configuration(newFile);
|
||||
|
||||
config.load();
|
||||
|
||||
twilightForestDimensionID = config.get("dimension", "dimensionID", -100).getInt();
|
||||
twilightForestDimensionID =
|
||||
config.get("dimension", "dimensionID", -100).getInt();
|
||||
TConstruct.logger.trace("Twilight Forest Dim ID: " + twilightForestDimensionID);
|
||||
}
|
||||
else
|
||||
twilightForestDimensionID = -100;
|
||||
} else twilightForestDimensionID = -100;
|
||||
}
|
||||
|
||||
private static void updateBoPID ()
|
||||
{
|
||||
private static void updateBoPID() {
|
||||
String location = Loader.instance().getConfigDir().getPath();
|
||||
File newFile = new File(location + File.separator + "biomesoplenty" + File.separator + "ids.cfg");
|
||||
if (newFile.exists())
|
||||
{
|
||||
if (newFile.exists()) {
|
||||
Configuration config = new Configuration(newFile);
|
||||
|
||||
config.load();
|
||||
|
||||
promisedLandDimensionID = config.get("dimension settings", "Promised Land Dimension ID", -200).getInt();
|
||||
promisedLandDimensionID = config.get("dimension settings", "Promised Land Dimension ID", -200)
|
||||
.getInt();
|
||||
TConstruct.logger.trace("Promised Lands Dim ID: " + promisedLandDimensionID);
|
||||
}
|
||||
else
|
||||
promisedLandDimensionID = -100;
|
||||
} else promisedLandDimensionID = -100;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user