day ruined

This commit is contained in:
Boblet 2026-04-21 15:54:04 +02:00
parent c0bfcb3819
commit 5ad6e0e337
5 changed files with 146 additions and 77 deletions

View File

@ -1,18 +0,0 @@
## Added
* Redstone-over-radio pager
* Item that receives RoR signals and displays them on the HUD info system
* Info contains the channel name, a shortened timestamp to tell apart equal signals sent on different ticks, and the actual signal
* Useful in various situations:
* Usable for remote monitoring, allowing critical things like reactor temperature and coolant flow to be checked even if not on-site
* Using RoR transmitters that are set to polling, it's now very easy to figure out if the chunk the transmitter is in is loaded
* An automated message system for various general alerts, easily doable by using an RoR transmitter with custom mappings (do mind the character limit, longer alerts may have to be sent sequentially)
* A simple way of getting live feedback from the RoR system, in order to detect when or if a system sends a signal, since other RoR receivers do not have a way of telling apart repeated identical signals
## Changed
* RoR readers can now read neutron flux from fuel channels and the fill state of boilers and heat exchangers
* Canned recursion can now be crafted from canned recursion
* Soldering recipes are now prioritized over anvil recipes in the NEI listing
* Paintable blocks now have tooltips explaining all the tools that can be used
## Fixed
* Fixed barrel connectors appearing between barrels even though they have different fluid types

View File

