mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-16 01:54:40 +00:00
- Refactored code into different packages
- Fixed some non-static expansion methods - Fixed scripts not reloading properly - Implemented mod support build system - Fixed recipe removal breaking on recipes without predefined output - Fixed NPE on parsing a bracket expression that doesn't exist - now prints an appropriate error
This commit is contained in:
1 parent
1789aa74b5
commit
2de467d7d8
93 files changed
+321
-262
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package minetweaker.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import minetweaker.api.item.IItemCondition;
|
||||
import minetweaker.api.item.IItemTransformer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan
|
||||
*/
|
||||
public class ArrayUtil {
|
||||
public static final IItemCondition[] EMPTY_CONDITIONS = new IItemCondition[0];
|
||||
public static final IItemTransformer[] EMPTY_TRANSFORMERS = new IItemTransformer[0];
|
||||
|
||||
public static IItemCondition[] append(IItemCondition[] values, IItemCondition value) {
|
||||
IItemCondition[] result = Arrays.copyOf(values, values.length + 1);
|
||||
result[values.length] = value;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static IItemTransformer[] append(IItemTransformer[] values, IItemTransformer value) {
|
||||
IItemTransformer[] result = Arrays.copyOf(values, values.length + 1);
|
||||
result[values.length] = value;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user