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
private static void day5() { | |
int niceStrings = 0; | |
Pattern patternPairs = Pattern.compile("\\w+?(ab|cd|pq|xy)+\\w+?"); | |
Pattern patternVowels = Pattern.compile("\\w+?(a|e|i|o|u){3,}\\w+?"); | |
Pattern patternDoubles = Pattern.compile("\\w+?(\\w\\w)+\\w+?"); | |
for (String input : inputList) { | |
if (patternVowels.asPredicate().and(patternDoubles.asPredicate().and(patternPairs.asPredicate().negate())).test(input)) niceStrings++; | |
} | |
System.out.println(niceStrings); | |
// System.out.println(inputList.stream().filter(input -> pattern.asPredicate().negate().test(input)).findAny()); |
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
public enum DataKeys | |
{ | |
CHANGE("change", Lists.<String>newArrayList()), | |
OPERATION("operation", OBJState.Operation.SET_TRUE), | |
DEFAULT_OPERATION("defOperation", OBJState.Operation.SET_FALSE), | |
MODIFY_ALL_GROUPS("modifyAll", false); | |
public final String key; | |
public final Object initialValue; | |
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
public static class GroupConfig | |
{ | |
public enum DataKeys | |
{ | |
CHANGE("change", Lists.<String>newArrayList()), | |
OPERATION("operation", OBJState.Operation.SET_TRUE), | |
DEFAULT_OPERATION("defOperation", OBJState.Operation.SET_FALSE), | |
MODIFY_ALL_GROUPS("modifyAll", false); | |
public final String key; |
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
public class OBJCustomData { | |
public enum DataKeys | |
{ | |
AMBIENT_OCCLUSION("ambient", true), | |
GUI_3D("gui3d", true), | |
FLIP_DX11("flipDX11", false), | |
PROCESS_UVS("processUVs", new ProcessUVData()), | |
GROUP_CONFIGURATIONS("groupConfigs", new GroupConfigurations()); | |
public final String key; |
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
"custom": { | |
"processUVs": { | |
"normalize": true, | |
"wrap": { | |
"u": true, | |
"v": false; | |
}, | |
"clamp": ["v"] | |
} | |
} |
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
{ | |
"forge_marker": 1, | |
"defaults": { | |
"textures": {}, | |
"model": "forgedebugmodelloaderregistry:clock.obj", | |
"transform": "forge:default-block", | |
"custom": { | |
"groupConfigs": { | |
"0": { | |
"change": ["OBJ:ALL_EXCEPT", "G"], |
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
public static class GroupConfigHandler | |
{ | |
public Map<String, GroupConfig> configMap = Maps.newHashMap(); | |
public ImmutableList<String> groupNames; | |
private GroupConfigHandler() {} | |
public GroupConfigHandler duplicate() | |
{ | |
GroupConfigHandler ret = new GroupConfigHandler(); |
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
public static class OBJClock extends Block | |
{ | |
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); | |
public static final PropertyBool TWENTY_FOUR = PropertyBool.create("twenty_four"); | |
public static final OBJClock instance = new OBJClock(); | |
public static final String name = "OBJClock"; | |
private ExtendedBlockState state = new ExtendedBlockState(this, new IProperty[] {FACING, TWENTY_FOUR}, new IUnlistedProperty[] {OBJModel.OBJProperty.instance}); | |
// private String[] configNames = new String[] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; | |
// private int config = 0; | |
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
public void preInit() | |
{ | |
OBJLoader.instance.addDomain(MODID.toLowerCase()); | |
ClientRegistry.bindTileEntitySpecialRenderer(OBJClockTileEntity.class, new OBJClockRender()); | |
Item item8 = Item.getItemFromBlock(OBJClock.instance); | |
ModelLoader.setCustomModelResourceLocation(item8, 0, new ModelResourceLocation(MODID.toLowerCase() + ":" + OBJClock.name, "inventory")); | |
OBJClockRender.init(); | |
} |
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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005ab0538a, pid=900, tid=15964 | |
# | |
# JRE version: Java(TM) SE Runtime Environment (8.0_66-b18) (build 1.8.0_66-b18) | |
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.66-b18 mixed mode windows-amd64 compressed oops) | |
# Problematic frame: | |
# V [jvm.dll+0xf538a] | |
# |