Merge pull request #375 from VolmitSoftware/mc17j16

1.17
This commit is contained in:
Dan 2021-06-17 19:37:30 -08:00 committed by GitHub
commit f4cd9f27e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 94 additions and 66 deletions

View File

@ -10,38 +10,12 @@ def apiVersion = '1.14'
def name = 'Iris' def name = 'Iris'
def main = 'com.volmit.iris.Iris' def main = 'com.volmit.iris.Iris'
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
// ============================================================== // ==============================================================
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins'); registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins');
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins');
// ============================================================== // ==============================================================
configurations {
provided
}
processResources {
filesMatching('**/plugin.yml') {
expand(
'name': name.toString(),
'version': version.toString(),
'main': main.toString(),
'apiversion': apiVersion.toString()
)
}
}
repositories {
mavenCentral()
gradlePluginPortal()
maven {
allowInsecureProtocol true
url "http://archive.arcane.art/repository/arcane/"
}
}
shadowJar {
}
def registerCustomOutputTask(name, path) { def registerCustomOutputTask(name, path) {
tasks.register('build' + name, Copy) { tasks.register('build' + name, Copy) {
group('development') group('development')
@ -55,19 +29,43 @@ def registerCustomOutputTask(name, path) {
} }
} }
processResources {
filesMatching('**/plugin.yml') {
expand(
'name': name.toString(),
'version': version.toString(),
'main': main.toString(),
'apiversion': apiVersion.toString()
)
}
}
repositories {
maven {
allowInsecureProtocol true
url "http://archive.arcane.art/repository/arcane"
}
mavenLocal()
}
dependencies { dependencies {
compileOnly 'org.projectlombok:lombok:1.18.12' compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.12' annotationProcessor 'org.projectlombok:lombok:1.18.20'
// Shade
implementation 'io.timeandspace:smoothie-map:2.0.2' implementation 'io.timeandspace:smoothie-map:2.0.2'
implementation 'com.github.ben-manes.caffeine:caffeine:2.8.5' implementation 'com.github.ben-manes.caffeine:caffeine:2.8.5'
implementation 'org.zeroturnaround:zt-zip:1.14' implementation 'org.zeroturnaround:zt-zip:1.14'
implementation 'org.apache.commons:commons-compress:1.20'
implementation 'io.papermc:paperlib:1.0.5' implementation 'io.papermc:paperlib:1.0.5'
compileClasspath 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileClasspath 'org.bukkit.craftbukkit:1.16.3:1.16.3' // Provided
compileClasspath 'org.bukkit.craftbukkit:1.16.4:1.16.4' implementation 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT'
compileClasspath 'com.bergerkiller.bukkit:BKCommonLib:1.16.4-v2' implementation 'org.bukkit.craftbukkit:1.16.3:1.16.3'
compileClasspath 'com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT' implementation 'org.bukkit.craftbukkit:1.16.4:1.16.4'
compileClasspath 'io.lumine.xikage:MythicMobs:4.9.1' implementation 'org.bukkit.craftbukkit:1.17:1.17'
compileClasspath 'com.google.code.gson:gson:2.8.5' implementation 'com.bergerkiller.bukkit:BKCommonLib:1.16.4-v2'
implementation 'com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT'
implementation 'io.lumine.xikage:MythicMobs:4.9.1'
implementation 'com.google.code.gson:gson:2.8.5'
} }

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -118,6 +118,7 @@ public class IrisEngineCompound implements EngineCompound {
if(rootDimension.getDimensionalComposite().isEmpty()) if(rootDimension.getDimensionalComposite().isEmpty())
{ {
burster = null; burster = null;
// TODO: WARNING HEIGHT
engines = new Engine[]{new IrisEngine(new EngineTarget(world, rootDimension, data, 256, maximumThreads), this, 0)}; engines = new Engine[]{new IrisEngine(new EngineTarget(world, rootDimension, data, 256, maximumThreads), this, 0)};
defaultEngine = engines[0]; defaultEngine = engines[0];
} }
@ -145,6 +146,7 @@ public class IrisEngineCompound implements EngineCompound {
{ {
IrisDimensionIndex index = rootDimension.getDimensionalComposite().get(i); IrisDimensionIndex index = rootDimension.getDimensionalComposite().get(i);
IrisDimension dimension = data.getDimensionLoader().load(index.getDimension()); IrisDimension dimension = data.getDimensionLoader().load(index.getDimension());
// TODO: WARNING HEIGHT
engines[i] = new IrisEngine(new EngineTarget(world, dimension, data.copy(), (int)Math.floor(256D * (index.getWeight() / totalWeight)), index.isInverted(), threadDist), this, i); engines[i] = new IrisEngine(new EngineTarget(world, dimension, data.copy(), (int)Math.floor(256D * (index.getWeight() / totalWeight)), index.isInverted(), threadDist), this, i);
engines[i].setMinHeight(buf); engines[i].setMinHeight(buf);
buf += engines[i].getHeight(); buf += engines[i].getHeight();

View File

@ -135,6 +135,7 @@ public class IrisCaveModifier extends EngineAssignedModifier<BlockData>
return; return;
} }
// TODO: WARNING HEIGHT
int ceiling = -256; int ceiling = -256;
int floor = 512; int floor = 512;

View File

@ -87,6 +87,7 @@ public class IrisDepositModifier extends EngineAssignedModifier<BlockData> {
} }
int i = Math.max(0, k.getMinHeight()); int i = Math.max(0, k.getMinHeight());
// TODO: WARNING HEIGHT
int a = Math.min(height, Math.min(256, k.getMaxHeight())); int a = Math.min(height, Math.min(256, k.getMaxHeight()));
if(i >= a) if(i >= a)

View File

@ -77,6 +77,7 @@ public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
n5 = 1; n5 = 1;
} }
float f6 = 1.0f; float f6 = 1.0f;
// TODO: WARNING HEIGHT
for(int i = 0; i < 256; ++i) for(int i = 0; i < 256; ++i)
{ {
if(i == 0 || random.nextInt(getDimension().getRavineRibRarity()) == 0) if(i == 0 || random.nextInt(getDimension().getRavineRibRarity()) == 0)
@ -153,6 +154,7 @@ public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
{ {
for(int j = n10 + 1; !bl && j >= n9 - 1; --j) for(int j = n10 + 1; !bl && j >= n9 - 1; --j)
{ {
// TODO: WARNING HEIGHT
if(j < 0 || j >= 256) if(j < 0 || j >= 256)
{ {
continue; continue;

View File

@ -62,6 +62,7 @@ public class CommandIrisObjectP1 extends MortarCommand
if(args.length == 1 && args[0].equals("-l")) if(args.length == 1 && args[0].equals("-l"))
{ {
// TODO: WARNING HEIGHT
g[0] = p.getTargetBlock((Set<Material>) null, 256).getLocation().clone(); g[0] = p.getTargetBlock((Set<Material>) null, 256).getLocation().clone();
} }

View File

@ -62,6 +62,7 @@ public class CommandIrisObjectP2 extends MortarCommand
if(args.length == 1 && args[0].equals("-l")) if(args.length == 1 && args[0].equals("-l"))
{ {
// TODO: WARNING HEIGHT
g[1] = p.getTargetBlock((Set<Material>) null, 256).getLocation().clone(); g[1] = p.getTargetBlock((Set<Material>) null, 256).getLocation().clone();
} }

View File

@ -23,16 +23,16 @@ public class IrisBiomeGeneratorLink
@DependsOn({"min", "max"}) @DependsOn({"min", "max"})
@Required @Required
@MinNumber(-256) @MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The min block value (value + fluidHeight)") @Desc("The min block value (value + fluidHeight)")
private int min = 0; private int min = 0;
@DependsOn({"min", "max"}) @DependsOn({"min", "max"})
@Required @Required
@MinNumber(-256) @MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The max block value (value + fluidHeight)") @Desc("The max block value (value + fluidHeight)")
private int max = 0; private int max = 0;

View File

@ -32,14 +32,14 @@ public class IrisBiomePaletteLayer
@DependsOn({"minHeight", "maxHeight"}) @DependsOn({"minHeight", "maxHeight"})
@MinNumber(0) @MinNumber(0)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The min thickness of this layer") @Desc("The min thickness of this layer")
private int minHeight = 1; private int minHeight = 1;
@DependsOn({"minHeight", "maxHeight"}) @DependsOn({"minHeight", "maxHeight"})
@MinNumber(1) @MinNumber(1)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The max thickness of this layer") @Desc("The max thickness of this layer")
private int maxHeight = 1; private int maxHeight = 1;

View File

@ -42,14 +42,14 @@ public class IrisDecorator
@DependsOn({"stackMin", "stackMax"}) @DependsOn({"stackMin", "stackMax"})
@MinNumber(1) @MinNumber(1)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The minimum repeat stack height (setting to 3 would stack 3 of <block> on top of each other") @Desc("The minimum repeat stack height (setting to 3 would stack 3 of <block> on top of each other")
private int stackMin = 1; private int stackMin = 1;
@DependsOn({"stackMin", "stackMax"}) @DependsOn({"stackMin", "stackMax"})
@MinNumber(1) @MinNumber(1)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The maximum repeat stack height") @Desc("The maximum repeat stack height")
private int stackMax = 1; private int stackMax = 1;
@ -74,7 +74,7 @@ public class IrisDecorator
@MinNumber(0) @MinNumber(0)
@MaxNumber(1) @MaxNumber(1)
@DontObfuscate @DontObfuscate
@Desc("The chance for this decorator to decorate at a given X,Y coordinate. This is hit 256 times per chunk (per surface block)") @Desc("The chance for this decorator to decorate at a given X,Y coordinate. This is hit 256 times per chunk (per surface block)") // TODO: WARNING HEIGHT
private double chance = 0.1; private double chance = 0.1;
@Required @Required

View File

@ -19,14 +19,14 @@ public class IrisDepositGenerator
{ {
@Required @Required
@MinNumber(0) @MinNumber(0)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The minimum height this deposit can generate at") @Desc("The minimum height this deposit can generate at")
private int minHeight = 7; private int minHeight = 7;
@Required @Required
@MinNumber(0) @MinNumber(0)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The maximum height this deposit can generate at") @Desc("The maximum height this deposit can generate at")
private int maxHeight = 55; private int maxHeight = 55;

View File

@ -38,7 +38,7 @@ public class IrisFeaturePositional {
private IrisFeature feature; private IrisFeature feature;
private transient AtomicCache<NoiseProvider> provider = new AtomicCache<>(); private transient AtomicCache<NoiseProvider> provider = new AtomicCache<>();
private static double BLOCK = 1D / 256D; private static double BLOCK = 1D / 256D; // TODO: WARNING HEIGHT
public static IrisFeaturePositional read(DataInputStream s) throws IOException public static IrisFeaturePositional read(DataInputStream s) throws IOException
{ {

View File

@ -21,27 +21,27 @@ import lombok.experimental.Accessors;
public class IrisObjectTranslate public class IrisObjectTranslate
{ {
@MinNumber(-128) @MinNumber(-128) // TODO: WARNING HEIGHT
@MaxNumber(128) @MaxNumber(128) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The x shift in blocks") @Desc("The x shift in blocks")
private int x = 0; private int x = 0;
@Required @Required
@MinNumber(-256) @MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The x shift in blocks") @Desc("The x shift in blocks")
private int y = 0; private int y = 0;
@MinNumber(-128) @MinNumber(-128) // TODO: WARNING HEIGHT
@MaxNumber(128) @MaxNumber(128) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))") @Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))")
private int yRandom = 0; private int yRandom = 0;
@MinNumber(-128) @MinNumber(-128) // TODO: WARNING HEIGHT
@MaxNumber(128) @MaxNumber(128) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The x shift in blocks") @Desc("The x shift in blocks")
private int z = 0; private int z = 0;

View File

@ -51,7 +51,7 @@ public class IrisRegion extends IrisRegistrant implements IRare
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>(); private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
@MinNumber(1) @MinNumber(1)
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The rarity of the region") @Desc("The rarity of the region")
private int rarity = 1; private int rarity = 1;

View File

@ -26,16 +26,16 @@ public class IrisShapedGeneratorStyle
private IrisGeneratorStyle generator = new IrisGeneratorStyle(NoiseStyle.IRIS); private IrisGeneratorStyle generator = new IrisGeneratorStyle(NoiseStyle.IRIS);
@Required @Required
@MinNumber(-256) @MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The min block value") @Desc("The min block value")
private int min = 0; private int min = 0;
@Required @Required
@MinNumber(-256) @MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) @MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate @DontObfuscate
@Desc("The max block value") @Desc("The max block value")
private int max = 0; private int max = 0;

View File

@ -79,6 +79,7 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
public void prepareSpawnAsync(long seed, String worldName, World.Environment env, int radius, Consumer<Double> progress, Runnable onComplete) public void prepareSpawnAsync(long seed, String worldName, World.Environment env, int radius, Consumer<Double> progress, Runnable onComplete)
{ {
// TODO: WARNING HEIGHT
prepareSpawnAsync(256, seed, worldName, env, radius, progress, onComplete); prepareSpawnAsync(256, seed, worldName, env, radius, progress, onComplete);
} }
@ -402,6 +403,11 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
writer.setBiome((ox + x), y, oz + z, bio); writer.setBiome((ox + x), y, oz + z, bio);
} }
@Override
public int getMinHeight() {
return w.getMinHeight();
}
@Override @Override
public int getMaxHeight() { public int getMaxHeight() {
return w.getMaxHeight(); return w.getMaxHeight();
@ -674,6 +680,7 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
@Override @Override
public void regenerate(int x, int z) { public void regenerate(int x, int z) {
clearRegeneratedLists(x, z); clearRegeneratedLists(x, z);
int xx = x*16; int xx = x*16;
int zz = z*16; int zz = z*16;
@ -703,9 +710,14 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
} }
@Override
public int getMinHeight() {
return getComposite().getWorld().getMinHeight();
}
@Override @Override
public int getMaxHeight() { public int getMaxHeight() {
return 256; return getComposite().getWorld().getMaxHeight();
} }
@Override @Override

View File

@ -34,6 +34,7 @@ public interface EngineCompound extends Listener, Hotloadable, DataProvider
public default int getHeight() public default int getHeight()
{ {
// TODO: WARNING HEIGHT
return 256; return 256;
} }

View File

@ -26,6 +26,7 @@ public class EngineTarget
this.height = height; this.height = height;
this.dimension = dimension; this.dimension = dimension;
this.data = data; this.data = data;
// TODO: WARNING HEIGHT
this.parallaxWorld = new ParallaxWorld(256, new File(world.getWorldFolder(), "iris/" + dimension.getLoadKey() + "/parallax")); this.parallaxWorld = new ParallaxWorld(256, new File(world.getWorldFolder(), "iris/" + dimension.getLoadKey() + "/parallax"));
this.inverted = inverted; this.inverted = inverted;
this.burster = new MultiBurst(threads); this.burster = new MultiBurst(threads);

View File

@ -28,6 +28,7 @@ public class BiomeGridHunkView implements Hunk<Biome>
@Override @Override
public int getHeight() public int getHeight()
{ {
// TODO: WARNING HEIGHT
return 256; return 256;
} }

View File

@ -393,7 +393,7 @@ public class B
return false; return false;
} }
if(onto.equals(Material.GRASS_PATH)) if(onto.equals(Material.DIRT_PATH))
{ {
if(!mat.isSolid()) if(!mat.isSolid())
{ {

View File

@ -15,7 +15,7 @@ public class IrisBiomeStorage
static static
{ {
e = (int) Math.round(Math.log(16.0) / Math.log(2.0)) - 2; e = (int) Math.round(Math.log(16.0) / Math.log(2.0)) - 2;
f = (int) Math.round(Math.log(256.0) / Math.log(2.0)) - 2; f = (int) Math.round(Math.log(256.0) / Math.log(2.0)) - 2; // TODO: WARNING HEIGHT
a = 1 << IrisBiomeStorage.e + IrisBiomeStorage.e + IrisBiomeStorage.f; a = 1 << IrisBiomeStorage.e + IrisBiomeStorage.e + IrisBiomeStorage.f;
b = (1 << IrisBiomeStorage.e) - 1; b = (1 << IrisBiomeStorage.e) - 1;
c = (1 << IrisBiomeStorage.f) - 1; c = (1 << IrisBiomeStorage.f) - 1;
@ -38,6 +38,7 @@ public class IrisBiomeStorage
public void inject(BiomeGrid grid) public void inject(BiomeGrid grid)
{ {
// TODO: WARNING HEIGHT
for(int i = 0; i < 256; i++) for(int i = 0; i < 256; i++)
{ {
for(int j = 0; j < 16; j++) for(int j = 0; j < 16; j++)

View File

@ -122,6 +122,11 @@ public class LinkedTerrainChunk implements TerrainChunk
biome3D.setBiome(x, y, z, bio); biome3D.setBiome(x, y, z, bio);
} }
@Override
public int getMinHeight() {
return rawChunkData.getMinHeight();
}
@Override @Override
public int getMaxHeight() public int getMaxHeight()
{ {

View File

@ -569,6 +569,7 @@ public class MathHelper
{ {
for(int var02 = 0; var02 < 257; ++var02) for(int var02 = 0; var02 < 257; ++var02)
{ {
// TODO: WARNING HEIGHT
double var1 = (double) var02 / 256.0; double var1 = (double) var02 / 256.0;
double var3 = Math.asin(var1); double var3 = Math.asin(var1);
MathHelper.g[var02] = Math.cos(var3); MathHelper.g[var02] = Math.cos(var3);