sellafite variants, some torex tests

This commit is contained in:
Bob 2024-01-09 21:45:46 +01:00
parent 2feace3e71
commit abf0b858e6
12 changed files with 149 additions and 66 deletions

View File

@ -1,10 +1,14 @@
## 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
* 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.
* 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");
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_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");

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

@ -69,26 +69,29 @@ public class FalloutConfigJSON {
/* 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));
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)));
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).max(35).sol(true).mMa(Material.ground));
Block deepslate = Compat.tryLoadBlock(Compat.MOD_EF, "deepslate");
Block stone = Compat.tryLoadBlock(Compat.MOD_EF, "stone");
//FalloutEntry stoneCore = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 1, 1)).max(5).sol(true);
//FalloutEntry stoneInner = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 0, 1)).min(5).max(15).sol(true);
FalloutEntry stoneOuter = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).max(50).sol(true);
//entries.add(stoneCore.clone().mB(Blocks.stone));
//entries.add(stoneInner.clone().mB(Blocks.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));
for(int i = 1; i <= 10; i++) {
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, 10 - i, 1)).max(i * 5).sol(true).mMa(Material.rock));
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()
@ -105,40 +108,6 @@ public class FalloutConfigJSON {
entries.add(new FalloutEntry()
.mB(Blocks.clay)
.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) {

View File

@ -115,7 +115,7 @@ 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 < 50) return BiomeGenCraterBase.craterBiome;
if(scale >= 100 && dist < 55) return BiomeGenCraterBase.craterBiome;
if(scale >= 25) return BiomeGenCraterBase.craterOuterBiome;
return null;
}
@ -183,10 +183,6 @@ public class EntityFalloutRain extends Entity {
for(FalloutEntry entry : FalloutConfigJSON.entries) {
if(b == Blocks.grass) {
break;
}
if(entry.eval(worldObj, x, y, z, b, meta, dist)) {
if(entry.isSolid()) {
depth++;

View File

@ -59,6 +59,8 @@ public class EntityNukeTorex extends Entity {
if(worldObj.isRemote) {
if(ticksExisted == 1) this.setScale((float) s);
if(lastSpawnY == -1) {
lastSpawnY = posY - 3;
}
@ -82,7 +84,7 @@ public class EntityNukeTorex extends Entity {
double x = posX + rand.nextGaussian() * range;
double z = posZ + rand.nextGaussian() * range;
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);
}
@ -104,13 +106,44 @@ public class EntityNukeTorex extends Entity {
// spawn ring clouds
if(ticksExisted < 200) {
lifetime *= s;
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);
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);
}
}
// 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) {
cloud.update();
}
@ -131,7 +164,7 @@ public class EntityNukeTorex extends Entity {
}
public EntityNukeTorex setScale(float scale) {
getDataWatcher().updateObject(10, scale);
if(!worldObj.isRemote) getDataWatcher().updateObject(10, scale);
this.coreHeight = this.coreHeight / 1.5D * scale;
this.convectionHeight = this.convectionHeight / 1.5D * scale;
this.torusWidth = this.torusWidth / 1.5D * scale;
@ -270,6 +303,11 @@ public class EntityNukeTorex extends Entity {
this.motionX = motion.xCoord;
this.motionY = motion.yCoord;
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();
@ -281,6 +319,15 @@ public class EntityNukeTorex extends Entity {
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) {
/*Vec3 targetPos = Vec3.createVectorHelper(
@ -440,6 +487,11 @@ public class EntityNukeTorex extends Entity {
}
public Vec3 getInterpColor(float interp) {
if(this.type == TorexType.CONDENSATION) {
return Vec3.createVectorHelper(1F, 1F, 1F);
}
double greying = EntityNukeTorex.this.getGreying();
if(this.type == TorexType.RING) {
@ -453,7 +505,9 @@ public class EntityNukeTorex extends Entity {
}
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;
@ -479,7 +533,8 @@ public class EntityNukeTorex extends Entity {
public static enum TorexType {
STANDARD,
RING
RING,
CONDENSATION
}
@Override protected void writeEntityToNBT(NBTTagCompound nbt) { }

View File

@ -2,7 +2,9 @@ package com.hbm.items.tool;
import java.util.List;
import com.hbm.entity.effect.EntityNukeTorex;
import com.hbm.lib.Library;
import com.hbm.util.TrackerUtil;
import com.hbm.world.WorldUtil;
import com.hbm.world.biome.BiomeGenCraterBase;
@ -47,13 +49,13 @@ public class ItemWandD extends Item {
data.dust = 0F;
data.markDirty();*/
for(int i = -5; i <= 5; i++) {
/*for(int i = -5; i <= 5; i++) {
for(int j = -5; j <= 5; j++) {
WorldUtil.setBiome(world, pos.blockX + i, pos.blockZ + j, BiomeGenCraterBase.craterBiome);
}
}
WorldUtil.syncBiomeChange(world, pos.blockX, pos.blockZ);
WorldUtil.syncBiomeChange(world, pos.blockX, pos.blockZ);*/
/*EntityTomBlast tom = new EntityTomBlast(world);
tom.posX = pos.blockX;
@ -62,12 +64,11 @@ public class ItemWandD extends Item {
tom.destructionRange = 600;
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.setScale(1.5F);
torex.setType(1);
world.spawnEntityInWorld(torex);
TrackerUtil.setTrackingRange(world, torex, 1000);*/
TrackerUtil.setTrackingRange(world, torex, 1000);
/*EntityTracker entitytracker = ((WorldServer) world).getEntityTracker();
IntHashMap map = ReflectionHelper.getPrivateValue(EntityTracker.class, entitytracker, "trackedEntityIDs", "field_72794_c");

View File

@ -138,7 +138,7 @@ public class RenderTorex extends Render {
float f4 = ActiveRenderInfo.rotationXY;
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);
tess.setColorRGBA_F((float)color.xCoord * brightness, (float)color.yCoord * brightness, (float)color.zCoord * brightness, alpha);

View File

@ -6,6 +6,7 @@ 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 {
@ -20,6 +21,10 @@ public class BiomeGenCraterBase extends BiomeGenBase {
BiomeDictionary.registerBiomeType(craterOuterBiome, DRY, DEAD, WASTELAND);
}
public int getWaterColorMultiplier() {
return 0x505020; //0x50d030
}
public BiomeGenCraterBase(int id) {
super(id);
this.waterColorMultiplier = 0xE0FFAE; //swamp color

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