Skip to content

Commit f8ac2a2

Browse files
authored
Merge pull request #127 from gottsch/develop
Develop
2 parents 2c3f8b0 + 6e7923c commit f8ac2a2

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

Treasure2-1.12.2/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package_group=someguyssoftware.treasure2
77
# user alpha, beta, or v (for version)
88
mod_version_type=v
99

10-
mod_version=1.11.0
10+
mod_version=1.11.1
1111

1212
#versions
1313
mc_version=1.12.2

Treasure2-1.12.2/src/com/someguyssoftware/treasure2/Treasure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public class Treasure extends AbstractMod {
8989
// constants
9090
public static final String MODID = "treasure2";
9191
protected static final String NAME = "Treasure2";
92-
protected static final String VERSION = "1.11.0";
92+
protected static final String VERSION = "1.11.1";
9393

9494
public static final String UPDATE_JSON_URL = "https://raw.githubusercontent.com/gottsch/gottsch-minecraft-Treasure/master/Treasure2-1.12.2/update.json";
9595

Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/oasis/DesertOasisGenerator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ public GeneratorResult<GeneratorData> generate(World world, Random random, ICoor
7979
// determine size of oasis
8080
int radius = RandomHelper.randomInt(random, MIN_OASIS_RADIUS, MAX_OASIS_RADIUS); // min of 8, so diameter = 16, area = 16x16, same as chunk
8181
AxisAlignedBB oasisBounds = new AxisAlignedBB(coords.add(-radius, 0, -radius).toPos() , coords.add(radius, 0, radius).toPos());
82-
ICoords centerCoords = new Coords(oasisBounds.getCenter());
82+
int width = Math.abs((int) (oasisBounds.maxX - oasisBounds.minX));
83+
int depth = Math.abs((int) (oasisBounds.maxZ - oasisBounds.minZ));
84+
ICoords centerCoords = new Coords((int)(oasisBounds.minX + width * 0.5D), (int)oasisBounds.minY, (int)(oasisBounds.minZ + depth * 0.5D));
85+
8386
centerCoords = WorldInfo.getDryLandSurfaceCoords(world, centerCoords);
8487

8588
generateBase(world, random, coords, radius);

Treasure2-1.12.2/src/com/someguyssoftware/treasure2/worldgen/WitherTreeWorldGenerator.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@
4444
import net.minecraft.util.EnumFacing;
4545
import net.minecraft.util.math.AxisAlignedBB;
4646
import net.minecraft.util.math.BlockPos;
47+
import net.minecraft.util.math.Vec3d;
4748
import net.minecraft.world.World;
4849
import net.minecraft.world.biome.Biome;
4950
import net.minecraft.world.chunk.IChunkProvider;
5051
import net.minecraft.world.gen.IChunkGenerator;
5152
import net.minecraftforge.common.BiomeDictionary;
53+
import net.minecraftforge.fml.relauncher.Side;
54+
import net.minecraftforge.fml.relauncher.SideOnly;
5255

5356
/**
5457
*
@@ -370,16 +373,17 @@ public GeneratorResult<GeneratorData> generate(World world, Random random, ICoor
370373
}
371374

372375
private void buildScrub(World world, Random random, AxisAlignedBB witherGroveSize) {
373-
ICoords centerCoords = new Coords(witherGroveSize.getCenter());
376+
// Treasure.logger.debug("adding scrub ...");
374377
int width = Math.abs((int) (witherGroveSize.maxX - witherGroveSize.minX));
375378
int depth = Math.abs((int) (witherGroveSize.maxZ - witherGroveSize.minZ));
379+
ICoords centerCoords = new Coords((int)(witherGroveSize.minX + width * 0.5D), (int)witherGroveSize.minY, (int)(witherGroveSize.minZ + depth * 0.5D));
376380

377-
for (int rockIndex = 0; rockIndex < RandomHelper.randomInt(MIN_SCRUB, MAX_SCRUB); rockIndex++) {
381+
for (int scrubIndex = 0; scrubIndex < RandomHelper.randomInt(MIN_SCRUB, MAX_SCRUB); scrubIndex++) {
378382
int xOffset = (int) (random.nextFloat() * width - (width/2));
379383
int zOffset = (int) (random.nextFloat() * depth - (depth/2));
380384

381385
ICoords surfaceCoords = WorldInfo.getDryLandSurfaceCoords(world, centerCoords.add(xOffset, 0, zOffset).withY(255));
382-
386+
// Treasure.logger.debug("adding scrub at -> {}", surfaceCoords.toShortString());
383387
// check if current block is a dirt, podzol, coarse dirt or sand
384388
Block supportBlock = world.getBlockState(surfaceCoords.down(1).toPos()).getBlock();
385389
if (supportBlock == Blocks.DIRT || supportBlock == Blocks.SAND) {
@@ -395,18 +399,19 @@ private void buildScrub(World world, Random random, AxisAlignedBB witherGroveSiz
395399
}
396400

397401
private void buildRocks(World world, Random random, AxisAlignedBB witherGroveSize) {
398-
ICoords centerCoords = new Coords(witherGroveSize.getCenter());
402+
// Treasure.logger.debug("adding rocks ...");
399403
int width = Math.abs((int) (witherGroveSize.maxX - witherGroveSize.minX));
400404
int depth = Math.abs((int) (witherGroveSize.maxZ - witherGroveSize.minZ));
401-
405+
ICoords centerCoords = new Coords((int)(witherGroveSize.minX + width * 0.5D), (int)witherGroveSize.minY, (int)(witherGroveSize.minZ + depth * 0.5D));
406+
402407
for (int rockIndex = 0; rockIndex < RandomHelper.randomInt(MIN_ROCKS, MAX_ROCKS); rockIndex++) {
403408
// randomize a position within the aabb
404409
int xOffset = (int) (random.nextFloat() * width - (width/2));
405410
int zOffset = (int) (random.nextFloat() * depth - (depth/2));
406411

407412
ICoords rocksCoords = WorldInfo.getDryLandSurfaceCoords(world, centerCoords.add(xOffset, 0, zOffset).withY(255));
408413
rocksCoords = rocksCoords.down(1);
409-
414+
//Treasure.logger.debug("adding rocks at -> {}", rocksCoords.toShortString());
410415
// check if current block is a tree or any treasure block
411416
if (world.getBlockState(rocksCoords.toPos()).getBlock() instanceof ITreasureBlock) {
412417
continue;

Treasure2-1.12.2/src/resources/mcmod.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"modid": "treasure2",
44
"name": "Treasure2!",
55
"description": "",
6-
"version": "1.11.0",
6+
"version": "1.11.1",
77
"mcversion": "1.12.2",
88
"url": "",
99
"updateUrl": "",

Treasure2-1.12.2/update.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"homepage": "https://minecraft.curseforge.com/projects/treasure2",
33
"promos": {
4-
"1.12.2-latest": "1.11.0",
5-
"1.12.2-recommended": "1.11.0"
4+
"1.12.2-latest": "1.11.1",
5+
"1.12.2-recommended": "1.11.1"
66
},
77
"1.12.2": {
88
"0.5.0": "alpha release",
@@ -36,7 +36,8 @@
3636
"1.8.0": "Added Decay System.\nAdded 8 surface structures.\nAdded SpawnRuins command.\nFixed/enable other spawn commands.\nAdded Spanish translation.\nAdded Russian translation.\nFixed the number of uses a Key has.\nRemoved Lombok library.\nFixed solid base check for Surface/Submerged ruins.\nFixed Wither Tree crash bug.\nUsing GottschCore v1.10.0.\n",
3737
"1.9.0": "Added Spider Chest.\nAdded recipes for all grave/tombstones.\nFixed config white/black lists on change.\nAll logging config options require mc restart.\nAdded config whitelist for dimensions.\nAdded ability to pass template holder into IRuinGenerators.\nUpdated all SpawnCommands to work from Command blocks.\nAdding fill blocks for under structures so there isnt any overhang when on cliffs etc.\nUsing GottschCore v1.11.0.\nAdded 2 surface structures.\nFixed *huge* bug with decay processor not picking the correct rule.\n",
3838
"1.10.0": "Replaced fog blocks with mist particles around gravestone and wither trees.\nAdded Bound Soul mob.\nAdded Collapsing Trap Pit.\nAdded 2 submerged structures.\nAdded beached shipwrecks.\nAdded skeleton, zombie and creeper heads to epic loot table.\nAdded config option to turn off gem ores gen.\nAdded config option to toggle default decay ruleset file enforcement.\nAdded config option to turn off starting book.\nUpdated spanish lang file.\nUsing GottschCore 1.12.1",
39-
"1.11.0": "Added Viking Chest.\nAdded some environmentals to Wither Tree grove.\nAdded Oasis framework and added Desert Oasis.\nAdded 2 surface structures.\nFixed Collpasing Trap Pit in deserts.\nRegistered Ruby and Sapphire with OreDict as gemRuby, gemSappphire.\nFixed loot table error.\nFixed Wither Chest bug.\nResized pearls textures to look more like pearls and less like snowballs."
39+
"1.11.0": "Added Viking Chest.\nAdded some environmentals to Wither Tree grove.\nAdded Oasis framework and added Desert Oasis.\nAdded 2 surface structures.\nFixed Collpasing Trap Pit in deserts.\nRegistered Ruby and Sapphire with OreDict as gemRuby, gemSappphire.\nFixed loot table error.\nFixed Wither Chest bug.\nResized pearls textures to look more like pearls and less like snowballs.",
40+
"1.11.1": "Fixed server error on Wither tree gen."
4041
}
4142
}
4243

0 commit comments

Comments
 (0)