forked from TAIGA/TAIGA
Compare commits
6 Commits
license-ch
...
1.2-stable
Author | SHA1 | Date | |
---|---|---|---|
43123ea3d6 | |||
6d3c6daa87 | |||
79c2e3a579 | |||
9e54f0e62a | |||
a8c066ed1b | |||
e2d3ead5ad |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -172,6 +172,7 @@ gradle-app.setting
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
*.hprof
|
||||
|
||||
# Forge
|
||||
run/
|
||||
|
@@ -108,16 +108,13 @@ public class TAIGAConfiguration {
|
||||
final int PALLADIUM_DEFAULT = 10;
|
||||
final int ABYSSUM_DEFAULT = 4;
|
||||
|
||||
final boolean FALSE = false;
|
||||
final boolean TRUE = true;
|
||||
|
||||
|
||||
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Iron Switch", FALSE);
|
||||
ironSwitch.setComment("Switch ore on/off");
|
||||
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Additional Iron", false);
|
||||
ironSwitch.setComment("Switch additional ore on/off");
|
||||
ironSwitch.setLanguageKey("gui.taiga_configuration.gen_iron");
|
||||
|
||||
Property endSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Endstone Switch", TRUE);
|
||||
endSwitch.setComment("Switch extra End on/off");
|
||||
Property endSwitch = config.get(CATEGORY_NAME_GENERAL, "Additional Endstone", true);
|
||||
endSwitch.setComment("Switch additional endstone on/off");
|
||||
endSwitch.setLanguageKey("gui.taiga_configuration.gen_end");
|
||||
|
||||
/*
|
||||
@@ -197,8 +194,8 @@ public class TAIGAConfiguration {
|
||||
|
||||
|
||||
if (readFieldsFromConfig) {
|
||||
ironGen = ironSwitch.getBoolean(FALSE);
|
||||
endGen = endSwitch.getBoolean(TRUE);
|
||||
ironGen = ironSwitch.getBoolean(false);
|
||||
endGen = endSwitch.getBoolean(true);
|
||||
IRON_VAL = ironValueProp.getInt(IRON_DEFAULT);
|
||||
if (IRON_VAL > RESFAC_MAX_VALUE || IRON_VAL < RESFAC_MIN_VALUE) {
|
||||
IRON_VAL = IRON_DEFAULT;
|
||||
@@ -266,6 +263,7 @@ public class TAIGAConfiguration {
|
||||
}
|
||||
|
||||
ironSwitch.set(ironGen);
|
||||
endSwitch.set(endGen);
|
||||
ironValueProp.set(IRON_VAL);
|
||||
tiberiumValueProp.set(TIBERIUM_VAL);
|
||||
prometheumValueProp.set(PROMETHEUM_VAL);
|
||||
|
@@ -43,8 +43,8 @@ public class TAIGAGuiFactory implements IModGuiFactory {
|
||||
|
||||
private static List<IConfigElement> getConfigElements() {
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Basics configuration", "gui.taiga_configuration.ctgy.general", CategoryEntryGeneral.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Specific ore generation", "gui.taiga_configuration.ctgy.oregen", CategoryEntryOreGen.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Basic configuration", "gui.taiga_configuration.ctgy.general", CategoryEntryGeneral.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement("Ore specific settings", "gui.taiga_configuration.ctgy.oregen", CategoryEntryOreGen.class));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ public class TraitAnalysing extends AbstractTrait {
|
||||
@SubscribeEvent
|
||||
public void onXpDrop(LivingExperienceDropEvent event) {
|
||||
EntityPlayer player = event.getAttackingPlayer();
|
||||
if (player != null && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), this.identifier)) {
|
||||
if (player != null && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), this.identifier) && event.getDroppedExperience() >= 0) {
|
||||
event.setDroppedExperience(this.getUpdateXP(event.getDroppedExperience()));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TraitAnalysing extends AbstractTrait {
|
||||
@SubscribeEvent
|
||||
public void onBlockBreak(BlockEvent.BreakEvent event) {
|
||||
EntityPlayer player = event.getPlayer();
|
||||
if (!event.getWorld().isRemote && player != null && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), this.identifier)) {
|
||||
if (!event.getWorld().isRemote && player != null && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), this.identifier) && event.getExpToDrop() >= 0) {
|
||||
event.setExpToDrop(this.getUpdateXP(event.getExpToDrop()));
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,8 @@ public class TraitCatcher extends AbstractTrait {
|
||||
data.mobClass = target.getClass().getName();
|
||||
data.mobName = target.getName();
|
||||
data.write(tag);
|
||||
TagUtil.setExtraTag(p.getHeldItemMainhand(), tag);
|
||||
if (p.getHeldItemMainhand() != null)
|
||||
TagUtil.setExtraTag(p.getHeldItemMainhand(), tag);
|
||||
p.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0F, 1.0F);
|
||||
target.setDropItemsWhenDead(false);
|
||||
target.setDead();
|
||||
@@ -70,8 +71,6 @@ public class TraitCatcher extends AbstractTrait {
|
||||
TagUtil.setEnchantEffect(tool, false);
|
||||
} else
|
||||
TagUtil.setEnchantEffect(tool, true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -198,6 +198,10 @@ public class Generator {
|
||||
// we are in mid air, go down
|
||||
while (world.getBlockState(cPos.down()).equals(Blocks.AIR.getDefaultState())) {
|
||||
cPos = cPos.down();
|
||||
|
||||
// if we are below 0, we might be in a void dim
|
||||
if (cPos.getY() < 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!validSurface.contains(Item.getItemFromBlock(world.getBlockState(cPos.down()).getBlock())))
|
||||
|
@@ -20,11 +20,10 @@ import static com.sosnitzka.taiga.TAIGAConfiguration.*;
|
||||
@SuppressWarnings("unchecked")
|
||||
public class WorldGen implements IWorldGenerator {
|
||||
private void nether(Random random, int x, int z, World world) {
|
||||
Generator.generateOre(Blocks.NETHERRACK.getDefaultState(), tiberiumOre.getDefaultState(), random, x, z, world, TIBERIUM_VAL, 0, 128, 10, 35);
|
||||
Generator.generateOre(Blocks.NETHERRACK.getDefaultState(), prometheumOre.getDefaultState(), random, x, z, world, PROMETHEUM_VAL, 0, 128, 2, 4);
|
||||
Generator.generateOre(Blocks.NETHERRACK.getDefaultState(), valyriumOre.getDefaultState(), random, x, z, world, VALYRIUM_VAL, 0, 32, 2, 4);
|
||||
Generator.generateOre(tiberiumOre.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), random, x, z, world, TIBERIUM_VAL, 0, 128, 10, 35);
|
||||
Generator.generateOre(prometheumOre.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), random, x, z, world, PROMETHEUM_VAL, 0, 128, 2, 4);
|
||||
Generator.generateOre(valyriumOre.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), random, x, z, world, VALYRIUM_VAL, 0, 32, 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 world(Random random, int x, int z, World world) {
|
||||
@@ -44,9 +43,9 @@ public class WorldGen implements IWorldGenerator {
|
||||
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.END_STONE.getDefaultState(), Blocks.AIR.getDefaultState(), null, null, random, x, z, world, 1, 100, 3, 64, 3, 8, null);
|
||||
Generator.generateOre(Blocks.END_STONE.getDefaultState(), auroriumOre.getDefaultState(), random, x, z, world, AURORIUM_VAL, 32, 48, 2, 4);
|
||||
Generator.generateOre(Blocks.END_STONE.getDefaultState(), palladiumOre.getDefaultState(), random, x, z, world, PALLADIUM_VAL, 48, 64, 2, 4);
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user