From 63f924e89e0306f2447402accdea4fc4a7a9de8f Mon Sep 17 00:00:00 2001 From: dags- Date: Fri, 26 Jun 2020 19:12:07 +0100 Subject: [PATCH] update forge & mappings --- FeatureManager | 2 +- gradle.properties | 4 +- .../biome/provider/AbstractBiomeProvider.java | 54 ------------------- .../biome/provider/TerraBiomeProvider.java | 8 +-- .../mod/chunk/TerraChunkGenerator.java | 2 +- .../mod/chunk/fix/RegionDelegate.java | 44 +++++++-------- .../chunk/generator/StructureGenerator.java | 4 +- 7 files changed, 33 insertions(+), 85 deletions(-) delete mode 100644 src/main/java/com/terraforged/mod/biome/provider/AbstractBiomeProvider.java diff --git a/FeatureManager b/FeatureManager index 6e6eb97..1052697 160000 --- a/FeatureManager +++ b/FeatureManager @@ -1 +1 @@ -Subproject commit 6e6eb97330b0df37dd868601c06577f727aec331 +Subproject commit 1052697e7d938e30593511d472a8381e677105b5 diff --git a/gradle.properties b/gradle.properties index 18441d0..aaa9637 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ mod_version=0.1.0-BETA mc_version=1.15.2 -forge_version=31.1.77 +forge_version=31.2.27 mcp_channel=snapshot -mcp_version=20200225-1.15.1 +mcp_version=20200514-1.15.1 org.gradle.jvmargs=-Xmx4G org.gradle.daemon=false \ No newline at end of file diff --git a/src/main/java/com/terraforged/mod/biome/provider/AbstractBiomeProvider.java b/src/main/java/com/terraforged/mod/biome/provider/AbstractBiomeProvider.java deleted file mode 100644 index a431457..0000000 --- a/src/main/java/com/terraforged/mod/biome/provider/AbstractBiomeProvider.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * MIT License - * - * Copyright (c) 2020 TerraForged - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package com.terraforged.mod.biome.provider; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.biome.Biome; - -import java.util.List; -import java.util.Random; -import java.util.Set; - -public abstract class AbstractBiomeProvider extends net.minecraft.world.biome.provider.BiomeProvider { - - public AbstractBiomeProvider() { - super(BiomeHelper.getAllBiomes()); - } - - @Override - public final Set func_225530_a_(int x, int y, int z, int size) { - return getBiomesInSquare(x, y, z, size); - } - - @Override - public final BlockPos func_225531_a_(int centerX, int centerY, int centerZ, int range, List biomes, Random random) { - return findBiomePosition(centerX, centerY, centerZ, range, biomes, random); - } - - public abstract Set getBiomesInSquare(int x, int y, int z, int size); - - public abstract BlockPos findBiomePosition(int centerX, int centerY, int centerZ, int range, List biomes, Random random); -} diff --git a/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeProvider.java b/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeProvider.java index 8886ded..48e6fc0 100644 --- a/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeProvider.java +++ b/src/main/java/com/terraforged/mod/biome/provider/TerraBiomeProvider.java @@ -38,6 +38,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeManager; import net.minecraft.world.biome.ColumnFuzzedBiomeMagnifier; +import net.minecraft.world.biome.provider.BiomeProvider; import java.util.Collections; import java.util.HashMap; @@ -46,7 +47,7 @@ import java.util.Map; import java.util.Random; import java.util.Set; -public class TerraBiomeProvider extends AbstractBiomeProvider { +public class TerraBiomeProvider extends BiomeProvider { private final long seed; private final BiomeMap biomeMap; @@ -56,6 +57,7 @@ public class TerraBiomeProvider extends AbstractBiomeProvider { private final Map> decorators = new HashMap<>(); public TerraBiomeProvider(TerraContext context) { + super(BiomeHelper.getAllBiomes()); this.context = context; this.seed = context.terraSettings.world.seed; this.biomeMap = BiomeHelper.createBiomeMap(); @@ -77,7 +79,7 @@ public class TerraBiomeProvider extends AbstractBiomeProvider { } @Override - public Set getBiomesInSquare(int centerX, int centerY, int centerZ, int radius) { + public Set getBiomes(int centerX, int centerY, int centerZ, int radius) { int minX = centerX - radius >> 2; int minZ = centerZ - radius >> 2; int maxX = centerX + radius >> 2; @@ -100,7 +102,7 @@ public class TerraBiomeProvider extends AbstractBiomeProvider { } @Override - public BlockPos findBiomePosition(int centerX, int centerY, int centerZ, int range, List biomes, Random random) { + public BlockPos func_225531_a_(int centerX, int centerY, int centerZ, int range, List biomes, Random random) { int minX = centerX - range >> 2; int minZ = centerZ - range >> 2; int maxX = centerX + range >> 2; diff --git a/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java b/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java index 2f3cffe..1436c0a 100644 --- a/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java +++ b/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java @@ -139,7 +139,7 @@ public class TerraChunkGenerator extends ChunkGenerator { } @Override - public final void func_225551_a_(WorldGenRegion world, IChunk chunk) { + public final void generateSurface(WorldGenRegion world, IChunk chunk) { surfaceGenerator.generateSurface(world, chunk); } diff --git a/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java b/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java index 77351f2..d373d53 100644 --- a/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java +++ b/src/main/java/com/terraforged/mod/chunk/fix/RegionDelegate.java @@ -129,8 +129,8 @@ public class RegionDelegate extends WorldGenRegion { } @Override - public boolean func_225521_a_(BlockPos pos, boolean drop, @Nullable Entity entity) { - return region.func_225521_a_(pos, drop, entity); + public boolean destroyBlock(BlockPos p_225521_1_, boolean p_225521_2_, @Nullable Entity p_225521_3_) { + return region.destroyBlock(p_225521_1_, p_225521_2_, p_225521_3_); } @Override @@ -308,8 +308,8 @@ public class RegionDelegate extends WorldGenRegion { } @Override - public List func_225316_b(Class p_225316_1_, AxisAlignedBB p_225316_2_, @Nullable Predicate p_225316_3_) { - return region.func_225316_b(p_225316_1_, p_225316_2_, p_225316_3_); + public List getLoadedEntitiesWithinAABB(Class p_225316_1_, AxisAlignedBB p_225316_2_, @Nullable Predicate p_225316_3_) { + return region.getLoadedEntitiesWithinAABB(p_225316_1_, p_225316_2_, p_225316_3_); } @Override @@ -323,8 +323,8 @@ public class RegionDelegate extends WorldGenRegion { } @Override - public List func_225317_b(Class p_225317_1_, AxisAlignedBB p_225317_2_) { - return region.func_225317_b(p_225317_1_, p_225317_2_); + public List getLoadedEntitiesWithinAABB(Class p_225317_1_, AxisAlignedBB p_225317_2_) { + return region.getLoadedEntitiesWithinAABB(p_225317_1_, p_225317_2_); } @Override @@ -451,8 +451,8 @@ public class RegionDelegate extends WorldGenRegion { @Override @Nullable - public IBlockReader getBlockReader(int p_225522_1_, int p_225522_2_) { - return region.getBlockReader(p_225522_1_, p_225522_2_); + public IBlockReader getBlockReader(int chunkX, int chunkZ) { + return region.getBlockReader(chunkX, chunkZ); } @Override @@ -545,38 +545,38 @@ public class RegionDelegate extends WorldGenRegion { } @Override - public boolean func_226669_j_(Entity entity) { - return region.func_226669_j_(entity); + public boolean checkNoEntityCollision(Entity p_226668_1_) { + return region.checkNoEntityCollision(p_226668_1_); } @Override - public boolean func_226664_a_(AxisAlignedBB bounds) { - return region.func_226664_a_(bounds); + public boolean hasNoCollisions(AxisAlignedBB p_226664_1_) { + return region.hasNoCollisions(p_226664_1_); } @Override - public boolean func_226668_i_(Entity entity) { - return region.func_226668_i_(entity); + public boolean hasNoCollisions(Entity p_226669_1_) { + return region.hasNoCollisions(p_226669_1_); } @Override - public boolean func_226665_a__(Entity entity, AxisAlignedBB bounds) { - return region.func_226665_a__(entity, bounds); + public boolean hasNoCollisions(Entity p_226665_1_, AxisAlignedBB p_226665_2_) { + return region.hasNoCollisions(p_226665_1_, p_226665_2_); } @Override - public boolean func_226662_a_(@Nullable Entity entity, AxisAlignedBB bounds, Set set) { - return region.func_226662_a_(entity, bounds, set); + public boolean hasNoCollisions(@Nullable Entity p_226662_1_, AxisAlignedBB p_226662_2_, Set p_226662_3_) { + return region.hasNoCollisions(p_226662_1_, p_226662_2_, p_226662_3_); } @Override - public Stream func_226667_c_(@Nullable Entity entity, AxisAlignedBB bounds, Set entities) { - return region.func_226667_c_(entity, bounds, entities); + public Stream getCollisionShapes(@Nullable Entity p_226667_1_, AxisAlignedBB p_226667_2_, Set p_226667_3_) { + return region.getCollisionShapes(p_226667_1_, p_226667_2_, p_226667_3_); } @Override - public Stream func_226666_b_(@Nullable Entity entity, AxisAlignedBB bounds) { - return region.func_226666_b_(entity, bounds); + public Stream getCollisionShapes(@Nullable Entity p_226666_1_, AxisAlignedBB p_226666_2_) { + return region.getCollisionShapes(p_226666_1_, p_226666_2_); } @Override diff --git a/src/main/java/com/terraforged/mod/chunk/generator/StructureGenerator.java b/src/main/java/com/terraforged/mod/chunk/generator/StructureGenerator.java index ae66be6..7cae36a 100644 --- a/src/main/java/com/terraforged/mod/chunk/generator/StructureGenerator.java +++ b/src/main/java/com/terraforged/mod/chunk/generator/StructureGenerator.java @@ -42,12 +42,12 @@ public class StructureGenerator implements Generator.Structures { } StructureStart existingStart = chunk.getStructureStart(structure.getStructureName()); - int refCount = existingStart != null ? existingStart.func_227457_j_() : 0; + int refCount = existingStart != null ? existingStart.getRefCount() : 0; SharedSeedRandom random = new SharedSeedRandom(); StructureStart start = StructureStart.DUMMY; - if (structure.func_225558_a_(biomes, generator, random, chunkpos.x, chunkpos.z, biome)) { + if (structure.canBeGenerated(biomes, generator, random, chunkpos.x, chunkpos.z, biome)) { StructureStart altStart = structure.getStartFactory().create(structure, chunkpos.x, chunkpos.z, MutableBoundingBox.getNewBoundingBox(), refCount, generator.getSeed()); altStart.init(generator, templates, chunkpos.x, chunkpos.z, biome); start = altStart.isValid() ? altStart : StructureStart.DUMMY;