This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.collect.Iterators; | |
import java.util.*; | |
/** | |
* @author youyihj | |
*/ | |
public class NullableKeyMap<K, V> extends AbstractMap<K, V> { | |
private final Map<K, V> delegate; | |
private final Object lock = new Object(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crafttweaker.api.data.MapData; | |
import crafttweaker.api.data.IData; | |
import crafttweaker.api.item.MCItemDefinition; | |
import crafttweaker.api.item.IItemStack; | |
import crafttweaker.api.tag.MCTagWithAmount; | |
public function toDataWithCountItem(stack as IItemStack) as MapData { | |
val data = stack as MapData; | |
data.put("count", stack.amount); | |
return data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scripts.TestClass.TestClass; | |
import scripts.TestClass.getTestClass; | |
function func(testArray as TestClass[]) as int { | |
for test in testArray { | |
print(test.getNum()); | |
} | |
return 0; | |
} |