Merge remote-tracking branch 'HbmMods/master' into structure-2

This commit is contained in:
Vaern 2024-01-09 17:22:33 -08:00
commit fafb70700c
23 changed files with 347 additions and 149 deletions

View File

@ -1,5 +1,14 @@
## Changed ## Changed
* Nuclear craters have been reworked
* The fallout effect no longer creates dead grass, instead it converts the area into three new biomes, the outer crater, crater and inner crater
* The entire crater is now slaked sellafite which now has texture variance to look more like debris, as well as getting darker towards the center
* The watz now cools up to 20% of its current heat level instead of 10%, making reactors a lot cooler and therefore react faster, which means more energy and faster depletion rates * The watz now cools up to 20% of its current heat level instead of 10%, making reactors a lot cooler and therefore react faster, which means more energy and faster depletion rates
* Mud production rates have been halved, to prevent currently working setups from exploding instantly * Mud production rates have been halved, to prevent currently working setups from exploding instantly
* This is your reminder that you can achieve more power, mud and depletion by building larger watz powerplants, i.e. stacking more watz segments on top of each other. Your tiny poo reactors make me sick. * This is your reminder that you can achieve more power, mud and depletion by building larger watz powerplants, i.e. stacking more watz segments on top of each other. Your tiny poo reactors make me sick.
* Watz pellets now have a 50% smaller yield, halving the expected time until depletion * Watz pellets now have a 50% smaller yield, halving the expected time until depletion
* Adjusted the nuclear flash's intensity, the flash will now deal less and less radiation the longer it goes on
* The nuclear flash now bypasses radiation resistance, being only affected by blocks and distance
* Mushroom clouds' initial scale is now based on the total scale instead of all spawning roughly at the same size, causing fireballs to be comically small for huge bombs
## Fixed
* Fixed a rare crash caused by radars force-loading chunks conflicting with certain mods' chunk loading changes

View File