@ -2378,7 +2378,7 @@ public class ModBlocks {
GameRegistry.registerBlock(ore_fluorite, ore_fluorite.getUnlocalizedName());
GameRegistry.registerBlock(ore_beryllium, ore_beryllium.getUnlocalizedName());
GameRegistry.registerBlock(ore_lead, ore_lead.getUnlocalizedName());
GameRegistry.registerBlock(ore_oil, ItemBlockLore.class, ore_oil.getUnlocalizedName());
GameRegistry.registerBlock(ore_oil, ore_oil.getUnlocalizedName());
GameRegistry.registerBlock(ore_oil_empty, ore_oil_empty.getUnlocalizedName());
GameRegistry.registerBlock(ore_oil_sand, ore_oil_sand.getUnlocalizedName());
GameRegistry.registerBlock(ore_lignite, ore_lignite.getUnlocalizedName());

View File

@ -95,33 +95,21 @@ public class BlockOre extends Block {
if(this == ModBlocks.block_meteor_molten) {
return null;
}
if(this == ModBlocks.ore_oil) return ModItems.oil_tar;
return Item.getItemFromBlock(this);
}
@Override
public int quantityDropped(Random rand) {
if(this == ModBlocks.ore_fluorite) {
return 2 + rand.nextInt(3);
}
if(this == ModBlocks.ore_niter) {
return 2 + rand.nextInt(3);
}
if(this == ModBlocks.ore_sulfur || this == ModBlocks.ore_nether_sulfur) {
return 2 + rand.nextInt(3);
}
if(this == ModBlocks.block_meteor_broken) {
return 1 + rand.nextInt(3);
}
if(this == ModBlocks.block_meteor_treasure) {
return 1 + rand.nextInt(3);
}
if(this == ModBlocks.ore_cobalt) {
return 4 + rand.nextInt(6);
}
if(this == ModBlocks.ore_nether_cobalt) {
return 5 + rand.nextInt(8);
}
if(this == ModBlocks.ore_fluorite) return 2 + rand.nextInt(3);
if(this == ModBlocks.ore_niter) return 2 + rand.nextInt(3);
if(this == ModBlocks.ore_sulfur ||
this == ModBlocks.ore_nether_sulfur) return 2 + rand.nextInt(3);
if(this == ModBlocks.block_meteor_broken) return 1 + rand.nextInt(3);
if(this == ModBlocks.block_meteor_treasure) return 1 + rand.nextInt(3);
if(this == ModBlocks.ore_cobalt) return 4 + rand.nextInt(6);
if(this == ModBlocks.ore_nether_cobalt) return 5 + rand.nextInt(8);
return 1;
}
@ -138,12 +126,7 @@ public class BlockOre extends Block {
if(fortune > 0 && Item.getItemFromBlock(this) != this.getItemDropped(0, rand, fortune) && allowFortune) {
int mult = rand.nextInt(fortune + 2) - 1;
if(mult < 0) {
mult = 0;
}
return this.quantityDropped(rand) * (mult + 1);
return this.quantityDropped(rand) * (Math.max(mult, 0) + 1);
} else {
return this.quantityDropped(rand);
}
@ -156,24 +139,27 @@ public class BlockOre extends Block {
}
@Override
public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity) {
if(entity instanceof EntityLivingBase && this == ModBlocks.frozen_dirt) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2 * 60 * 20, 2));
}
if(entity instanceof EntityLivingBase && this == ModBlocks.block_trinitite) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 2));
}
if(entity instanceof EntityLivingBase && this == ModBlocks.block_waste) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 2));
}
if(entity instanceof EntityLivingBase && (this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 0));
}
if(entity instanceof EntityLivingBase && this == ModBlocks.brick_jungle_ooze) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 9));
}
if(entity instanceof EntityLivingBase && this == ModBlocks.brick_jungle_mystic) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.taint.id, 15 * 20, 2));
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
if(entity instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) entity;
if(this == ModBlocks.frozen_dirt) {
living.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2 * 60 * 20, 2));
}
if(this == ModBlocks.block_trinitite) {
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 2));
}
if(this == ModBlocks.block_waste) {
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 2));
}
if(this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red) {
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 0));
}
if(this == ModBlocks.brick_jungle_ooze) {
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 9));
}
if(this == ModBlocks.brick_jungle_mystic) {
living.addPotionEffect(new PotionEffect(HbmPotion.taint.id, 15 * 20, 2));
}
}
if(this == ModBlocks.block_meteor_molten)
@ -182,11 +168,11 @@ public class BlockOre extends Block {
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) {
super.randomDisplayTick(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_, p_149734_5_);
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
if(this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red || this == ModBlocks.block_trinitite || this == ModBlocks.block_waste) {
p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D);
world.spawnParticle("townaura", x + rand.nextFloat(), y + 1.1F, z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
}
}
@ -201,9 +187,8 @@ public class BlockOre extends Block {
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(this == ModBlocks.block_meteor_molten) {
if(!world.isRemote)
world.setBlock(x, y, z, ModBlocks.block_meteor_cobble);
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
if(!world.isRemote) world.setBlock(x, y, z, ModBlocks.block_meteor_cobble);
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
return;
}

View File

@ -28,11 +28,6 @@ public class ItemBlockLore extends ItemBlockBase {
list.add("Provides infinite charge to tesla coils");
}
if(this.field_150939_a == ModBlocks.ore_oil) {
list.add("You weren't supposed to mine that.");
list.add("Come on, get a derrick you doofus.");
}
if(this.field_150939_a == ModBlocks.gravel_diamond) {
list.add("There is some kind of joke here,");
list.add("but I can't quite tell what it is.");

View File

@ -2,14 +2,19 @@ package com.hbm.world.gen.terrain;
import java.util.function.Predicate;
import com.hbm.blocks.ModBlocks;
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;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.MapGenBase;
import net.minecraftforge.common.util.ForgeDirection;
public class MapGenBubble extends MapGenBase {
public class MapGenBubble extends MapGenBaseMeta {
/**
* Generates oil bubbles, which are generally wider than a chunk, in a safe + cascadeless manner
@ -23,6 +28,9 @@ public class MapGenBubble extends MapGenBase {
public int minY = 0;
public int rangeY = 25;
public int spotWidth = 10;
public int spotCount = 50;
public boolean fuzzy;
public Block block;
@ -73,7 +81,106 @@ public class MapGenBubble extends MapGenBase {
}
}
}
if(rand.nextInt(2) == 0) {
addSurfaceSpot(xCoord, zCoord, blocks);
}
}
}
protected void addSurfaceSpot(int xCoord, int zCoord, Block[] blocks) {
int deadMetaCount = EnumDeadPlantType.values().length;
// Add oil spot damage
for(int i = 0; i < spotCount; i++) {
int offX = (int)(rand.nextGaussian() * spotWidth);
int offZ = (int)(rand.nextGaussian() * spotWidth);
int rx = offX - xCoord;
int rz = offZ - zCoord;
if(rx >= 0 && rx < 16 && rz >= 0 && rz < 16) {
// 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);
if(blocks[subIndex] == Blocks.grass || blocks[subIndex] == Blocks.dirt) {
blocks[subIndex] = inner ? ModBlocks.dirt_oily : ModBlocks.dirt_dead;
// this generation occurs BEFORE decoration, so we have no plants to modify
// so we'll instead just add some new ones right now
if(!inner && oy == 0 && rand.nextInt(20) == 0) {
blocks[subIndex + 1] = ModBlocks.plant_dead;
metas[subIndex + 1] = (byte)rand.nextInt(deadMetaCount);
}
break;
} else if(blocks[subIndex] == Blocks.sand || blocks[subIndex] == ModBlocks.ore_oil_sand) {
if(metas[subIndex] == 1) {
blocks[subIndex] = ModBlocks.sand_dirty_red;
} else {
blocks[subIndex] = ModBlocks.sand_dirty;
}
break;
} else if(blocks[subIndex] == Blocks.stone) {
blocks[subIndex] = ModBlocks.stone_cracked;
break;
}
}
break;
}
}
}
}
// 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;
if(x >= 0 && x < 16 && z >= 0 && z < 16) {
int solids = 0;
for(int y = 127; y >= 0; y--) {
int index = (x * 16 + z) * 256 + y;
if(blocks[index] == null) continue;
if(blocks[index].getMaterial().isLiquid()) break;
if(blocks[index].isOpaqueCube()) {
solids++;
// this approach might break a little when the surface has holes and uneveness but i don't care lmao
if(i > 1) {
blocks[index] = ModBlocks.stone_cracked;
if(solids >= 4) break;
} else {
if(solids < 3) blocks[index] = Blocks.air;
if(solids == 3) blocks[index] = ModBlocks.oil_spill;
if(solids > 3 && solids < 7) blocks[index] = ModBlocks.stone_cracked;
if(solids >= 7) break;
}
}
}
}
}
}
}