This file contains 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
Set<Module> goodModules = toImport.stream() | |
.flatMap(n -> n.getChildren().stream()) | |
.flatMap(n -> { | |
Object d = n.getData(); | |
if (d instanceof GradleSourceSetData) { | |
return n.getChildren().stream() | |
.filter(n1 -> n1.getData() instanceof DependencyData) | |
.filter(n1 -> ((DependencyData) n1.getData()).getOwnerModule().getExternalName().contains("main")); | |
} else { | |
return Stream.of(n); |
This file contains 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
/* The following code was generated by JFlex 1.7.0-SNAPSHOT tweaked for IntelliJ platform */ | |
package com.demonwav.mcdev.platform.mcp.cfg; | |
import com.intellij.lexer.*; | |
import com.intellij.psi.tree.IElementType; | |
import static com.demonwav.mcdev.platform.mcp.cfg.psi.CfgTypes.*; | |
import static com.intellij.psi.TokenType.*; | |
This file contains 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
boolean isForge = node.getChildren().stream() | |
.filter(n -> n.getData() instanceof ModuleData) | |
.filter(n -> ((ModuleData) n.getData()).getInternalName().equals(module.getName())) | |
.limit(1) | |
.flatMap(n -> n.getChildren().stream()) | |
.filter(n -> n.getData() instanceof GradleSourceSetData || n.getData() instanceof LibraryDependencyData) | |
.filter(n -> !(n.getData() instanceof GradleSourceSetData) || ((GradleSourceSetData) n.getData()).getId().contains("main")) | |
.filter(n -> ((GradleSourceSetData) n.getData()).getId().contains("main")) | |
.limit(1) |
This file contains 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
boolean isForge = node.getChildren().stream() | |
.filter(n -> n.getData() instanceof ModuleData) | |
.filter(n -> { | |
final String[] array = ((ModuleData) n.getData()).getIdeModuleGroup(); | |
return array != null && array.length != 0 && array[0].equals(module.getName()); | |
}) | |
.limit(1) | |
.flatMap(n -> n.getChildren().stream()) | |
.filter(n -> n.getData() instanceof GradleSourceSetData || n.getData() instanceof LibraryDependencyData) | |
.filter(n -> !(n.getData() instanceof GradleSourceSetData) || ((GradleSourceSetData) n.getData()).getId().contains("main")) |
This file contains 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
boolean isForge = node.getChildren().stream() | |
.filter(n -> n.getData() instanceof ModuleData) | |
.filter(n -> { | |
final String[] array = ((ModuleData) n.getData()).getIdeModuleGroup(); | |
return array != null && array.length != 0 && array[0].equals(module.getName()); | |
}) | |
.limit(1) | |
.flatMap(n -> n.getChildren().stream()) | |
.filter(n -> n.getData() instanceof GradleSourceSetData) | |
.filter(n -> ((GradleSourceSetData) n.getData()).getId().contains("main")) |
This file contains 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
fun getBiomeBaseList(): Array<BiomeType> { | |
return arrayOf( | |
BiomeTypes.BEACH, | |
BiomeTypes.BIRCH_FOREST, | |
BiomeTypes.BIRCH_FOREST_HILLS, | |
BiomeTypes.COLD_BEACH, | |
BiomeTypes.COLD_TAIGA, | |
BiomeTypes.COLD_TAIGA_HILLS, | |
BiomeTypes.DEEP_OCEAN, | |
BiomeTypes.DESERT, |
This file contains 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
static byte[] readFully(InputStream in) throws IOException { | |
// We don't know the final size, and we will only ever iterate over this list | |
LinkedList<Byte> bytes = new LinkedList<Byte>(); | |
// 16kb sounds about right, idk | |
final int SIZE = 16 * 1024; | |
byte[] b = new byte[SIZE]; | |
int read = in.read(b); | |
while (read == SIZE) { | |
for (byte a : b) { |
This file contains 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
[INFO] Replacing /home/demonwav/IdeaProjects/maven/target/maven-1.0-SNAPSHOT.jar with /home/demonwav/IdeaProjects/maven/target/maven-1.0-SNAPSHOT-shaded.jar | |
[INFO] | |
[INFO] --- bukkitstart:1.0-SNAPSHOT:setup-server (default) @ maven --- | |
Loading libraries, please wait... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD SUCCESS | |
[INFO] ------------------- |
This file contains 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
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
name = 'forge' | |
url = 'http://files.minecraftforge.net/maven' | |
} | |
maven { | |
name = 'gradle-plugins' | |
url = 'https://plugins.gradle.org/m2' |
This file contains 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
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
url = 'http://files.minecraftforge.net/maven' | |
} | |
maven { | |
url = 'http://repo.minecrell.net/releases' | |
} | |
} |