@ -1776,7 +1776,7 @@ public class ModBlocks {
sand_dirty_red = new BlockFalling(Material.sand).setBlockName("sand_dirty_red").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_dirty_red"); sand_dirty_red = new BlockFalling(Material.sand).setBlockName("sand_dirty_red").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_dirty_red");
stone_cracked = new BlockFalling(Material.rock).setBlockName("stone_cracked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":stone_cracked"); stone_cracked = new BlockFalling(Material.rock).setBlockName("stone_cracked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":stone_cracked");
sellafield_slaked = new BlockGeneric(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked"); sellafield_slaked = new BlockSellafieldSlaked(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked");
sellafield = new BlockSellafield(Material.rock).setBlockName("sellafield").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0"); sellafield = new BlockSellafield(Material.rock).setBlockName("sellafield").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
/*sellafield_0 = new BlockHazard(Material.rock).setBlockName("sellafield_0").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0"); /*sellafield_0 = new BlockHazard(Material.rock).setBlockName("sellafield_0").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
sellafield_1 = new BlockHazard(Material.rock).setBlockName("sellafield_1").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_1"); sellafield_1 = new BlockHazard(Material.rock).setBlockName("sellafield_1").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_1");

View File

@ -0,0 +1,53 @@
package com.hbm.blocks.generic;
import java.awt.Color;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class BlockSellafieldSlaked extends Block {
public IIcon[] icons;
public BlockSellafieldSlaked(Material mat) {
super(mat);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
long l = (long) (x * 3129871) ^ (long)y * 116129781L ^ (long)z;
l = l * l * 42317861L + l * 11L;
int i = (int)(l >> 16 & 3L);
return icons[(int)(Math.abs(i) % icons.length)];
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
return icons[meta % icons.length];
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
icons = new IIcon[4];
icons[0] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked");
icons[1] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked_1");
icons[2] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked_2");
icons[3] = reg.registerIcon(RefStrings.MODID + ":sellafield_slaked_3");
}
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
int meta = world.getBlockMetadata(x, y, z);
return Color.HSBtoRGB(0F, 0F, 1F - meta / 15F);
}
}

View File

@ -25,6 +25,7 @@ public class CommonConfig {
public static final String CATEGORY_HAZARD = "14_hazard"; public static final String CATEGORY_HAZARD = "14_hazard";
public static final String CATEGORY_STRUCTURES = "15_structures"; public static final String CATEGORY_STRUCTURES = "15_structures";
public static final String CATEGORY_POLLUTION = "16_pollution"; public static final String CATEGORY_POLLUTION = "16_pollution";
public static final String CATEGORY_BIOMES = "17_biomes";
public static final String CATEGORY_528 = "528"; public static final String CATEGORY_528 = "528";
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE"; public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";

View File

@ -55,13 +55,8 @@ public class FalloutConfigJSON {
private static void initDefault() { private static void initDefault() {
double woodEffectRange = 65D; double woodEffectRange = 65D;
/* destroy all leaves within the radios, kill all leaves outside of it */
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(ModBlocks.waste_leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
/* petrify all wooden things possible */
entries.add(new FalloutEntry() .mB(Blocks.log) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange)); entries.add(new FalloutEntry() .mB(Blocks.log) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.log2) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange)); entries.add(new FalloutEntry() .mB(Blocks.log2) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block).mM(10) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange)); entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block).mM(10) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
@ -69,24 +64,36 @@ public class FalloutConfigJSON {
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange)); entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.brown_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange)); entries.add(new FalloutEntry() .mB(Blocks.brown_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.planks) .prim(new Triplet(ModBlocks.waste_planks, 0, 1)) .max(woodEffectRange)); entries.add(new FalloutEntry() .mB(Blocks.planks) .prim(new Triplet(ModBlocks.waste_planks, 0, 1)) .max(woodEffectRange));
/* if it can't be petrified, destroy it */
entries.add(new FalloutEntry() .mMa(Material.wood) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
/* destroy all leaves within the radios, kill all leaves outside of it */
entries.add(new FalloutEntry() .mMa(Material.leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mMa(Material.plants) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mMa(Material.vine) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(ModBlocks.waste_leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
FalloutEntry stoneCore = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 1, 1)).max(5).sol(true); entries.add(new FalloutEntry().mB(Blocks.mossy_cobblestone).prim(new Triplet(Blocks.coal_ore, 0, 1)));
FalloutEntry stoneInner = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 0, 1)).min(5).max(15).sol(true); entries.add(new FalloutEntry().mB(Blocks.coal_ore).prim(new Triplet(Blocks.diamond_ore, 0, 3), new Triplet(Blocks.emerald_ore, 0, 2)).c(0.5));
FalloutEntry stoneOuter = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).min(15).max(50).sol(true); entries.add(new FalloutEntry().mB(ModBlocks.ore_lignite).prim(new Triplet(Blocks.diamond_ore, 0, 1)).c(0.2));
entries.add(new FalloutEntry().mB(ModBlocks.ore_uranium).prim(new Triplet(ModBlocks.ore_schrabidium, 0, 1), new Triplet(ModBlocks.ore_uranium_scorched, 0, 99)));
entries.add(new FalloutEntry().mB(ModBlocks.ore_nether_uranium).prim(new Triplet(ModBlocks.ore_nether_schrabidium, 0, 1), new Triplet(ModBlocks.ore_nether_uranium_scorched, 0, 99)));
entries.add(new FalloutEntry().mB(ModBlocks.ore_gneiss_uranium).prim(new Triplet(ModBlocks.ore_gneiss_schrabidium, 0, 1), new Triplet(ModBlocks.ore_gneiss_uranium_scorched, 0, 99)));
entries.add(stoneCore.clone().mB(Blocks.stone)); Block deepslate = Compat.tryLoadBlock(Compat.MOD_EF, "deepslate");
entries.add(stoneInner.clone().mB(Blocks.stone)); Block stone = Compat.tryLoadBlock(Compat.MOD_EF, "stone");
entries.add(stoneOuter.clone().mB(Blocks.stone));
entries.add(stoneCore.clone().mB(Blocks.gravel));
entries.add(stoneInner.clone().mB(Blocks.gravel));
entries.add(stoneOuter.clone().mB(Blocks.gravel));
/* recontaminate slaked sellafield */
entries.add(stoneCore.clone().mB(ModBlocks.sellafield_slaked));
entries.add(stoneInner.clone().mB(ModBlocks.sellafield_slaked));
entries.add(new FalloutEntry() for(int i = 1; i <= 10; i++) {
.mB(Blocks.grass) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mMa(Material.rock));
.prim(new Triplet(ModBlocks.waste_earth, 0, 1))); entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mB(Blocks.gravel));
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mMa(Material.ground));
if(i <= 9) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mMa(Material.grass));
if(deepslate != null) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mB(deepslate));
if(stone != null) entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mB(stone));
}
//entries.add(new FalloutEntry().mB(Blocks.grass).prim(new Triplet(ModBlocks.waste_earth, 0, 1)));
entries.add(new FalloutEntry() entries.add(new FalloutEntry()
.mB(Blocks.mycelium) .mB(Blocks.mycelium)
.prim(new Triplet(ModBlocks.waste_mycelium, 0, 1))); .prim(new Triplet(ModBlocks.waste_mycelium, 0, 1)));
@ -101,40 +108,6 @@ public class FalloutConfigJSON {
entries.add(new FalloutEntry() entries.add(new FalloutEntry()
.mB(Blocks.clay) .mB(Blocks.clay)
.prim(new Triplet(Blocks.hardened_clay, 0, 1))); .prim(new Triplet(Blocks.hardened_clay, 0, 1)));
entries.add(new FalloutEntry()
.mB(Blocks.mossy_cobblestone)
.prim(new Triplet(Blocks.coal_ore, 0, 1)));
entries.add(new FalloutEntry()
.mB(Blocks.coal_ore)
.prim(new Triplet(Blocks.diamond_ore, 0, 3), new Triplet(Blocks.emerald_ore, 0, 2))
.c(0.5));
entries.add(new FalloutEntry()
.mB(ModBlocks.ore_lignite)
.prim(new Triplet(Blocks.diamond_ore, 0, 1))
.c(0.2));
entries.add(new FalloutEntry()
.mB(ModBlocks.ore_uranium)
.prim(new Triplet(ModBlocks.ore_schrabidium, 0, 1), new Triplet(ModBlocks.ore_uranium_scorched, 0, 99)));
entries.add(new FalloutEntry()
.mB(ModBlocks.ore_nether_uranium)
.prim(new Triplet(ModBlocks.ore_nether_schrabidium, 0, 1), new Triplet(ModBlocks.ore_nether_uranium_scorched, 0, 99)));
entries.add(new FalloutEntry()
.mB(ModBlocks.ore_gneiss_uranium)
.prim(new Triplet(ModBlocks.ore_gneiss_schrabidium, 0, 1), new Triplet(ModBlocks.ore_gneiss_uranium_scorched, 0, 99)));
/// COMPAT ///
Block deepslate = Compat.tryLoadBlock(Compat.MOD_EF, "deepslate");
if(deepslate != null) { //identical to stone
entries.add(stoneCore.clone().mB(deepslate));
entries.add(stoneInner.clone().mB(deepslate));
entries.add(stoneOuter.clone().mB(deepslate));
}
Block stone = Compat.tryLoadBlock(Compat.MOD_EF, "stone");
if(stone != null) { //identical to stone
entries.add(stoneCore.clone().mB(stone));
entries.add(stoneInner.clone().mB(stone));
entries.add(stoneOuter.clone().mB(stone));
}
} }
private static void writeDefault(File file) { private static void writeDefault(File file) {
@ -191,6 +164,7 @@ public class FalloutConfigJSON {
private double minDist = 0.0D; private double minDist = 0.0D;
private double maxDist = 100.0D; private double maxDist = 100.0D;
/** Whether the depth value should be decremented when this block is converted */
private boolean isSolid = false; private boolean isSolid = false;
public FalloutEntry clone() { public FalloutEntry clone() {

View File

@ -107,6 +107,10 @@ public class WorldConfig {
public static int meteorStrikeChance = 20 * 60 * 180; public static int meteorStrikeChance = 20 * 60 * 180;
public static int meteorShowerChance = 20 * 60 * 5; public static int meteorShowerChance = 20 * 60 * 5;
public static int meteorShowerDuration = 6000; public static int meteorShowerDuration = 6000;
public static int craterBiomeId = 80;
public static int craterBiomeInnerId = 81;
public static int craterBiomeOuterId = 82;
public static void loadFromConfig(Configuration config) { public static void loadFromConfig(Configuration config) {
@ -218,6 +222,11 @@ public class WorldConfig {
meteorShowerChance = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.04_meteorShowerChance", "The probability of a meteor spawning during meteor shower (an average of once every nTH ticks)", 20 * 60 * 15); meteorShowerChance = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.04_meteorShowerChance", "The probability of a meteor spawning during meteor shower (an average of once every nTH ticks)", 20 * 60 * 15);
meteorShowerDuration = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.05_meteorShowerDuration", "Max duration of meteor shower in ticks", 20 * 60 * 30); meteorShowerDuration = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.05_meteorShowerDuration", "Max duration of meteor shower in ticks", 20 * 60 * 30);
final String CATEGORY_BIOMES = CommonConfig.CATEGORY_BIOMES;
craterBiomeId = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "17.00_craterBiomeId", "The numeric ID for the crater biome", 80);
craterBiomeInnerId = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "17.01_craterBiomeInnerId", "The numeric ID for the inner crater biome", 81);
craterBiomeOuterId = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "17.02_craterBiomeOuterId", "The numeric ID for the outer crater biome", 82);
radioStructure = CommonConfig.setDefZero(radioStructure, 1000); radioStructure = CommonConfig.setDefZero(radioStructure, 1000);
antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000); antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000);
atomStructure = CommonConfig.setDefZero(atomStructure, 1000); atomStructure = CommonConfig.setDefZero(atomStructure, 1000);

View File

@ -7,7 +7,7 @@ import com.hbm.config.FalloutConfigJSON.FalloutEntry;
import com.hbm.entity.item.EntityFallingBlockNT; import com.hbm.entity.item.EntityFallingBlockNT;
import com.hbm.saveddata.AuxSavedData; import com.hbm.saveddata.AuxSavedData;
import com.hbm.world.WorldUtil; import com.hbm.world.WorldUtil;
import com.hbm.world.biome.BiomeGenCrater; import com.hbm.world.biome.BiomeGenCraterBase;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -17,6 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Vec3; import net.minecraft.util.Vec3;
import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.storage.WorldInfo; import net.minecraft.world.storage.WorldInfo;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
@ -57,28 +58,40 @@ public class EntityFalloutRain extends Entity {
long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE); int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE); int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
boolean biomeModified = false;
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) { for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) { for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
stomp(x, z, Math.hypot(x - posX, z - posZ) * 100 / getScale()); double percent = Math.hypot(x - posX, z - posZ) * 100 / getScale();
//WorldUtil.setBiome(worldObj, x, z, BiomeGenCrater.craterBiome); stomp(x, z, percent);
BiomeGenBase biome = getBiomeChange(percent, getScale());
if(biome != null) {
WorldUtil.setBiome(worldObj, x, z, biome);
biomeModified = true;
}
} }
} }
//WorldUtil.syncBiomeChange(worldObj, chunkPosX, chunkPosZ); if(biomeModified) WorldUtil.syncBiomeChange(worldObj, chunkPosX << 4, chunkPosZ << 4);
} else if (!outerChunksToProcess.isEmpty()) { } else if (!outerChunksToProcess.isEmpty()) {
long chunkPos = outerChunksToProcess.remove(outerChunksToProcess.size() - 1); long chunkPos = outerChunksToProcess.remove(outerChunksToProcess.size() - 1);
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE); int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE); int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
boolean biomeModified = false;
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) { for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) { for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
double distance = Math.hypot(x - posX, z - posZ); double distance = Math.hypot(x - posX, z - posZ);
if(distance <= getScale()) { if(distance <= getScale()) {
stomp(x, z, distance * 100 / getScale()); double percent = distance * 100 / getScale();
//WorldUtil.setBiome(worldObj, x, z, BiomeGenCrater.craterBiome); stomp(x, z, percent);
BiomeGenBase biome = getBiomeChange(percent, getScale());
if(biome != null) {
WorldUtil.setBiome(worldObj, x, z, biome);
biomeModified = true;
}
} }
} }
} }
//WorldUtil.syncBiomeChange(worldObj, chunkPosX, chunkPosZ); if(biomeModified) WorldUtil.syncBiomeChange(worldObj, chunkPosX << 4, chunkPosZ << 4);
} else { } else {
setDead(); setDead();
@ -99,6 +112,13 @@ public class EntityFalloutRain extends Entity {
} }
} }
} }
public static BiomeGenBase getBiomeChange(double dist, int scale) {
if(scale >= 150 && dist < 15) return BiomeGenCraterBase.craterInnerBiome;
if(scale >= 100 && dist < 55) return BiomeGenCraterBase.craterBiome;
if(scale >= 25) return BiomeGenCraterBase.craterOuterBiome;
return null;
}
private final List<Long> chunksToProcess = new ArrayList<>(); private final List<Long> chunksToProcess = new ArrayList<>();
private final List<Long> outerChunksToProcess = new ArrayList<>(); private final List<Long> outerChunksToProcess = new ArrayList<>();
@ -129,25 +149,21 @@ public class EntityFalloutRain extends Entity {
Collections.reverse(outerChunksToProcess); Collections.reverse(outerChunksToProcess);
} }
//private List<int[]> changedPositions = new ArrayList();
// TODO cache chunks?
private void stomp(int x, int z, double dist) { private void stomp(int x, int z, double dist) {
int depth = 0; int depth = 0;
for(int y = 255; y >= 0; y--) { for(int y = 255; y >= 0; y--) {
if(depth >= 3) if(depth >= 3) return;
return;
Block b = worldObj.getBlock(x, y, z); Block b = worldObj.getBlock(x, y, z);
if(b.getMaterial() == Material.air) continue;
Block ab = worldObj.getBlock(x, y + 1, z); Block ab = worldObj.getBlock(x, y + 1, z);
int meta = worldObj.getBlockMetadata(x, y, z); int meta = worldObj.getBlockMetadata(x, y, z);
if(b.getMaterial() == Material.air)
continue;
if(b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) { if(b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) {
double d = dist / 100; double d = dist / 100;
@ -167,10 +183,6 @@ public class EntityFalloutRain extends Entity {
for(FalloutEntry entry : FalloutConfigJSON.entries) { for(FalloutEntry entry : FalloutConfigJSON.entries) {
if(b == Blocks.grass) {
break;
}
if(entry.eval(worldObj, x, y, z, b, meta, dist)) { if(entry.eval(worldObj, x, y, z, b, meta, dist)) {
if(entry.isSolid()) { if(entry.isSolid()) {
depth++; depth++;

View File

@ -59,6 +59,8 @@ public class EntityNukeTorex extends Entity {
if(worldObj.isRemote) { if(worldObj.isRemote) {
if(ticksExisted == 1) this.setScale((float) s);
if(lastSpawnY == -1) { if(lastSpawnY == -1) {
lastSpawnY = posY - 3; lastSpawnY = posY - 3;
} }
@ -82,7 +84,7 @@ public class EntityNukeTorex extends Entity {
double x = posX + rand.nextGaussian() * range; double x = posX + rand.nextGaussian() * range;
double z = posZ + rand.nextGaussian() * range; double z = posZ + rand.nextGaussian() * range;
Cloudlet cloud = new Cloudlet(x, lastSpawnY, z, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime); Cloudlet cloud = new Cloudlet(x, lastSpawnY, z, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime);
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) cs, 5F * (float) cs); cloud.setScale(1F + this.ticksExisted * 0.005F * (float) s, 5F * (float) cs);
cloudlets.add(cloud); cloudlets.add(cloud);
} }
@ -104,13 +106,44 @@ public class EntityNukeTorex extends Entity {
// spawn ring clouds // spawn ring clouds
if(ticksExisted < 200) { if(ticksExisted < 200) {
lifetime *= s;
for(int i = 0; i < 2; i++) { for(int i = 0; i < 2; i++) {
Cloudlet cloud = new Cloudlet(posX, posY + coreHeight, posZ, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime, TorexType.RING); Cloudlet cloud = new Cloudlet(posX, posY + coreHeight, posZ, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime, TorexType.RING);
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) cs * 0.5F, 3F * (float) (cs * s)); cloud.setScale(1F + this.ticksExisted * 0.0025F * (float) (cs * s), 3F * (float) (cs * s));
cloudlets.add(cloud); cloudlets.add(cloud);
} }
} }
// spawn condensation clouds
if(ticksExisted > 200 && ticksExisted < 600) {
for(int i = 0; i < 50; i++) {
for(int j = 0; j < 4; j++) {
float angle = (float) (Math.PI * 2 * rand.nextDouble());
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * 3, 0, 0);
vec.rotateAroundZ((float) (Math.PI / 45 * j));
vec.rotateAroundY(angle);
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight - 5 + j * s, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
cloud.setScale(0.125F * (float) (cs * s), 3F * (float) (cs * s));
cloudlets.add(cloud);
}
}
}
if(ticksExisted > 300 && ticksExisted < 600) {
for(int i = 0; i < 50; i++) {
for(int j = 0; j < 4; j++) {
float angle = (float) (Math.PI * 2 * rand.nextDouble());
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * 2, 0, 0);
vec.rotateAroundZ((float) (Math.PI / 45 * j));
vec.rotateAroundY(angle);
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight + 25 + j * s, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
cloud.setScale(0.125F * (float) (cs * s), 3F * (float) (cs * s));
cloudlets.add(cloud);
}
}
}
for(Cloudlet cloud : cloudlets) { for(Cloudlet cloud : cloudlets) {
cloud.update(); cloud.update();
} }
@ -131,7 +164,7 @@ public class EntityNukeTorex extends Entity {
} }
public EntityNukeTorex setScale(float scale) { public EntityNukeTorex setScale(float scale) {
getDataWatcher().updateObject(10, scale); if(!worldObj.isRemote) getDataWatcher().updateObject(10, scale);
this.coreHeight = this.coreHeight / 1.5D * scale; this.coreHeight = this.coreHeight / 1.5D * scale;
this.convectionHeight = this.convectionHeight / 1.5D * scale; this.convectionHeight = this.convectionHeight / 1.5D * scale;
this.torusWidth = this.torusWidth / 1.5D * scale; this.torusWidth = this.torusWidth / 1.5D * scale;
@ -270,6 +303,11 @@ public class EntityNukeTorex extends Entity {
this.motionX = motion.xCoord; this.motionX = motion.xCoord;
this.motionY = motion.yCoord; this.motionY = motion.yCoord;
this.motionZ = motion.zCoord; this.motionZ = motion.zCoord;
} else if(this.type == TorexType.CONDENSATION) {
Vec3 motion = getCondensationMotion();
this.motionX = motion.xCoord;
this.motionY = motion.yCoord;
this.motionZ = motion.zCoord;
} }
double mult = this.motionMult * getSimulationSpeed(); double mult = this.motionMult * getSimulationSpeed();
@ -281,6 +319,15 @@ public class EntityNukeTorex extends Entity {
this.updateColor(); this.updateColor();
} }
private Vec3 getCondensationMotion() {
Vec3 delta = Vec3.createVectorHelper(posX - EntityNukeTorex.this.posX, 0, posZ - EntityNukeTorex.this.posZ);
double speed = 0.00002 * EntityNukeTorex.this.getScale() * EntityNukeTorex.this.ticksExisted;
delta.xCoord *= speed;
//delta.yCoord *= speed * 0.75 * EntityNukeTorex.this.getScale();
delta.zCoord *= speed;
return delta;
}
private Vec3 getRingMotion(double simPosX, double simPosZ) { private Vec3 getRingMotion(double simPosX, double simPosZ) {
/*Vec3 targetPos = Vec3.createVectorHelper( /*Vec3 targetPos = Vec3.createVectorHelper(
@ -440,6 +487,11 @@ public class EntityNukeTorex extends Entity {
} }
public Vec3 getInterpColor(float interp) { public Vec3 getInterpColor(float interp) {
if(this.type == TorexType.CONDENSATION) {
return Vec3.createVectorHelper(1F, 1F, 1F);
}
double greying = EntityNukeTorex.this.getGreying(); double greying = EntityNukeTorex.this.getGreying();
if(this.type == TorexType.RING) { if(this.type == TorexType.RING) {
@ -453,7 +505,9 @@ public class EntityNukeTorex extends Entity {
} }
public float getAlpha() { public float getAlpha() {
return (1F - ((float)age / (float)cloudletLife)) * EntityNukeTorex.this.getAlpha(); float alpha = (1F - ((float)age / (float)cloudletLife)) * EntityNukeTorex.this.getAlpha();
if(this.type == TorexType.CONDENSATION) alpha *= 0.25;
return alpha;
} }
private float startingScale = 1; private float startingScale = 1;
@ -479,7 +533,8 @@ public class EntityNukeTorex extends Entity {
public static enum TorexType { public static enum TorexType {
STANDARD, STANDARD,
RING RING,
CONDENSATION
} }
@Override protected void writeEntityToNBT(NBTTagCompound nbt) { } @Override protected void writeEntityToNBT(NBTTagCompound nbt) { }

View File

@ -63,7 +63,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
} }
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) { if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
radiate(500_000, this.length * 2); radiate(2_500_000F / (this.ticksExisted * 5 + 1), this.length * 2);
} }
if(!mute) { if(!mute) {
@ -131,7 +131,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
eRads /= (float)res; eRads /= (float)res;
eRads /= (float)(len * len); eRads /= (float)(len * len);
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads); ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.RAD_BYPASS, eRads);
} }
} }

View File

@ -2,18 +2,14 @@ package com.hbm.items.tool;
import java.util.List; import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.effect.EntityNukeTorex; import com.hbm.entity.effect.EntityNukeTorex;
import com.hbm.lib.Library; import com.hbm.lib.Library;
import com.hbm.util.TrackerUtil; import com.hbm.util.TrackerUtil;
import com.hbm.world.gen.MapGenNTMFeatures;
import com.hbm.saveddata.TomSaveData;
import com.hbm.world.WorldUtil; import com.hbm.world.WorldUtil;
import com.hbm.world.biome.BiomeGenCrater; import com.hbm.world.biome.BiomeGenCraterBase;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
@ -148,10 +144,11 @@ public class ItemWandD extends Item {
/*for(int i = -5; i <= 5; i++) { /*for(int i = -5; i <= 5; i++) {
for(int j = -5; j <= 5; j++) { for(int j = -5; j <= 5; j++) {
WorldUtil.setBiome(world, pos.blockX + i, pos.blockZ + j, BiomeGenCrater.craterBiome); WorldUtil.setBiome(world, pos.blockX + i, pos.blockZ + j, BiomeGenCraterBase.craterBiome);
WorldUtil.syncBiomeChangeBlock(world, pos.blockX + i, pos.blockZ + j);
} }
}*/ }
WorldUtil.syncBiomeChange(world, pos.blockX, pos.blockZ);*/
/*EntityTomBlast tom = new EntityTomBlast(world); /*EntityTomBlast tom = new EntityTomBlast(world);
tom.posX = pos.blockX; tom.posX = pos.blockX;
@ -160,12 +157,11 @@ public class ItemWandD extends Item {
tom.destructionRange = 600; tom.destructionRange = 600;
world.spawnEntityInWorld(tom);*/ world.spawnEntityInWorld(tom);*/
/*EntityNukeTorex torex = new EntityNukeTorex(world); EntityNukeTorex torex = new EntityNukeTorex(world);
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0); torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
torex.setScale(1.5F); torex.setScale(1.5F);
torex.setType(1);
world.spawnEntityInWorld(torex); world.spawnEntityInWorld(torex);
TrackerUtil.setTrackingRange(world, torex, 1000);*/ TrackerUtil.setTrackingRange(world, torex, 1000);
/*EntityTracker entitytracker = ((WorldServer) world).getEntityTracker(); /*EntityTracker entitytracker = ((WorldServer) world).getEntityTracker();
IntHashMap map = ReflectionHelper.getPrivateValue(EntityTracker.class, entitytracker, "trackedEntityIDs", "field_72794_c"); IntHashMap map = ReflectionHelper.getPrivateValue(EntityTracker.class, entitytracker, "trackedEntityIDs", "field_72794_c");

View File

@ -47,6 +47,7 @@ import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
import com.hbm.tileentity.machine.TileEntityNukeFurnace; import com.hbm.tileentity.machine.TileEntityNukeFurnace;
import com.hbm.tileentity.machine.rbmk.RBMKDials; import com.hbm.tileentity.machine.rbmk.RBMKDials;
import com.hbm.util.*; import com.hbm.util.*;
import com.hbm.world.biome.BiomeGenCraterBase;
import com.hbm.world.feature.BedrockOre; import com.hbm.world.feature.BedrockOre;
import com.hbm.world.feature.OreCave; import com.hbm.world.feature.OreCave;
import com.hbm.world.feature.OreLayer3D; import com.hbm.world.feature.OreLayer3D;
@ -294,6 +295,8 @@ public class MainRegistry {
MinecraftForge.EVENT_BUS.register(oreMan); //OreRegisterEvent MinecraftForge.EVENT_BUS.register(oreMan); //OreRegisterEvent
OreDictManager.registerGroups(); //important to run first OreDictManager.registerGroups(); //important to run first
OreDictManager.registerOres(); OreDictManager.registerOres();
BiomeGenCraterBase.initDictionary();
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8"); Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e"); Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");

View File

@ -10,6 +10,7 @@ import com.hbm.items.armor.IArmorDisableModel;
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart; import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
import com.hbm.packet.PermaSyncHandler; import com.hbm.packet.PermaSyncHandler;
import com.hbm.render.model.ModelMan; import com.hbm.render.model.ModelMan;
import com.hbm.world.biome.BiomeGenCraterBase;
import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -27,6 +28,8 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.event.DrawBlockHighlightEvent; import net.minecraftforge.client.event.DrawBlockHighlightEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors; import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors;
@ -369,6 +372,17 @@ public class ModEventHandlerRenderer {
@SubscribeEvent(priority = EventPriority.LOW) @SubscribeEvent(priority = EventPriority.LOW)
public void tintFog(FogColors event) { public void tintFog(FogColors event) {
EntityPlayer player = MainRegistry.proxy.me();
BiomeGenBase biome = player.worldObj.getBiomeGenForCoords((int) Math.floor(player.posX), (int) Math.floor(player.posZ));
if(biome instanceof BiomeGenCraterBase) {
int color = ForgeHooksClient.getSkyBlendColour(player.worldObj, (int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ));
event.red = ((color & 0xff0000) >> 16) / 255F;
event.green = ((color & 0x00ff00) >> 8) / 255F;
event.blue = (color & 0x0000ff) / 255F;
}
float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold); float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold);
float sootColor = 0.15F; float sootColor = 0.15F;
float sootReq = (float) RadiationConfig.sootFogDivisor; float sootReq = (float) RadiationConfig.sootFogDivisor;

View File

@ -138,7 +138,7 @@ public class RenderTorex extends Render {
float f4 = ActiveRenderInfo.rotationXY; float f4 = ActiveRenderInfo.rotationXY;
float f5 = ActiveRenderInfo.rotationXZ; float f5 = ActiveRenderInfo.rotationXZ;
float brightness = 0.75F * cloud.colorMod; float brightness = cloud.type == cloud.type.CONDENSATION ? 0.9F : 0.75F * cloud.colorMod;
Vec3 color = cloud.getInterpColor(interp); Vec3 color = cloud.getInterpColor(interp);
tess.setColorRGBA_F((float)color.xCoord * brightness, (float)color.yCoord * brightness, (float)color.zCoord * brightness, alpha); tess.setColorRGBA_F((float)color.xCoord * brightness, (float)color.yCoord * brightness, (float)color.zCoord * brightness, alpha);

View File

@ -21,6 +21,8 @@ import com.hbm.lib.Library;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.saveddata.SatelliteSavedData; import com.hbm.saveddata.SatelliteSavedData;
import com.hbm.saveddata.satellites.Satellite; import com.hbm.saveddata.satellites.Satellite;
import com.hbm.saveddata.satellites.Satellite.Interfaces;
import com.hbm.saveddata.satellites.SatelliteHorizons;
import com.hbm.saveddata.satellites.SatelliteLaser; import com.hbm.saveddata.satellites.SatelliteLaser;
import com.hbm.tileentity.IConfigurableMachine; import com.hbm.tileentity.IConfigurableMachine;
import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.IGUIProvider;
@ -427,6 +429,16 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
sat.onClick(world, x, z); sat.onClick(world, x, z);
} }
} }
if(sat instanceof SatelliteHorizons) {
if(data.hasKey("launchPosX")) {
int x = data.getInteger("launchPosX");
int z = data.getInteger("launchPosZ");
int y = 60; //one day I will make radars transmit Y coordinate as well and you will be butchered alhamdulila
worldObj.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
sat.onCoordAction(world,player,x,y,z);
}
}
} }

View File

@ -254,7 +254,7 @@ public class ContaminationUtil {
DIGAMMA, //preventable by fau armor or stability DIGAMMA, //preventable by fau armor or stability
DIGAMMA2, //preventable by robes DIGAMMA2, //preventable by robes
CREATIVE, //preventable by creative mode, for rad calculation armor piece bonuses still apply CREATIVE, //preventable by creative mode, for rad calculation armor piece bonuses still apply
RAD_BYPASS, //same as craative but will not apply radiation resistance calculation RAD_BYPASS, //same as creative but will not apply radiation resistance calculation
NONE //not preventable NONE //not preventable
} }

View File

@ -26,7 +26,7 @@ public class WorldUtil {
public static void syncBiomeChange(World world, int x, int z) { public static void syncBiomeChange(World world, int x, int z) {
Chunk chunk = world.getChunkFromBlockCoords(x, z); Chunk chunk = world.getChunkFromBlockCoords(x, z);
PacketDispatcher.wrapper.sendToAllAround(new BiomeSyncPacket(x, z, chunk.getBiomeArray()), new TargetPoint(world.provider.dimensionId, x, 128, z, 1024D)); PacketDispatcher.wrapper.sendToAllAround(new BiomeSyncPacket(x >> 4, z >> 4, chunk.getBiomeArray()), new TargetPoint(world.provider.dimensionId, x, 128, z, 1024D));
} }
public static void syncBiomeChangeBlock(World world, int x, int z) { public static void syncBiomeChangeBlock(World world, int x, int z) {
@ -83,10 +83,14 @@ public class WorldUtil {
} }
public static Chunk provideChunk(WorldServer world, int chunkX, int chunkZ) { public static Chunk provideChunk(WorldServer world, int chunkX, int chunkZ) {
ChunkProviderServer provider = world.theChunkProviderServer; try {
Chunk chunk = (Chunk) provider.loadedChunkHashMap.getValueByKey(ChunkCoordIntPair.chunkXZ2Int(chunkX, chunkZ)); ChunkProviderServer provider = world.theChunkProviderServer;
if(chunk != null) return chunk; Chunk chunk = (Chunk) provider.loadedChunkHashMap.getValueByKey(ChunkCoordIntPair.chunkXZ2Int(chunkX, chunkZ));
return loadChunk(world, provider, chunkX, chunkZ); if(chunk != null) return chunk;
return loadChunk(world, provider, chunkX, chunkZ);
} catch(Throwable x) {
return null;
}
} }
private static Chunk loadChunk(WorldServer world, ChunkProviderServer provider, int chunkX, int chunkZ) { private static Chunk loadChunk(WorldServer world, ChunkProviderServer provider, int chunkX, int chunkZ) {

View File

@ -1,36 +0,0 @@
package com.hbm.world.biome;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenCrater extends BiomeGenBase {
//public static final BiomeGenBase craterBiome = new BiomeGenCrater(50 /* TEMP */).setDisableRain();
public BiomeGenCrater(int id) {
super(id);
this.waterColorMultiplier = 0xE0FFAE; //swamp color
this.setBiomeName("Crater");
}
@Override
@SideOnly(Side.CLIENT)
public int getBiomeGrassColor(int x, int y, int z) {
double noise = plantNoise.func_151601_a((double) x * 0.225D, (double) z * 0.225D);
return noise < -0.1D ? 0x606060 : 0x505050;
}
@Override
@SideOnly(Side.CLIENT)
public int getBiomeFoliageColor(int x, int y, int z) {
return 0x6A7039;
}
@Override
@SideOnly(Side.CLIENT)
public int getSkyColorByTemp(float temp) {
//return 0x66BBA9;
return 0x6B9189;
}
}

View File

@ -0,0 +1,88 @@
package com.hbm.world.biome;
import com.hbm.config.WorldConfig;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
import static net.minecraftforge.common.BiomeDictionary.Type.*;
public class BiomeGenCraterBase extends BiomeGenBase {
public static final BiomeGenBase craterBiome = new BiomeGenCrater(WorldConfig.craterBiomeId).setDisableRain().setBiomeName("Crater");
public static final BiomeGenBase craterInnerBiome = new BiomeGenCraterInner(WorldConfig.craterBiomeInnerId).setDisableRain().setBiomeName("Inner Crater");
public static final BiomeGenBase craterOuterBiome = new BiomeGenCraterOuter(WorldConfig.craterBiomeOuterId).setDisableRain().setBiomeName("Outer Crater");
public static void initDictionary() {
BiomeDictionary.registerBiomeType(craterBiome, DRY, DEAD, WASTELAND);
BiomeDictionary.registerBiomeType(craterInnerBiome, DRY, DEAD, WASTELAND);
BiomeDictionary.registerBiomeType(craterOuterBiome, DRY, DEAD, WASTELAND);
}
public int getWaterColorMultiplier() {
return 0x505020; //0x50d030
}
public BiomeGenCraterBase(int id) {
super(id);
this.waterColorMultiplier = 0xE0FFAE; //swamp color
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
}
public static class BiomeGenCrater extends BiomeGenCraterBase {
public BiomeGenCrater(int id) { super(id); }
@Override @SideOnly(Side.CLIENT)
public int getBiomeGrassColor(int x, int y, int z) {
double noise = plantNoise.func_151601_a((double) x * 0.225D, (double) z * 0.225D);
return noise < -0.1D ? 0x606060 : 0x505050;
}
@Override @SideOnly(Side.CLIENT)
public int getBiomeFoliageColor(int x, int y, int z) { return 0x6A7039; }
@Override @SideOnly(Side.CLIENT)
public int getSkyColorByTemp(float temp) { return 0x525A52; }
}
public static class BiomeGenCraterOuter extends BiomeGenCraterBase {
public BiomeGenCraterOuter(int id) { super(id); }
@Override @SideOnly(Side.CLIENT)
public int getBiomeGrassColor(int x, int y, int z) {
double noise = plantNoise.func_151601_a((double) x * 0.225D, (double) z * 0.225D);
return noise < -0.1D ? 0x776F59 : 0x6F6752;
}
@Override @SideOnly(Side.CLIENT)
public int getBiomeFoliageColor(int x, int y, int z) { return 0x6A7039; }
@Override @SideOnly(Side.CLIENT)
public int getSkyColorByTemp(float temp) { return 0x6B9189; }
}
public static class BiomeGenCraterInner extends BiomeGenCraterBase {
public BiomeGenCraterInner(int id) { super(id); }
@Override @SideOnly(Side.CLIENT)
public int getBiomeGrassColor(int x, int y, int z) {
double noise = plantNoise.func_151601_a((double) x * 0.225D, (double) z * 0.225D);
return noise < -0.1D ? 0x404040 : 0x303030;
}
@Override @SideOnly(Side.CLIENT)
public int getBiomeFoliageColor(int x, int y, int z) { return 0x6A7039; }
@Override @SideOnly(Side.CLIENT)
public int getSkyColorByTemp(float temp) { return 0x424A42; }
}
}

View File

@ -5115,7 +5115,7 @@ tile.machine_forcefield.name=Forcefield Emitter
tile.machine_fraction_tower.name=Fractioning Tower tile.machine_fraction_tower.name=Fractioning Tower
tile.machine_fracking_tower.name=Hydraulic Fracking Tower tile.machine_fracking_tower.name=Hydraulic Fracking Tower
tile.machine_funnel.name=Combinator Funnel tile.machine_funnel.name=Combinator Funnel
tile.machine_funnel.desc=Automatically compresses items in a 2x2 or 3x3 crafting grid$Top: Input$Bottom: Output$Side: Output for clearing incredients tile.machine_funnel.desc=Automatically compresses items in a 2x2 or 3x3 crafting grid$Top: Input$Bottom: Output$Side: Output for clearing ingredients
tile.machine_gascent.name=Gas Centrifuge tile.machine_gascent.name=Gas Centrifuge
tile.machine_generator.name=Nuclear Reactor (Old) tile.machine_generator.name=Nuclear Reactor (Old)
tile.machine_geo.name=Geothermal Electric Generator tile.machine_geo.name=Geothermal Electric Generator

View File

@ -1987,6 +1987,9 @@ container.assembler=Сборочная машина
tile.machine_assemfac.name=Сборочный завод tile.machine_assemfac.name=Сборочный завод
tile.machine_autocrafter.name=Стол автокрафта tile.machine_autocrafter.name=Стол автокрафта
container.autocrafter=Стол автокрафта container.autocrafter=Стол автокрафта
container.machineFunnel=Комбинаторная воронка
tile.machine_funnel.name=Комбинаторная воронка
tile.machine_funnel.descАвтоматически сжимает предметы в сетке 2x2 или 3x3 для крафтинга$Верх: Вход$Низ: Выход$Бок: Выход для очистки ингредиентов
tile.machine_chemplant.name=Химическая установка tile.machine_chemplant.name=Химическая установка
container.chemplant=Химическая установка container.chemplant=Химическая установка
tile.machine_chemfac.name=Химический завод tile.machine_chemfac.name=Химический завод
@ -2431,6 +2434,16 @@ tile.rail_wood.name=Деревянные рельсы
container.trainTram=Трамвай с плоской платформой container.trainTram=Трамвай с плоской платформой
item.train.cargo_tram.name=Трамвай с плоской платформой item.train.cargo_tram.name=Трамвай с плоской платформой
tile.rail_large_buffer.name=Стандартный буферный упорный рельс (5м)
tile.rail_large_curve.name=Стандартная кривая колея (5м)
tile.rail_large_curve_7.name=Стандартная кривая колея (7м)
tile.rail_large_curve_9.name=Стандартная кривая рельса (9м)
tile.rail_large_ramp.name=Стандартная рампа (5м)
tile.rail_large_straight.name=Стандартная колея (5м)
tile.rail_large_straight_short.name=Стандартная колея (1м)
tile.rail_large_switch.name=Переключатель стандартной колеи (15м, левый)
tile.rail_large_switch_flipped.name=Переключатель стандартной колеи (15м, правый)
tile.factory_titanium_hull.name=Корпус базовой фабрики tile.factory_titanium_hull.name=Корпус базовой фабрики
tile.factory_titanium_furnace.name=Люк доступа базовой фабрики tile.factory_titanium_furnace.name=Люк доступа базовой фабрики
tile.factory_titanium_conductor.name=Порт электричества базовой фабрики tile.factory_titanium_conductor.name=Порт электричества базовой фабрики
@ -2750,11 +2763,10 @@ item.ingot_polymer.name=Полимер
item.ingot_rubber.name=Резина item.ingot_rubber.name=Резина
item.ingot_biorubber.name=Брусок латекса item.ingot_biorubber.name=Брусок латекса
item.ingot_polonium.name=Слиток полония-210 item.ingot_polonium.name=Слиток полония-210
item.bolt_dura_steel.name=Высокоскоростной стальной стержень
item.pipes_steel.name=Стальные трубы item.pipes_steel.name=Стальные трубы
item.pipes_steel.desc=Раскрафт был исключен из-за уклонения от уплаты налогов item.pipes_steel.desc=Раскрафт был исключен из-за уклонения от уплаты налогов
item.drill_titanium.name=Титановый бур item.drill_titanium.name=Титановый бур
item.bolt_tungsten.name=Вольфрамовый стержень item.bolt.name=%s стержень
item.bolt_compound.name=Укрепленный вал турбины item.bolt_compound.name=Укрепленный вал турбины
item.plate_polymer.name=Изолятор item.plate_polymer.name=Изолятор
item.ingot_solinium.name=Солиниевый слиток item.ingot_solinium.name=Солиниевый слиток
@ -5118,17 +5130,8 @@ item.mp_thruster_20_solid.name=Твердотопливный ракетный
item.mp_thruster_20_solid_multi.name=Твердотопливные 30-сопловые двигатели 20-го размера item.mp_thruster_20_solid_multi.name=Твердотопливные 30-сопловые двигатели 20-го размера
item.mp_thruster_20_solid_multier.name=Твердотопливные 47-сопловые двигатели 20-го размера item.mp_thruster_20_solid_multier.name=Твердотопливные 47-сопловые двигатели 20-го размера
item.missile_skin_camo.name=Скин Ракеты: Камуфляж
item.missile_skin_desert.name=Скин Ракеты: Пустынный Камуфляж
item.missile_skin_flames.name=Скин Ракеты: Sick Flames
item.missile_skin_manly_pink.name=Скин Ракеты: Мужественный Розовый
item.missile_skin_orange_insulation.name=Скин Ракеты: Оранжевый Изолятор
item.missile_skin_sleek.name=Скин Ракеты: IF-R&D
item.missile_skin_soviet_glory.name=Скин Ракеты: Советская Слава
item.missile_skin_soviet_stank.name=Скин Ракеты: Советская Вонь
item.missile_skin_metal.name=Скин Ракеты: Металл
item.missile_custom.name=Пользовательская Ракета item.missile_custom.name=Пользовательская Ракета
item.missile_stealth.name=Стелс-ракета
item.missile_carrier.name=Ракета-носитель HTR-01 item.missile_carrier.name=Ракета-носитель HTR-01
item.missile_soyuz.name=Союз-ФГ item.missile_soyuz.name=Союз-ФГ
@ -5147,6 +5150,7 @@ item.sat_chip.name=Спутниковый ID-чип
item.sat_interface.name=Интерфейс спутникового управления item.sat_interface.name=Интерфейс спутникового управления
item.sat_coord.name=Спутниковый целеуказатель item.sat_coord.name=Спутниковый целеуказатель
item.sat_designator.name=Спутниковый лазерный целеуказатель item.sat_designator.name=Спутниковый лазерный целеуказатель
item.sat_relay.name=Спутниковый радарный передатчик
tile.sat_mapper.name=Спутник для картографирования поверхности (Декор) tile.sat_mapper.name=Спутник для картографирования поверхности (Декор)
tile.sat_scanner.name=Спутник с модулем глубинно-ресурсного сканирования (Декор) tile.sat_scanner.name=Спутник с модулем глубинно-ресурсного сканирования (Декор)
tile.sat_radar.name=Спутник с радиолокационным зондированием (Декор) tile.sat_radar.name=Спутник с радиолокационным зондированием (Декор)

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B