mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 09:24:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95c380a5b1 | ||
|
|
ed7507a58e | ||
|
|
c31e218197 | ||
|
|
5ad71c29c2 | ||
|
|
684d419465 | ||
|
|
c7067c7d72 |
No files matched your search
+3
-3
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("fpgradle-minecraft") version ("0.7.0")
|
||||
id("fpgradle-minecraft") version ("0.7.5")
|
||||
}
|
||||
|
||||
group = "com.falsepattern"
|
||||
@@ -29,7 +29,7 @@ minecraft_fp {
|
||||
}
|
||||
|
||||
publish {
|
||||
changelog = "https://github.com/GTMEGA/EndlessIDs/releases/tag/{version}"
|
||||
changelog = "https://github.com/GTMEGA/EndlessIDs/releases/tag/$version"
|
||||
maven {
|
||||
repoUrl = "https://mvn.falsepattern.com/releases/"
|
||||
repoName = "mavenpattern"
|
||||
@@ -63,7 +63,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
////////////////Our dependencies////////////////
|
||||
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.4.0")
|
||||
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.4.1")
|
||||
implementation("it.unimi.dsi:fastutil:8.5.13")
|
||||
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.5.1")
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -44,7 +44,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
name = Tags.MODNAME,
|
||||
acceptedMinecraftVersions = "[1.7.10]",
|
||||
dependencies = "required-after:chunkapi@[0.5.0,0.6.0);" +
|
||||
"required-after:falsepatternlib@[1.4.0,);" +
|
||||
"required-after:falsepatternlib@[1.4.1,);" +
|
||||
"after:antiidconflict")
|
||||
public class EndlessIDs {
|
||||
public static final byte[] ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER = new byte[0];
|
||||
|
||||
+76
@@ -23,16 +23,31 @@
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.rtg;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.Slice;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import rtg.util.CellNoise;
|
||||
import rtg.util.OpenSimplexNoise;
|
||||
import rtg.world.biome.RTGBiomeProvider;
|
||||
import rtg.world.biome.realistic.RealisticBiomeBase;
|
||||
import rtg.world.gen.ChunkProviderRTG;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@Mixin(value = ChunkProviderRTG.class,
|
||||
remap = false)
|
||||
public abstract class ChunkProviderRTGMixin {
|
||||
@@ -42,6 +57,20 @@ public abstract class ChunkProviderRTGMixin {
|
||||
@Shadow
|
||||
private int[] xyinverted;
|
||||
|
||||
@Shadow private long worldSeed;
|
||||
|
||||
@Shadow private World worldObj;
|
||||
|
||||
@Shadow protected RTGBiomeProvider cmr;
|
||||
|
||||
@Shadow private Random mapRand;
|
||||
|
||||
@Shadow private OpenSimplexNoise simplex;
|
||||
|
||||
@Shadow private CellNoise cell;
|
||||
|
||||
@Shadow private float[] borderNoise;
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
|
||||
@@ -61,4 +90,51 @@ public abstract class ChunkProviderRTGMixin {
|
||||
private void removeUnnecessarySet(Chunk chunk, byte[] bytes) {
|
||||
|
||||
}
|
||||
|
||||
@ModifyConstant(method = "provideChunk",
|
||||
constant = @Constant(intValue = 256,
|
||||
ordinal = 0),
|
||||
slice = @Slice(from = @At(value = "INVOKE",
|
||||
target = "Lrtg/world/gen/ChunkProviderRTG;generateTerrain(Lrtg/world/biome/RTGBiomeProvider;II[Lnet/minecraft/block/Block;[B[Lrtg/world/biome/realistic/RealisticBiomeBase;[F)V",
|
||||
shift = At.Shift.AFTER)),
|
||||
require = 1)
|
||||
private int noDefaultLoop(int constant) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Redirect(method = "provideChunk",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lrtg/world/gen/ChunkProviderRTG;generateTerrain(Lrtg/world/biome/RTGBiomeProvider;II[Lnet/minecraft/block/Block;[B[Lrtg/world/biome/realistic/RealisticBiomeBase;[F)V"),
|
||||
require = 1)
|
||||
private void injectTheFunny(ChunkProviderRTG instance,
|
||||
RTGBiomeProvider cmr,
|
||||
int cx,
|
||||
int cy,
|
||||
Block[] blocks,
|
||||
byte[] metadata,
|
||||
RealisticBiomeBase[] biomes,
|
||||
float[] noise) {
|
||||
instance.generateTerrain(cmr, cx, cy, blocks, metadata, biomes, noise);
|
||||
for (int ci = 0; ci < 256; ci++) {
|
||||
int biomeID = biomes[ci].baseBiome.biomeID;
|
||||
RealisticBiomeBase.getBiome(biomeID).generateMapGen(blocks, metadata, worldSeed, worldObj, cmr, mapRand, cx, cy, simplex, cell, noise);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "<init>",
|
||||
at = @At(value = "RETURN"),
|
||||
require = 1)
|
||||
private void extendBorderNoise(World world, long l, CallbackInfo ci) {
|
||||
this.borderNoise = new float[ExtendedConstants.biomeIDCount];
|
||||
}
|
||||
|
||||
@ModifyConstant(method = "doPopulate",
|
||||
constant = @Constant(intValue = VanillaConstants.biomeIDCount,
|
||||
ordinal = 0),
|
||||
slice = @Slice(from = @At(value = "INVOKE",
|
||||
target = "Lrtg/world/biome/realistic/RealisticBiomeBase;rDecorateClay(Lnet/minecraft/world/World;Ljava/util/Random;IIFII)V")),
|
||||
require = 1)
|
||||
private int allBorderNoise(int constant) {
|
||||
return ExtendedConstants.biomeIDCount;
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2024 FalsePattern
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the words "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.rtg;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
import rtg.world.biome.WorldChunkManagerRTG;
|
||||
|
||||
@Mixin(WorldChunkManagerRTG.class)
|
||||
public abstract class WorldChunkManagerRTGMixin {
|
||||
@ModifyConstant(method = "getRainfall",
|
||||
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
|
||||
require = 2)
|
||||
private int extendBiomes(int constant) {
|
||||
return ExtendedConstants.biomeIDMask;
|
||||
}
|
||||
}
|
||||
@@ -192,6 +192,7 @@ public enum Mixin implements IMixin {
|
||||
//region RTG
|
||||
RTGChunkProviderRTGMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.ChunkProviderRTGMixin"),
|
||||
RTGLandscapeGeneratorMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.LandscapeGeneratorMixin"),
|
||||
RTGWorldChunkManagerRTGMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.WorldChunkManagerRTGMixin"),
|
||||
//endregion RTG
|
||||
//region RWG
|
||||
RWGChunkGeneratorRealisticMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RWG)), "biome.rwg.ChunkGeneratorRealisticMixin"),
|
||||
|
||||
Reference in new issue
Block a user