Skip to content

Commit 7528f34

Browse files
committed
Finish Admin Teleport
1 parent 4c5c887 commit 7528f34

25 files changed

+748
-168
lines changed

build.gradle

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ buildscript {
1313
plugins {
1414
id 'java'
1515
id 'eclipse'
16+
id 'org.ajoberstar.grgit' version '3.1.1'
1617
}
1718

1819
apply plugin: 'net.minecraftforge.gradle.forge'
@@ -49,11 +50,10 @@ repositories {
4950
}
5051
}
5152
mavenCentral()
52-
removeIf { it.url.host == 'files.minecraftforge.net' }
53+
mavenLocal()
5354
maven { url 'https://jitpack.io' }
5455
maven { url "https://maven.minecraftforge.net/" }
5556
maven { url "https://www.cursemaven.com" }
56-
maven { url "https://maven.mjrlegends.com/" }
5757
maven { url "http://dvs1.progwml6.com/files/maven" }
5858
maven { url "http://maven.ic2.player.to" }
5959
maven { url "https://blamejared.com/maven" }
@@ -76,23 +76,19 @@ dependencies {
7676
testCompileOnly 'org.projectlombok:lombok:1.18.20'
7777
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
7878

79-
compile("com.mjr.extraplanets:ExtraPlanets:1.12.2-0.7.2:dev") {
80-
exclude module: 'jei_1.12.2'
81-
}
79+
compile "com.mjr.extraplanets:ExtraPlanets:1.12.2-0.7.3:dev"
8280

8381
compile "mezz.jei:jei_${mc_version}:4.16.1.302:api"
8482
runtime "mezz.jei:jei_${mc_version}:4.16.1.302"
8583

86-
runtime "com.mjr.mjrlegendslib:MJRLegendsLib:1.12.2-1.2.0"
84+
runtime "com.mjr.mjrlegendslib:MJRLegendsLib:1.12.2-1.2.1"
8785
runtime "net.industrial-craft:industrialcraft-2:2.8.99-ex112:api"
8886

8987
compile "curse.maven:asmodeuscore-0.0.25-303101:3231302"
9088
compile "curse.maven:galaxyspace-2.0.16-238770:3235468"
9189
compile "curse.maven:zollerngalaxy-2.0.23-241940:3187752"
9290
compile "curse.maven:moreplanets-2.2.1_280-261990:3165054"
9391
runtime "curse.maven:stevekunglib-1.1.9-296019:3051420"
94-
95-
deobfCompile "vazkii.patchouli:Patchouli:${patchouli_version}"
9692
}
9793

9894
minecraft {
@@ -163,4 +159,12 @@ if (JavaVersion.current().isJava8Compatible()) {
163159
}
164160
}
165161

162+
import org.ajoberstar.grgit.Tag
163+
164+
tasks.register('getChangelog') {
165+
doLast {
166+
println getGitChangelog()
167+
}
168+
}
169+
166170
build.dependsOn signJar

