mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-20 03:59:38 +00:00
- Added toString to the data values
- Added getPlayer to crafting inventory - Added crafting inventory to recipe function - Removed some print statements - Renamed the global minetweaker variable to tweaker - Bumped forge version to 1121 due to ore dictionary changes - Added bracket handler for ore entries - Enabled withTag(null) - Fixed issues with the new ore dictionary implementation in Forge 1113+ - Fixed bug in Ore recipe conversion - Fixed import errors not being detected and reported properly - Fixed nested NBT tags not being converted properly - Fixed something in any type implementation - Added commas in function name generation - Added class registries for IC2 and NEI integration
This commit is contained in:
1 parent
2de467d7d8
commit
3827eba3e2
39 files changed
+301
-50
No files matched your search
@@ -184,4 +184,9 @@ public class DataBool implements IData {
|
||||
public IData not() {
|
||||
return new DataBool(!value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString();
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,9 @@ public class DataByte implements IData {
|
||||
public IData not() {
|
||||
return new DataByte((byte) (~ value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString() + " as byte";
|
||||
}
|
||||
}
|
||||
@@ -217,4 +217,9 @@ public class DataByteArray implements IData {
|
||||
public <T> T convert(IDataConverter<T> converter) {
|
||||
return converter.fromByteArray(this.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString() + " as byte[]";
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,9 @@ public class DataDouble implements IData {
|
||||
public IData not() {
|
||||
throw new UnsupportedOperationException("Cannot perform bitwise operations on double");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString();
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,9 @@ public class DataFloat implements IData {
|
||||
public IData not() {
|
||||
throw new UnsupportedOperationException("Cannot perform bitwise operations on float");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString() + " as float";
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,9 @@ public class DataInt implements IData {
|
||||
public IData not() {
|
||||
return new DataInt(~ value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString();
|
||||
}
|
||||
}
|
||||
@@ -219,4 +219,9 @@ public class DataIntArray implements IData {
|
||||
public <T> T convert(IDataConverter<T> converter) {
|
||||
return converter.fromIntArray(this.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString() + " as int[]";
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class DataList implements IData {
|
||||
} else {
|
||||
output.append(", ");
|
||||
}
|
||||
output.append(value.asString());
|
||||
output.append(value.toString());
|
||||
}
|
||||
output.append(']');
|
||||
return output.toString();
|
||||
@@ -240,4 +240,9 @@ public class DataList implements IData {
|
||||
public IData not() {
|
||||
throw new UnsupportedOperationException("Lists don't support bitwise operators");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString();
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,9 @@ public class DataLong implements IData {
|
||||
public IData not() {
|
||||
return new DataLong(~ value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString() + " as long";
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class DataMap implements IData {
|
||||
public String asString() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append('{');
|
||||
boolean first = false;
|
||||
boolean first = true;
|
||||
for (Map.Entry<String, IData> entry : data.entrySet()) {
|
||||
if (first) {
|
||||
first = false;
|
||||
@@ -142,7 +142,7 @@ public class DataMap implements IData {
|
||||
}
|
||||
result.append(entry.getKey());
|
||||
result.append(": ");
|
||||
result.append(entry.getValue().asString());
|
||||
result.append(entry.getValue().toString());
|
||||
}
|
||||
result.append('}');
|
||||
return result.toString();
|
||||
@@ -207,7 +207,7 @@ public class DataMap implements IData {
|
||||
for (Map.Entry<String, IData> dataEntry : dataMap.entrySet()) {
|
||||
if (!this.data.containsKey(dataEntry.getKey())) {
|
||||
return false;
|
||||
} else if (!this.data.get(dataEntry.getKey()).contains(data)) {
|
||||
} else if (!this.data.get(dataEntry.getKey()).contains(dataEntry.getValue())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -269,4 +269,9 @@ public class DataMap implements IData {
|
||||
public <T> T convert(IDataConverter<T> converter) {
|
||||
return converter.fromMap(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString();
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,9 @@ public class DataShort implements IData {
|
||||
public IData not() {
|
||||
return new DataShort((short) (~ value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return asString() + " as short";
|
||||
}
|
||||
}
|
||||
@@ -188,4 +188,9 @@ public class DataString implements IData {
|
||||
public IData not() {
|
||||
throw new UnsupportedOperationException("Cannot perform bitwise arithmetic on a string");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return '\"' + value.replace("\"", "\\\"") + "\"";
|
||||
}
|
||||
}
|
||||
@@ -120,4 +120,7 @@ public interface IData {
|
||||
public IData update(IData data);
|
||||
|
||||
public <T> T convert(IDataConverter<T> converter);
|
||||
|
||||
@Override
|
||||
public String toString();
|
||||
}
|
||||
Reference in new issue
Block a user