update forge & mappings

This commit is contained in:
dags- 2020-06-26 19:12:07 +01:00
parent 55c185af33
commit 63f924e89e
7 changed files with 33 additions and 85 deletions

@ -1 +1 @@
Subproject commit 6e6eb97330b0df37dd868601c06577f727aec331 Subproject commit 1052697e7d938e30593511d472a8381e677105b5

View File

@ -1,7 +1,7 @@
mod_version=0.1.0-BETA mod_version=0.1.0-BETA
mc_version=1.15.2 mc_version=1.15.2
forge_version=31.1.77 forge_version=31.2.27
mcp_channel=snapshot mcp_channel=snapshot
mcp_version=20200225-1.15.1 mcp_version=20200514-1.15.1
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx4G
org.gradle.daemon=false org.gradle.daemon=false

View File

@ -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<Biome> 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<Biome> biomes, Random random) {
return findBiomePosition(centerX, centerY, centerZ, range, biomes, random);
}
public abstract Set<Biome> getBiomesInSquare(int x, int y, int z, int size);
public abstract BlockPos findBiomePosition(int centerX, int centerY, int centerZ, int range, List<Biome> biomes, Random random);
}

View File

@ -38,6 +38,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeManager; import net.minecraft.world.biome.BiomeManager;
import net.minecraft.world.biome.ColumnFuzzedBiomeMagnifier; import net.minecraft.world.biome.ColumnFuzzedBiomeMagnifier;
import net.minecraft.world.biome.provider.BiomeProvider;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
@ -46,7 +47,7 @@ import java.util.Map;
import java.util.Random; import java.util.Random;
import java.util.Set; import java.util.Set;
public class TerraBiomeProvider extends AbstractBiomeProvider { public class TerraBiomeProvider extends BiomeProvider {
private final long seed; private final long seed;
private final BiomeMap biomeMap; private final BiomeMap biomeMap;
@ -56,6 +57,7 @@ public class TerraBiomeProvider extends AbstractBiomeProvider {
private final Map<Biome, List<Decorator>> decorators = new HashMap<>(); private final Map<Biome, List<Decorator>> decorators = new HashMap<>();
public TerraBiomeProvider(TerraContext context) { public TerraBiomeProvider(TerraContext context) {
super(BiomeHelper.getAllBiomes());
this.context = context; this.context = context;
this.seed = context.terraSettings.world.seed; this.seed = context.terraSettings.world.seed;
this.biomeMap = BiomeHelper.createBiomeMap(); this.biomeMap = BiomeHelper.createBiomeMap();
@ -77,7 +79,7 @@ public class TerraBiomeProvider extends AbstractBiomeProvider {
} }
@Override @Override
public Set<Biome> getBiomesInSquare(int centerX, int centerY, int centerZ, int radius) { public Set<Biome> getBiomes(int centerX, int centerY, int centerZ, int radius) {
int minX = centerX - radius >> 2; int minX = centerX - radius >> 2;
int minZ = centerZ - radius >> 2; int minZ = centerZ - radius >> 2;
int maxX = centerX + radius >> 2; int maxX = centerX + radius >> 2;
@ -100,7 +102,7 @@ public class TerraBiomeProvider extends AbstractBiomeProvider {
} }
@Override @Override
public BlockPos findBiomePosition(int centerX, int centerY, int centerZ, int range, List<Biome> biomes, Random random) { public BlockPos func_225531_a_(int centerX, int centerY, int centerZ, int range, List<Biome> biomes, Random random) {
int minX = centerX - range >> 2; int minX = centerX - range >> 2;
int minZ = centerZ - range >> 2; int minZ = centerZ - range >> 2;
int maxX = centerX + range >> 2; int maxX = centerX + range >> 2;

View File

@ -139,7 +139,7 @@ public class TerraChunkGenerator extends ChunkGenerator<GenerationSettings> {
} }
@Override @Override
public final void func_225551_a_(WorldGenRegion world, IChunk chunk) { public final void generateSurface(WorldGenRegion world, IChunk chunk) {
surfaceGenerator.generateSurface(world, chunk); surfaceGenerator.generateSurface(world, chunk);
} }

View File

@ -129,8 +129,8 @@ public class RegionDelegate extends WorldGenRegion {
} }
@Override @Override
public boolean func_225521_a_(BlockPos pos, boolean drop, @Nullable Entity entity) { public boolean destroyBlock(BlockPos p_225521_1_, boolean p_225521_2_, @Nullable Entity p_225521_3_) {
return region.func_225521_a_(pos, drop, entity); return region.destroyBlock(p_225521_1_, p_225521_2_, p_225521_3_);
} }
@Override @Override
@ -308,8 +308,8 @@ public class RegionDelegate extends WorldGenRegion {
} }
@Override @Override
public <T extends Entity> List<T> func_225316_b(Class<? extends T> p_225316_1_, AxisAlignedBB p_225316_2_, @Nullable Predicate<? super T> p_225316_3_) { public <T extends Entity> List<T> getLoadedEntitiesWithinAABB(Class<? extends T> p_225316_1_, AxisAlignedBB p_225316_2_, @Nullable Predicate<? super T> p_225316_3_) {
return region.func_225316_b(p_225316_1_, p_225316_2_, p_225316_3_); return region.getLoadedEntitiesWithinAABB(p_225316_1_, p_225316_2_, p_225316_3_);
} }
@Override @Override
@ -323,8 +323,8 @@ public class RegionDelegate extends WorldGenRegion {
} }
@Override @Override
public <T extends Entity> List<T> func_225317_b(Class<? extends T> p_225317_1_, AxisAlignedBB p_225317_2_) { public <T extends Entity> List<T> getLoadedEntitiesWithinAABB(Class<? extends T> p_225317_1_, AxisAlignedBB p_225317_2_) {
return region.func_225317_b(p_225317_1_, p_225317_2_); return region.getLoadedEntitiesWithinAABB(p_225317_1_, p_225317_2_);
} }
@Override @Override
@ -451,8 +451,8 @@ public class RegionDelegate extends WorldGenRegion {
@Override @Override
@Nullable @Nullable
public IBlockReader getBlockReader(int p_225522_1_, int p_225522_2_) { public IBlockReader getBlockReader(int chunkX, int chunkZ) {
return region.getBlockReader(p_225522_1_, p_225522_2_); return region.getBlockReader(chunkX, chunkZ);
} }
@Override @Override
@ -545,38 +545,38 @@ public class RegionDelegate extends WorldGenRegion {
} }
@Override @Override
public boolean func_226669_j_(Entity entity) { public boolean checkNoEntityCollision(Entity p_226668_1_) {
return region.func_226669_j_(entity); return region.checkNoEntityCollision(p_226668_1_);
} }
@Override @Override
public boolean func_226664_a_(AxisAlignedBB bounds) { public boolean hasNoCollisions(AxisAlignedBB p_226664_1_) {
return region.func_226664_a_(bounds); return region.hasNoCollisions(p_226664_1_);
} }
@Override @Override
public boolean func_226668_i_(Entity entity) { public boolean hasNoCollisions(Entity p_226669_1_) {
return region.func_226668_i_(entity); return region.hasNoCollisions(p_226669_1_);
} }
@Override @Override
public boolean func_226665_a__(Entity entity, AxisAlignedBB bounds) { public boolean hasNoCollisions(Entity p_226665_1_, AxisAlignedBB p_226665_2_) {
return region.func_226665_a__(entity, bounds); return region.hasNoCollisions(p_226665_1_, p_226665_2_);
} }
@Override @Override
public boolean func_226662_a_(@Nullable Entity entity, AxisAlignedBB bounds, Set<Entity> set) { public boolean hasNoCollisions(@Nullable Entity p_226662_1_, AxisAlignedBB p_226662_2_, Set<Entity> p_226662_3_) {
return region.func_226662_a_(entity, bounds, set); return region.hasNoCollisions(p_226662_1_, p_226662_2_, p_226662_3_);
} }
@Override @Override
public Stream<VoxelShape> func_226667_c_(@Nullable Entity entity, AxisAlignedBB bounds, Set<Entity> entities) { public Stream<VoxelShape> getCollisionShapes(@Nullable Entity p_226667_1_, AxisAlignedBB p_226667_2_, Set<Entity> p_226667_3_) {
return region.func_226667_c_(entity, bounds, entities); return region.getCollisionShapes(p_226667_1_, p_226667_2_, p_226667_3_);
} }
@Override @Override
public Stream<VoxelShape> func_226666_b_(@Nullable Entity entity, AxisAlignedBB bounds) { public Stream<VoxelShape> getCollisionShapes(@Nullable Entity p_226666_1_, AxisAlignedBB p_226666_2_) {
return region.func_226666_b_(entity, bounds); return region.getCollisionShapes(p_226666_1_, p_226666_2_);
} }
@Override @Override

View File

@ -42,12 +42,12 @@ public class StructureGenerator implements Generator.Structures {
} }
StructureStart existingStart = chunk.getStructureStart(structure.getStructureName()); 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(); SharedSeedRandom random = new SharedSeedRandom();
StructureStart start = StructureStart.DUMMY; 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()); StructureStart altStart = structure.getStartFactory().create(structure, chunkpos.x, chunkpos.z, MutableBoundingBox.getNewBoundingBox(), refCount, generator.getSeed());
altStart.init(generator, templates, chunkpos.x, chunkpos.z, biome); altStart.init(generator, templates, chunkpos.x, chunkpos.z, biome);
start = altStart.isValid() ? altStart : StructureStart.DUMMY; start = altStart.isValid() ? altStart : StructureStart.DUMMY;