Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ba49b23a3 | |||
5320a955b9 | |||
5dd38a4324 | |||
d936c57e27 | |||
18dc97de61 | |||
bfec4bc442 | |||
1e7ab1fc49 | |||
![]() |
18543ec172 | ||
![]() |
cda20df501 | ||
![]() |
ada8e9e004 | ||
![]() |
9828cc1a66 | ||
![]() |
4f852b0d32 | ||
![]() |
c509b4cdd9 | ||
![]() |
fd80efa354 | ||
![]() |
5ff045ecac | ||
4c4268aa3d | |||
abdc6da21d | |||
1ff00daf4b |
@@ -1,4 +1,7 @@
|
||||

|
||||
> This project needs new maintainers, see #15.
|
||||
|
||||
|
||||

|
||||
|
||||
Tinkers Alloying Addon (TAIGA)
|
||||
===============
|
||||
|
14
build.gradle
14
build.gradle
@@ -11,7 +11,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
classpath 'gradle.plugin.com.matthewprenger:CurseGradle:1.0.8'
|
||||
classpath 'gradle.plugin.com.matthewprenger:CurseGradle:1.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ task buildInfo {
|
||||
version = project.buildInfo.revision
|
||||
|
||||
minecraft {
|
||||
version = "1.12.2-14.23.4.2705"
|
||||
version = "1.12.2-14.23.5.2768"
|
||||
runDir = "run"
|
||||
mappings = "snapshot_20170801"
|
||||
replace '@VERSION@', project.version
|
||||
@@ -74,15 +74,9 @@ ext.mc_version = project.minecraft.version.split('-')[0]
|
||||
version = "${mc_version}-${project.buildInfo.revision}"
|
||||
|
||||
dependencies {
|
||||
//deobfCompile "codechicken:CodeChickenLib:1.9.4-2.0.2.39:deobf"
|
||||
//deobfCompile "codechicken:CodeChickenCore:1.9.4-2.0.3.65:deobf"
|
||||
//deobfCompile "codechicken:NotEnoughItems:1.9-${nei_version}:dev"
|
||||
deobfCompile "slimeknights.mantle:Mantle:1.12-1.3.+:deobf"
|
||||
//Old: deobfCompile "slimeknights.mantle:Mantle:1.9-0.10.0.jenkins132:deobf"
|
||||
deobfCompile "mezz.jei:jei_1.12.2:4.+"
|
||||
deobfCompile "slimeknights:TConstruct:1.12.2-2.9.+:deobf"
|
||||
//compile files('libs/TConstruct-1.9-2.3.1.DEV.1d4c1de-deobf.jar')
|
||||
//compile group: 'com.google.guava', name: 'guava', version: '20.0'
|
||||
deobfCompile "slimeknights:TConstruct:1.12.2-2.10.+:deobf"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -139,7 +133,7 @@ curseforge {
|
||||
}
|
||||
|
||||
relations {
|
||||
requiredLibrary 'tinkers-construct'
|
||||
requiredDependency 'tinkers-construct'
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,8 +5,6 @@ import com.sosnitzka.taiga.proxy.CommonProxy;
|
||||
import com.sosnitzka.taiga.recipes.CraftingRegistry;
|
||||
import com.sosnitzka.taiga.recipes.SmeltingRegistry;
|
||||
import com.sosnitzka.taiga.world.WorldGen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
@@ -32,7 +30,7 @@ import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
|
||||
public class TAIGA {
|
||||
|
||||
public static final String MODID = "taiga";
|
||||
public static final String VERSION = "@VERSION@";
|
||||
public static final String VERSION = "1.12.2-1.3.3";
|
||||
public static final String GUIFACTORY = "com.sosnitzka.taiga.TAIGAGuiFactory";
|
||||
public static Logger logger;
|
||||
|
||||
@@ -66,9 +64,7 @@ public class TAIGA {
|
||||
// GameRegistry.registerFuelHandler(new FuelHandler()); Registeres fuels' burn times
|
||||
|
||||
// Adds new harvest levels' names
|
||||
harvestLevelNames.put(DURANITE, I18n.format("harvestlevel.duranite", TextFormatting.GREEN, TextFormatting.RESET));
|
||||
harvestLevelNames.put(VALYRIUM, I18n.format("harvestlevel.valyrium", TextFormatting.GOLD, TextFormatting.RESET));
|
||||
harvestLevelNames.put(VIBRANIUM, I18n.format("harvestlevel.vibranium", TextFormatting.DARK_PURPLE, TextFormatting.RESET));
|
||||
proxy.registerHarvestLevels();
|
||||
|
||||
Blocks.register(true);
|
||||
|
||||
|
@@ -12,9 +12,11 @@ import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
@@ -31,6 +33,7 @@ import static com.sosnitzka.taiga.Fluids.*;
|
||||
import static com.sosnitzka.taiga.Keybindings.altKey;
|
||||
import static com.sosnitzka.taiga.MaterialTraits.*;
|
||||
import static slimeknights.mantle.client.book.BookLoader.registerPageType;
|
||||
import static slimeknights.tconstruct.library.utils.HarvestLevels.harvestLevelNames;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ClientProxy extends CommonProxy {
|
||||
@@ -164,4 +167,11 @@ public class ClientProxy extends CommonProxy {
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHarvestLevels() {
|
||||
harvestLevelNames.put(DURANITE, I18n.format("harvestlevel.duranite", TextFormatting.GREEN, TextFormatting.RESET));
|
||||
harvestLevelNames.put(VALYRIUM, I18n.format("harvestlevel.valyrium", TextFormatting.GOLD, TextFormatting.RESET));
|
||||
harvestLevelNames.put(VIBRANIUM, I18n.format("harvestlevel.vibranium", TextFormatting.DARK_PURPLE, TextFormatting.RESET));
|
||||
}
|
||||
}
|
||||
|
@@ -5,6 +5,9 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import slimeknights.tconstruct.library.materials.Material;
|
||||
|
||||
import static com.sosnitzka.taiga.MaterialTraits.*;
|
||||
import static slimeknights.tconstruct.library.utils.HarvestLevels.harvestLevelNames;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
public void registerModels() {
|
||||
@@ -31,4 +34,10 @@ public class CommonProxy {
|
||||
public void regsiterKeyBindings() {
|
||||
|
||||
}
|
||||
|
||||
public void registerHarvestLevels() {
|
||||
harvestLevelNames.put(DURANITE, "harvestlevel.duranite");
|
||||
harvestLevelNames.put(VALYRIUM, "harvestlevel.valyrium");
|
||||
harvestLevelNames.put(VIBRANIUM, "harvestlevel.vibranium");
|
||||
}
|
||||
}
|
||||
|
@@ -122,6 +122,26 @@ public class WorldGen implements IWorldGenerator {
|
||||
Generator.generateOreBottom(Blocks.END_STONE.getDefaultState(), abyssumOre.getDefaultState(), random, x, z,
|
||||
world, ABYSSUM_VAL, 4, 64);
|
||||
}
|
||||
|
||||
/** Spawns nether/end ores in the Overworld if the server has allow-nether set to 0 WIP: needs alternate textures */
|
||||
private void worldNetherless(Random random, int x, int z, World world) {
|
||||
Generator.generateCube(true, uruOre.getDefaultState(), blockObsidiorite.getDefaultState(), random, x, z,
|
||||
world, URU_VAL, 2, 0, 96, 3);
|
||||
Generator.generateOre(auroriumOre.getDefaultState(), BlockStone.EnumType.DIORITE, random, x, z, world,
|
||||
AURORIUM_VAL, 8, 48, 2, 4);
|
||||
Generator.generateOre(palladiumOre.getDefaultState(), BlockStone.EnumType.DIORITE, random, x, z,
|
||||
world, PALLADIUM_VAL, 12, 64, 2, 4);
|
||||
Generator.generateOreDescending(newArrayList(Blocks.BEDROCK.getDefaultState()), abyssumOre.getDefaultState(), random, x, z,
|
||||
world, ABYSSUM_VAL, 4, 6);
|
||||
Generator.generateOre(tiberiumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, TIBERIUM_VAL, 16, 128, 10, 35);
|
||||
Generator.generateOre(prometheumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, PROMETHEUM_VAL, 0, 32, 2, 4);
|
||||
Generator.generateOre(valyriumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, VALYRIUM_VAL, 0, 128, 2, 4);
|
||||
Generator.generateOre(newArrayList(Blocks.LAVA.getDefaultState(), Blocks.FLOWING_LAVA.getDefaultState()),
|
||||
osramOre.getDefaultState(), random, x, z, world, OSRAM_VAL, 0, 64, 15);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
|
||||
@@ -134,6 +154,11 @@ public class WorldGen implements IWorldGenerator {
|
||||
break;
|
||||
case 0:
|
||||
world(random, x, z, world);
|
||||
if(!net.minecraft.server.MinecraftServer.getAllowNether()) {
|
||||
|
||||
/** worldNetherless generates nether/end ores in overworld */
|
||||
worldNetherless(random, x, z, world);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
end(random, x, z, world);
|
||||
|
171
src/main/java/sosnitzka/taiga/world/WorldGen.java
Normal file
171
src/main/java/sosnitzka/taiga/world/WorldGen.java
Normal file
@@ -0,0 +1,171 @@
|
||||
package com.sosnitzka.taiga.world;
|
||||
|
||||
|
||||
import com.sosnitzka.taiga.TAIGA;
|
||||
import com.sosnitzka.taiga.util.Generator;
|
||||
import net.minecraft.block.BlockStone;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.IChunkGenerator;
|
||||
import net.minecraftforge.fml.common.IWorldGenerator;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static com.google.common.collect.Lists.newArrayList;
|
||||
import static com.sosnitzka.taiga.Blocks.*;
|
||||
import static com.sosnitzka.taiga.TAIGAConfiguration.*;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class WorldGen implements IWorldGenerator {
|
||||
private static WorldGen INSTANCE;
|
||||
private final List<Integer> blackList = new ArrayList();
|
||||
private final Map<Integer, Integer> meteorGenStats = new HashMap();
|
||||
private final Map<Integer, Integer> meteorChunkStats = new HashMap();
|
||||
|
||||
public static WorldGen getInstance() {
|
||||
if (INSTANCE == null)
|
||||
INSTANCE = new WorldGen();
|
||||
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private void nether(Random random, int x, int z, World world) {
|
||||
Generator.generateOre(tiberiumOre.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), random, x, z,
|
||||
world, TIBERIUM_VAL, 32, 128, 10, 35);
|
||||
Generator.generateOre(prometheumOre.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), random, x, z,
|
||||
world, PROMETHEUM_VAL, 0, 32, 2, 4);
|
||||
Generator.generateOre(valyriumOre.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), random, x, z,
|
||||
world, VALYRIUM_VAL, 0, 128, 2, 4);
|
||||
Generator.generateOre(newArrayList(Blocks.LAVA.getDefaultState(), Blocks.FLOWING_LAVA.getDefaultState()),
|
||||
osramOre.getDefaultState(), random, x, z, world, OSRAM_VAL, 0, 64, 15);
|
||||
}
|
||||
|
||||
private void other(Random random, int x, int z, World world) {
|
||||
int dim = world.provider.getDimension();
|
||||
if (!meteorGenStats.containsKey(dim))
|
||||
meteorGenStats.put(dim, 0);
|
||||
|
||||
if (!meteorChunkStats.containsKey(dim))
|
||||
meteorChunkStats.put(dim, 0);
|
||||
|
||||
meteorChunkStats.put(dim, meteorChunkStats.get(dim) + 1);
|
||||
meteorGenStats.put(meteorGenStats.get(dim), meteorGenStats.get(dim) + Generator.generateMeteor(duraniteOre
|
||||
.getDefaultState(), blockMeteorite.getDefaultState(), random, x, z, world, DURANITE_VAL, 6, 16, 112));
|
||||
Generator.generateOreDescending(newArrayList(Blocks.LAVA.getDefaultState(), Blocks.FLOWING_LAVA
|
||||
.getDefaultState()), basaltBlock.getDefaultState(), random, x, z, world, BASALT_VAL, 0, 64);
|
||||
Generator.generateOreDescending(newArrayList(Blocks.BEDROCK.getDefaultState()), eezoOre.getDefaultState(),
|
||||
random, x, z, world, EEZO_VAL, 0, 10);
|
||||
Generator.generateOreStoneVariant(karmesineOre.getDefaultState(), BlockStone.EnumType.ANDESITE, random, x, z,
|
||||
world, KARMESINE_VAL);
|
||||
Generator.generateOreStoneVariant(oviumOre.getDefaultState(), BlockStone.EnumType.DIORITE, random, x, z,
|
||||
world, OVIUM_VAL);
|
||||
Generator.generateOreStoneVariant(jauxumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, JAUXUM_VAL);
|
||||
Generator.generateOre(vibraniumOre.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z, world,
|
||||
VIBRANIUM_VAL, 100, 0, 64, 2, 6, newArrayList(Biomes.DESERT_HILLS, Biomes.EXTREME_HILLS, Biomes
|
||||
.EXTREME_HILLS_EDGE, Biomes.EXTREME_HILLS_WITH_TREES, Biomes.DESERT));
|
||||
Generator.generateOre(dilithiumOre.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z, world,
|
||||
DILITHIUM_VAL, 100, 0, 64, 2, 8, newArrayList(Biomes.DESERT, Biomes.DESERT_HILLS, Biomes
|
||||
.MUTATED_DESERT, Biomes.OCEAN, Biomes.DEEP_OCEAN, Biomes.FROZEN_OCEAN, Biomes.BEACH));
|
||||
Generator.generateOre(vibraniumOre.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z, world, 1,
|
||||
15, 0, 128, 1, 5, null);
|
||||
if (ironGen) {
|
||||
Generator.generateOre(Blocks.IRON_ORE.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z,
|
||||
world, IRON_VAL, 0, 32, 2, 8);
|
||||
}
|
||||
|
||||
if (meteorChunkStats.get(dim) > 100 && meteorGenStats.get(dim) == 0) {
|
||||
blackList.add(dim);
|
||||
TAIGA.logger.info(String.format("Detected void dimension, adding to blacklist: %d", dim));
|
||||
}
|
||||
}
|
||||
|
||||
private void world(Random random, int x, int z, World world) {
|
||||
Generator.generateMeteor(duraniteOre.getDefaultState(), blockMeteorite.getDefaultState(), random, x, z,
|
||||
world, DURANITE_VAL, 6, 16, 112);
|
||||
Generator.generateOreDescending(newArrayList(Blocks.LAVA.getDefaultState(), Blocks.FLOWING_LAVA
|
||||
.getDefaultState()), basaltBlock.getDefaultState(), random, x, z, world, BASALT_VAL, 0, 64);
|
||||
Generator.generateOreDescending(newArrayList(Blocks.BEDROCK.getDefaultState()), eezoOre.getDefaultState(),
|
||||
random, x, z, world, EEZO_VAL, 0, 10);
|
||||
Generator.generateOreStoneVariant(karmesineOre.getDefaultState(), BlockStone.EnumType.ANDESITE, random, x, z,
|
||||
world, KARMESINE_VAL);
|
||||
Generator.generateOreStoneVariant(oviumOre.getDefaultState(), BlockStone.EnumType.DIORITE, random, x, z,
|
||||
world, OVIUM_VAL);
|
||||
Generator.generateOreStoneVariant(jauxumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, JAUXUM_VAL);
|
||||
Generator.generateOre(vibraniumOre.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z, world,
|
||||
VIBRANIUM_VAL, 100, 0, 64, 2, 6, newArrayList(Biomes.DESERT_HILLS, Biomes.EXTREME_HILLS, Biomes
|
||||
.EXTREME_HILLS_EDGE, Biomes.EXTREME_HILLS_WITH_TREES, Biomes.DESERT));
|
||||
Generator.generateOre(dilithiumOre.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z, world,
|
||||
DILITHIUM_VAL, 100, 0, 64, 2, 8, newArrayList(Biomes.DESERT, Biomes.DESERT_HILLS, Biomes
|
||||
.MUTATED_DESERT, Biomes.OCEAN, Biomes.DEEP_OCEAN, Biomes.FROZEN_OCEAN, Biomes.BEACH));
|
||||
Generator.generateOre(vibraniumOre.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z, world, 1,
|
||||
15, 0, 128, 1, 5, null);
|
||||
if (ironGen) {
|
||||
Generator.generateOre(Blocks.IRON_ORE.getDefaultState(), Blocks.STONE.getDefaultState(), random, x, z,
|
||||
world, IRON_VAL, 0, 32, 2, 8);
|
||||
}
|
||||
}
|
||||
|
||||
private void end(Random random, int x, int z, World world) {
|
||||
Generator.generateCube(true, uruOre.getDefaultState(), blockObsidiorite.getDefaultState(), random, x, z,
|
||||
world, URU_VAL, 2, 0, 96, 3);
|
||||
if (endGen)
|
||||
Generator.generateOre(Blocks.AIR.getDefaultState(), Blocks.END_STONE.getDefaultState(), null, null,
|
||||
random, x, z, world, 1, 100, 3, 64, 3, 8, null);
|
||||
Generator.generateOre(auroriumOre.getDefaultState(), Blocks.END_STONE.getDefaultState(), random, x, z, world,
|
||||
AURORIUM_VAL, 32, 48, 2, 4);
|
||||
Generator.generateOre(palladiumOre.getDefaultState(), Blocks.END_STONE.getDefaultState(), random, x, z,
|
||||
world, PALLADIUM_VAL, 48, 64, 2, 4);
|
||||
Generator.generateOreBottom(Blocks.END_STONE.getDefaultState(), abyssumOre.getDefaultState(), random, x, z,
|
||||
world, ABYSSUM_VAL, 4, 64);
|
||||
}
|
||||
|
||||
/** Spawns nether/end ores in the Overworld if the server has allow-nether set to 0 WIP: needs alternate textures */
|
||||
private void worldNetherless(Random random, int x, int z, World world) {
|
||||
Generator.generateCube(true, uruOre.getDefaultState(), blockObsidiorite.getDefaultState(), random, x, z,
|
||||
world, URU_VAL, 2, 0, 96, 3);
|
||||
Generator.generateOre(auroriumOre.getDefaultState(), BlockStone.EnumType.DIORITE, random, x, z, world,
|
||||
AURORIUM_VAL, 8, 48, 2, 4);
|
||||
Generator.generateOre(palladiumOre.getDefaultState(), BlockStone.EnumType.DIORITE, random, x, z,
|
||||
world, PALLADIUM_VAL, 12, 64, 2, 4);
|
||||
Generator.generateOreDescending(newArrayList(Blocks.BEDROCK.getDefaultState()), abyssumOre.getDefaultState(), random, x, z,
|
||||
world, ABYSSUM_VAL, 4, 6);
|
||||
Generator.generateOre(tiberiumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, TIBERIUM_VAL, 16, 128, 10, 35);
|
||||
Generator.generateOre(prometheumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, PROMETHEUM_VAL, 0, 32, 2, 4);
|
||||
Generator.generateOre(valyriumOre.getDefaultState(), BlockStone.EnumType.GRANITE, random, x, z,
|
||||
world, VALYRIUM_VAL, 0, 128, 2, 4);
|
||||
Generator.generateOre(newArrayList(Blocks.LAVA.getDefaultState(), Blocks.FLOWING_LAVA.getDefaultState()),
|
||||
osramOre.getDefaultState(), random, x, z, world, OSRAM_VAL, 0, 64, 15);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
|
||||
IChunkProvider chunkProvider) {
|
||||
int x = chunkX * 16;
|
||||
int z = chunkZ * 16;
|
||||
switch (world.provider.getDimension()) {
|
||||
case -1:
|
||||
nether(random, x, z, world);
|
||||
break;
|
||||
case 0:
|
||||
world(random, x, z, world);
|
||||
if (!net.minecraft.server.MinecraftServer.getAllowNether()) {
|
||||
/** worldNetherless generates nether/end ores in overworld */
|
||||
worldNetherless(random, x, z, world);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
end(random, x, z, world);
|
||||
break;
|
||||
default:
|
||||
if (!blackList.contains(world.provider.getDimension()))
|
||||
other(random, x, z, world);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user