gradle/git2md_changelog.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
def getGitChangelog() {
22
try {
33
def stdout = new ByteArrayOutputStream()
4-
def gitHash = System.getenv('GIT_COMMIT')
5-
def gitPrevHash = System.getenv('GIT_PREVIOUS_COMMIT')
4+
def gitHash = grgit.head().abbreviatedId
5+
def gitPrevHash = grgit.tag.list().reverse()[0].commit.id
66
if(gitHash && gitPrevHash) {
77
exec {
88
commandLine 'git', 'log', '--pretty=tformat:- %s - %aN', '' + gitPrevHash + '...' + gitHash
Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package net.romvoid95.api;
22

3-
import java.util.stream.Stream;
3+
import java.util.List;
4+
import java.util.Optional;
45

56
import net.minecraftforge.fml.common.Loader;
67
import net.minecraftforge.fml.common.ModContainer;
8+
import net.romvoid95.api.versioning.Version;
79

810
public enum GalacticraftAddon {
911

@@ -14,68 +16,91 @@ public enum GalacticraftAddon {
1416
MOREPLANETS("moreplanets", "More Planets", RequiredLib.STEVEKUNGSLIB),
1517
PLANETPROGRESSION("planetprogression", "Planet Progression", RequiredLib.MJRLEGENDSLIB),
1618
ZOLLERNGALAXY("zollerngalaxy", "Zollern Galaxy", RequiredLib.NONE);
17-
18-
private final String modId;
19-
private final String displayName;
20-
private final RequiredLib requiredLib;
21-
private final boolean isLoaded;
22-
private final Stream<ModContainer> stream = Loader.instance().getModList().stream();
23-
24-
GalacticraftAddon(String modId, String displayName, RequiredLib requiredLib) {
19+
20+
private final String modId;
21+
private final String displayName;
22+
private final RequiredLib requiredLib;
23+
private final boolean isLoaded;
24+
private final List<ModContainer> list = Loader.instance().getModList();
25+
private final Optional<ModContainer> modContainer;
26+
27+
GalacticraftAddon(String modId, String displayName, RequiredLib requiredLib) {
2528
this.modId = modId;
2629
this.displayName = displayName;
2730
this.requiredLib = requiredLib;
28-
this.isLoaded = stream.anyMatch(modContainer -> modContainer.getModId().equals(this.modId));
31+
this.isLoaded = list.stream().anyMatch(modContainer -> modContainer.getModId().equals(this.modId));
32+
this.modContainer = list.stream().filter(m -> m.getModId().equals(this.modId)).findFirst();
2933
}
3034

3135
public String modId() {
36+
3237
return modId;
3338
}
34-
39+
3540
public String displayName() {
3641
return displayName;
3742
}
38-
43+
3944
public boolean isLoaded() {
4045
return isLoaded;
4146
}
42-
47+
48+
public Version getVersion() {
49+
if(modContainer.isPresent()) {
50+
return new Version(modContainer.get().getVersion());
51+
}
52+
return null;
53+
}
54+
4355
public RequiredLib getLibMod() {
4456
return requiredLib;
4557
}
46-
58+
4759
public String getLibModId() {
4860
return requiredLib.modId();
4961
}
50-
62+
5163
public boolean isLibModLoaded() {
5264
return requiredLib.equals(RequiredLib.NONE) ? false : requiredLib.isLoaded();
5365
}
5466

67+
public Version getLibModVersion() {
68+
if(requiredLib.getLibMod().isPresent()) {
69+
return new Version(requiredLib.getLibMod().get().getVersion());
70+
}
71+
return null;
72+
}
73+
5574
private enum RequiredLib {
56-
75+
5776
NONE("none"),
5877
ASMODEUSCORE("asmodeuscore"),
5978
MJRLEGENDSLIB("mjrlegendslib"),
6079
STEVEKUNGSLIB("stevekung's_lib"),
6180
// Only used for MorePlanetsExtraMod
6281
MOREPLANETS("moreplanets");
6382

64-
private final String modId;
65-
private final boolean isLoaded;
66-
private final Stream<ModContainer> stream = Loader.instance().getModList().stream();
83+
private final String modId;
84+
private final boolean isLoaded;
85+
private final List<ModContainer> list = Loader.instance().getModList();
86+
private final Optional<ModContainer> modContainer;
6787

6888
RequiredLib(String modId) {
6989
this.modId = modId;
70-
this.isLoaded = stream.anyMatch(modContainer -> modContainer.getModId().equals(this.modId));
90+
this.isLoaded = list.stream().anyMatch(modContainer -> modContainer.getModId().equals(this.modId));
91+
this.modContainer = list.stream().filter(m -> m.getModId().equals(this.modId)).findFirst();
7192
}
7293

7394
public String modId() {
7495
return modId;
7596
}
76-
97+
7798
public boolean isLoaded() {
7899
return isLoaded;
79100
}
101+
102+
public Optional<ModContainer> getLibMod() {
103+
return modContainer;
104+
}
80105
}
81106
}

src/main/java/net/romvoid95/api/feature/Feature.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import java.util.ArrayList;
44
import java.util.List;
5-
import java.util.function.Supplier;
65

76
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
87
import net.romvoid95.api.config.def.Category;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package net.romvoid95.api.world.data;
2+
3+
import java.util.List;
4+
5+
import javax.annotation.Nonnull;
6+
7+
import net.minecraft.block.state.IBlockState;
8+
import net.minecraft.entity.Entity;
9+
import net.minecraft.item.ItemStack;
10+
import net.minecraft.tileentity.TileEntity;
11+
import net.minecraft.util.math.BlockPos;
12+
13+
public interface ISchematic {
14+
15+
IBlockState getBlockState(BlockPos pos);
16+
17+
boolean setBlockState(BlockPos pos, IBlockState blockState);
18+
19+
TileEntity getTileEntity(BlockPos pos);
20+
21+
List<TileEntity> getTileEntities();
22+
23+
void setTileEntity(BlockPos pos, TileEntity tileEntity);
24+
25+
void removeTileEntity(BlockPos pos);
26+
27+
List<Entity> getEntities();
28+
29+
void addEntity(Entity entity);
30+
31+
void removeEntity(Entity entity);
32+
33+
ItemStack getIcon();
34+
35+
void setIcon(ItemStack icon);
36+
37+
int getWidth();
38+
39+
int getLength();
40+
41+
int getHeight();
42+
43+
@Nonnull
44+
String getAuthor();
45+
46+
void setAuthor(@Nonnull String author);
47+
}

0 commit comments

Comments
 (0)