mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
big oily men eating beans .com
This commit is contained in:
parent
5ad6e0e337
commit
ac7e303f92
17
changelog
17
changelog
@ -0,0 +1,17 @@
|
||||
## Changed
|
||||
* Updated russian and chinese localization
|
||||
* Oil bubbles are now 3x more common in deserts (biomes with a temperature value of 2 and rainfall of 0)
|
||||
* Oil bubbles now have a 50% chance of spawning a surface indicator (similar to bedrock oil but still distinct)
|
||||
* Oil deposits will never drop themselves, they always produce tar when mined
|
||||
* Any tar type can now be turned into bitumen in a mixer (with worse efficiency compared to a liquefactor)
|
||||
* RoR levers and indicator lights now have OpenComputers integration
|
||||
* Alexandrite dropped with fortune is now capped at 2 gems per ore
|
||||
* Added a config option for decreasing the soot requirement for skeleton guns (or rather, for the calculation, this number is added to the actual soot value, simulating a higher value)
|
||||
* Radioisotope cells and PT cells are now deprecated, and can no longer be crafted
|
||||
* Existing cells will continue to work for now
|
||||
* If two pipe anchors are connected, one having a type set and one still being "none", instead of erroring, the "none" pipe will assume the other one's type
|
||||
|
||||
## Fixed
|
||||
* Fixed uncrafting of the nickel RTG pellet not respecting item metadata
|
||||
* Tile entities that use fluids should now force the chunk they are in to be written to disk when unloaded
|
||||
* This should fix the issue where systems that constantly move fluids around may not properly save to disk
|
||||
@ -918,8 +918,8 @@ public class ModBlocks {
|
||||
public static Block field_disturber;
|
||||
|
||||
public static Block machine_rtg_grey;
|
||||
public static Block machine_minirtg;
|
||||
public static Block machine_powerrtg;
|
||||
@Deprecated public static Block machine_minirtg;
|
||||
@Deprecated public static Block machine_powerrtg;
|
||||
public static Block machine_radiolysis;
|
||||
public static Block machine_hephaestus;
|
||||
|
||||
@ -1844,8 +1844,8 @@ public class ModBlocks {
|
||||
field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber");
|
||||
|
||||
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg");
|
||||
machine_minirtg = new MachineMiniRTG(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_cell");
|
||||
machine_powerrtg = new MachineMiniRTG(Material.iron).setBlockName("machine_powerrtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_polonium");
|
||||
machine_minirtg = new MachineMiniRTG(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rtg_cell");
|
||||
machine_powerrtg = new MachineMiniRTG(Material.iron).setBlockName("machine_powerrtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rtg_polonium");
|
||||
machine_radiolysis = new MachineRadiolysis(Material.iron).setBlockName("machine_radiolysis").setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
machine_hephaestus = new MachineHephaestus(Material.iron).setBlockName("machine_hephaestus").setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
|
||||
@ -58,13 +58,8 @@ public class BlockDepthOre extends BlockDepth {
|
||||
|
||||
@Override
|
||||
public int quantityDroppedWithBonus(int fortune, Random rand) {
|
||||
|
||||
int mult = rand.nextInt(fortune + 2) - 1;
|
||||
|
||||
if(mult < 0) {
|
||||
mult = 0;
|
||||
}
|
||||
|
||||
return this.quantityDropped(rand) * (mult + 1);
|
||||
int quantity = this.quantityDropped(rand) * (Math.max(rand.nextInt(fortune + 2) - 1, 0) + 1);
|
||||
if(this == ModBlocks.ore_alexandrite && quantity > 2) quantity = 2;
|
||||
return quantity;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
@ -40,6 +41,12 @@ public class BlockOre extends Block {
|
||||
this.setTickRandomly(true);
|
||||
this.rad = rad;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSilkHarvest(World world, EntityPlayer player, int x, int y, int z, int meta) {
|
||||
if(this == ModBlocks.ore_oil) return false;
|
||||
return super.canSilkHarvest(world, player, x, y, z, meta);
|
||||
}
|
||||
|
||||
@Spaghetti("*throws up*")
|
||||
@Override
|
||||
|
||||
@ -28,6 +28,7 @@ public class MobConfig {
|
||||
public static boolean enableDucks = true;
|
||||
public static boolean enableMobGear = true;
|
||||
public static boolean enableMobWeapons = true;
|
||||
public static double mobWeaponSootReduction = 0;
|
||||
|
||||
public static boolean enableHives = true;
|
||||
public static int hiveSpawn = 256;
|
||||
@ -100,6 +101,7 @@ public class MobConfig {
|
||||
enableDucks = CommonConfig.createConfigBool(config, CATEGORY, "12.D00_enableDucks", "Whether pressing O should allow the player to duck", true);
|
||||
enableMobGear = CommonConfig.createConfigBool(config, CATEGORY, "12.D01_enableMobGear", "Whether zombies and skeletons should have additional gear when spawning", true);
|
||||
enableMobWeapons = CommonConfig.createConfigBool(config, CATEGORY, "12.D02_enableMobWeapons", "Whether skeletons should have bows replaced with guns when spawning at higher soot levels", true);
|
||||
mobWeaponSootReduction = CommonConfig.createConfigDouble(config, CATEGORY, "12.D03_mobWeaponSootReduction", "Reduces the amount of soot needed for skeleton guns to appear", 0D);
|
||||
|
||||
enableHives = CommonConfig.createConfigBool(config, CATEGORY, "12.G00_enableHives", "Whether glyphid hives should spawn", true);
|
||||
hiveSpawn = CommonConfig.createConfigInt(config, CATEGORY, "12.G01_hiveSpawn", "The average amount of chunks per hive", 256);
|
||||
|
||||
@ -250,9 +250,11 @@ public class MineralRecipes {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_mercury, 2), new Object[] { new ItemStack(ModItems.pellet_rtg_depleted, 1, DepletedRTGMaterial.MERCURY.ordinal()) });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_neptunium, 3), new Object[] { new ItemStack(ModItems.pellet_rtg_depleted, 1, DepletedRTGMaterial.NEPTUNIUM.ordinal()) });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_zirconium, 3), new Object[] { new ItemStack(ModItems.pellet_rtg_depleted, 1, DepletedRTGMaterial.ZIRCONIUM.ordinal()) });
|
||||
if(OreDictionary.doesOreNameExist("ingotNickel"))
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(OreDictionary.getOres("ingotNickel").get(0).getItem(), 2), new Object[] { new ItemStack(ModItems.pellet_rtg_depleted, 1, DepletedRTGMaterial.NICKEL.ordinal()) });
|
||||
|
||||
if(OreDictionary.doesOreNameExist("ingotNickel")) {
|
||||
ItemStack nickel = OreDictionary.getOres("ingotNickel").get(0).copy();
|
||||
nickel.stackSize = 2;
|
||||
GameRegistry.addShapelessRecipe(nickel, new Object[] { new ItemStack(ModItems.pellet_rtg_depleted, 1, DepletedRTGMaterial.NICKEL.ordinal()) });
|
||||
}
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_copper), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_copper });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_fluorite), 1), new Object[] { "###", "###", "###", '#', ModItems.fluorite });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_niter), 1), new Object[] { "###", "###", "###", '#', ModItems.niter });
|
||||
|
||||
@ -101,6 +101,7 @@ public class MixerRecipes extends SerializableRecipe {
|
||||
|
||||
register(Fluids.PERFLUOROMETHYL, new MixerRecipe(1000, 20).setStack1(new FluidStack(Fluids.PETROLEUM, 1000)).setStack2(new FluidStack(Fluids.UNSATURATEDS, 500)).setSolid(new OreDictStack(F.dust())));
|
||||
|
||||
register(Fluids.BITUMEN, new MixerRecipe(50, 20).setSolid(new OreDictStack(ANY_TAR.any())));
|
||||
}
|
||||
|
||||
public static void register(FluidType type, MixerRecipe... rec) {
|
||||
|
||||
@ -643,8 +643,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.GREEN.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', ANY_PLASTIC.ingot(), 'C', ModItems.powder_desh_mix,'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.RED.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.PINK.ordinal()), new Object[] { "ICI", "CPC", "ICI", 'I', BIGMT.ingot(), 'C', ModItems.powder_nitan_mix,'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.GREEN.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.decon, 1), new Object[] { "BGB", "SAS", "BSB", 'B', BE.ingot(), 'G', Blocks.iron_bars, 'S', STEEL.ingot(), 'A', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_minirtg, 1), new Object[] { "LLL", "PPP", "TRT", 'L', PB.plate(), 'P', PU238.billet(), 'T', ModItems.thermo_element, 'R', ModItems.rtg_unit });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_powerrtg, 1), new Object[] { "SRS", "PTP", "SRS", 'S', STAR.ingot(), 'R', ModItems.rtg_unit, 'P', PO210.billet(), 'T', TS.dust() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pink_planks, 4), new Object[] { "W", 'W', ModBlocks.pink_log });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pink_slab, 6), new Object[] { "WWW", 'W', ModBlocks.pink_planks });
|
||||
|
||||
@ -426,8 +426,10 @@ public class ModEventHandler {
|
||||
}
|
||||
|
||||
private static ItemStack getSkelegun(float soot, Random rand) {
|
||||
if (!MobConfig.enableMobWeapons) return null;
|
||||
if (rand.nextDouble() > Math.log(soot) * 0.25) return null;
|
||||
if(!MobConfig.enableMobWeapons) return null;
|
||||
|
||||
soot -= MobConfig.mobWeaponSootReduction;
|
||||
if(rand.nextDouble() > Math.log(soot) * 0.25) return null;
|
||||
|
||||
ArrayList<WeightedRandomObject> pool = new ArrayList<>();
|
||||
|
||||
@ -436,9 +438,9 @@ public class ModEventHandler {
|
||||
pool.add(new WeightedRandomObject(null, 20));
|
||||
} else if(soot > 0.3 && soot < 1) {
|
||||
pool.addAll(MobUtil.slotPoolGuns.get(0.3));
|
||||
} else if (soot < 3) {
|
||||
} else if(soot < 3) {
|
||||
pool.addAll(MobUtil.slotPoolGuns.get(1D));
|
||||
} else if (soot < 5) {
|
||||
} else if(soot < 5) {
|
||||
pool.addAll(MobUtil.slotPoolGuns.get(3D));
|
||||
} else {
|
||||
pool.addAll(MobUtil.slotPoolGuns.get(5D));
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.packet.toclient.BufPacket;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import api.hbm.fluidmk2.IFluidUserMK2;
|
||||
import api.hbm.tile.ILoadedTile;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
@ -28,6 +29,13 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
this.isLoaded = false;
|
||||
|
||||
if(this instanceof IFluidUserMK2) markChanged();
|
||||
}
|
||||
|
||||
/** The "chunks is modified, pls don't forget to save me" effect of markDirty, minus the block updates */
|
||||
public void markChanged() {
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
public AudioWrapper createAudioLoop() { return null; }
|
||||
@ -44,6 +52,9 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
|
||||
super.readFromNBT(nbt);
|
||||
this.muffled = nbt.getBoolean("muffled");
|
||||
this.tilted = nbt.getBoolean("tilted");
|
||||
|
||||
// one more for good measure
|
||||
if(this instanceof IFluidUserMK2) markChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -21,11 +21,6 @@ public abstract class TileEntityMachineBase extends TileEntityLoadedBase impleme
|
||||
slots = new ItemStack[slotCount];
|
||||
}
|
||||
|
||||
/** The "chunks is modified, pls don't forget to save me" effect of markDirty, minus the block updates */
|
||||
public void markChanged() {
|
||||
this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.uninos.UniNodespace;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
@ -92,13 +93,18 @@ public abstract class TileEntityPipelineBase extends TileEntityPipeBaseNT {
|
||||
* 0: Connected<br>
|
||||
* 1: Connections are incompatible<br>
|
||||
* 2: Both parties are the same block<br>
|
||||
* 3: Connection length exceeds maximum
|
||||
* 3: Connection length exceeds maximum<br>
|
||||
* 4: Pipeline fluid types do not match
|
||||
*/
|
||||
public static int canConnect(TileEntityPipelineBase first, TileEntityPipelineBase second) {
|
||||
|
||||
if(first.getConnectionType() != second.getConnectionType()) return 1;
|
||||
if(first == second) return 2;
|
||||
|
||||
// connect with NONE type anchors
|
||||
if(first.type == Fluids.NONE && second.type != first.type) first.setType(second.type);
|
||||
if(second.type == Fluids.NONE && first.type != second.type) second.setType(first.type);
|
||||
|
||||
if(first.type != second.type) return 4;
|
||||
|
||||
double len = Math.min(first.getMaxPipeLength(), second.getMaxPipeLength());
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.blocks.generic.BlockDeadPlant.EnumDeadPlantType;
|
||||
import com.hbm.world.gen.MapGenBaseMeta;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -27,9 +26,6 @@ public class MapGenBubble extends MapGenBaseMeta {
|
||||
|
||||
public int minY = 0;
|
||||
public int rangeY = 25;
|
||||
|
||||
public int spotWidth = 10;
|
||||
public int spotCount = 50;
|
||||
|
||||
public boolean fuzzy;
|
||||
|
||||
@ -51,7 +47,13 @@ public class MapGenBubble extends MapGenBaseMeta {
|
||||
|
||||
@Override
|
||||
protected void func_151538_a(World world, int offsetX, int offsetZ, int chunkX, int chunkZ, Block[] blocks) {
|
||||
if(rand.nextInt(frequency) == frequency - 1 && (canSpawn == null || canSpawn.test(world.getBiomeGenForCoords(offsetX * 16, offsetZ * 16)))) {
|
||||
|
||||
int effecFreq = frequency;
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(offsetX * 16, offsetZ * 16);
|
||||
if(biome.temperature >= 2 && biome.rainfall < 0.1) effecFreq /= 3;
|
||||
if(effecFreq <= 0) effecFreq = 1;
|
||||
|
||||
if(rand.nextInt(effecFreq) == effecFreq - 1 && (canSpawn == null || canSpawn.test(biome))) {
|
||||
int xCoord = (chunkX - offsetX) * 16 + rand.nextInt(16);
|
||||
int zCoord = (chunkZ - offsetZ) * 16 + rand.nextInt(16);
|
||||
|
||||
@ -82,7 +84,7 @@ public class MapGenBubble extends MapGenBaseMeta {
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.nextInt(2) == 0) {
|
||||
if(rand.nextInt(1) == 0) {
|
||||
addSurfaceSpot(xCoord, zCoord, blocks);
|
||||
}
|
||||
}
|
||||
@ -91,6 +93,8 @@ public class MapGenBubble extends MapGenBaseMeta {
|
||||
protected void addSurfaceSpot(int xCoord, int zCoord, Block[] blocks) {
|
||||
|
||||
int deadMetaCount = EnumDeadPlantType.values().length;
|
||||
int spotCount = 150;
|
||||
int spotWidth = 7;
|
||||
|
||||
// Add oil spot damage
|
||||
for(int i = 0; i < spotCount; i++) {
|
||||
@ -103,22 +107,13 @@ public class MapGenBubble extends MapGenBaseMeta {
|
||||
// find ground level
|
||||
for(int y = 127; y >= 0; y--) {
|
||||
int index = (rx * 16 + rz) * 256 + y;
|
||||
|
||||
if(blocks[index] != null) {
|
||||
Material mat = blocks[index].getMaterial();
|
||||
// clean up obstructions in forests
|
||||
if(mat == Material.leaves || mat == Material.wood || mat == Material.cactus) {
|
||||
blocks[index] = Blocks.air;
|
||||
metas[index] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(blocks[index] != null && blocks[index].isOpaqueCube()) {
|
||||
for(int oy = 1; oy > -3; oy--) {
|
||||
int subIndex = index + oy;
|
||||
|
||||
int distSq = offX * offX + offZ * offZ;
|
||||
boolean inner = distSq > (spotWidth / 3) * (spotWidth / 3);
|
||||
boolean inner = distSq < (spotWidth / 2) * (spotWidth / 2);
|
||||
|
||||
if(blocks[subIndex] == Blocks.grass || blocks[subIndex] == Blocks.dirt) {
|
||||
blocks[subIndex] = inner ? ModBlocks.dirt_oily : ModBlocks.dirt_dead;
|
||||
@ -153,8 +148,8 @@ public class MapGenBubble extends MapGenBaseMeta {
|
||||
// and now for the hole(tm)
|
||||
for(int i = 1; i < 6; i++) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
int x = xCoord - dir.offsetX;
|
||||
int z = zCoord - dir.offsetZ;
|
||||
int x = dir.offsetX - xCoord;
|
||||
int z = dir.offsetZ - zCoord;
|
||||
|
||||
if(x >= 0 && x < 16 && z >= 0 && z < 16) {
|
||||
int solids = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user