Merge branch 'HbmMods:master' into DipoleGUI

This commit is contained in:
WolfEclipses 2026-07-31 00:05:15 -04:00 committed by GitHub
commit 31141659cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 52 additions and 104 deletions

View File

@ -12,6 +12,7 @@
* Spy satellites now have the `getsmog` command, checking for soot pollution on the current target coordinate
* The research reactor and breeding reactor have been deprecated
* The reactors and the plate fuel no longer have recipes, but existing ones will continue to function until they run out of fuel
* Removed orphaned multiblock dummies clearing themselves via random ticks, only block updates can do that now
## Fixed
* Fixed pile fuel loader temperature reading not working
@ -23,4 +24,8 @@
* Fixed QMAW manual pages not being able to be overwritten by resource packs
* This feature was a major pain in the ass to actually make, and it apparently never even worked until now
* Fixed satellite groundstation losing its frequency on relog
* Added extra safeguarding preventing crashes caused by multiblock door tile entities not bound to the correct block
* Added extra safeguarding preventing crashes caused by multiblock door tile entities not bound to the correct block
* Fixed new pile rods now having radiation values
* Potentially fixed a multiblock migration issue where standard electricity pylons would disappear due to changes in expected metadata
* Fixed the pipe wrench assuming anchor pos 0/0/0 when NBT data is initialized as well as clearing all NBT data if a pipe connection is created
* Fixed tower base structures spawning in sandy biomes

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5768
mod_build_number=5771
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\

View File

@ -40,7 +40,6 @@ import net.minecraft.client.renderer.Tessellator;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Set;
import org.lwjgl.opengl.GL11;
@ -49,7 +48,6 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
public BlockDummyable(Material mat) {
super(mat);
this.setTickRandomly(true);
}
/// BLOCK METADATA ///
@ -81,26 +79,17 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
overrideTileMeta = 0;
}
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
super.onNeighborBlockChange(world, x, y, z, block);
if(safeRem)
return;
destroyIfOrphan(world, x, y, z);
}
public void updateTick(World world, int x, int y, int z, Random rand) {
super.updateTick(world, x, y, z, rand);
if(safeRem) return;
destroyIfOrphan(world, x, y, z);
}
private void destroyIfOrphan(World world, int x, int y, int z) {
if(world.isRemote)
return;
if(world.isRemote) return;
int metadata = world.getBlockMetadata(x, y, z);
@ -194,18 +183,10 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
ForgeDirection dir = ForgeDirection.NORTH;
if(i == 0) {
dir = ForgeDirection.getOrientation(2);
}
if(i == 1) {
dir = ForgeDirection.getOrientation(5);
}
if(i == 2) {
dir = ForgeDirection.getOrientation(3);
}
if(i == 3) {
dir = ForgeDirection.getOrientation(4);
}
if(i == 0) dir = ForgeDirection.getOrientation(2);
if(i == 1) dir = ForgeDirection.getOrientation(5);
if(i == 2) dir = ForgeDirection.getOrientation(3);
if(i == 3) dir = ForgeDirection.getOrientation(4);
dir = getDirModified(dir);
@ -373,20 +354,9 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
super.breakBlock(world, x, y, z, b, i);
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override public int getRenderType() { return -1; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
/**
* @returns an int array with six fields, describing the amount of dummy blocks in each direction around the core. order is UP, DOWN, FORWARD, BACKWARD, LEFT, RIGHT

View File

@ -22,8 +22,7 @@ public class PylonRedWire extends BlockDummyable implements ITooltipProvider {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityPylon();
if(meta == 0 || meta >= 12) return new TileEntityPylon();
return null;
}

View File

@ -96,36 +96,6 @@ public class MultiblockHandlerXR {
BlockDummyable.safeRem = false;
}
@Deprecated
public static void emptySpace(World world, int x, int y, int z, int[] dim, Block block, ForgeDirection dir) {
if(dim == null || dim.length != 6)
return;
int count = 0;
System.out.println("emptyspace is deprecated and shouldn't even be executed");
int[] rot = rotate(dim, dir);
for(int a = x - rot[4]; a <= x + rot[5]; a++) {
for(int b = y - rot[1]; b <= y + rot[0]; b++) {
for(int c = z - rot[2]; c <= z + rot[3]; c++) {
if(world.getBlock(a, b, c) == block)
world.setBlockToAir(a, b, c);
count++;
if(count > 2000) {
System.out.println("emptyspace: ded " + a + " " + b + " " + c);
return;
}
}
}
}
}
public static int[] rotate(int[] dim, ForgeDirection dir) {
if(dim == null) return null;
@ -148,27 +118,4 @@ public class MultiblockHandlerXR {
return dim;
}
public static double[] rotateDouble(double[] dim, ForgeDirection dir) {
if(dim == null) return null;
if(dir == ForgeDirection.SOUTH) return dim;
if(dir == ForgeDirection.NORTH) {
// U D N S W E
return new double[] { dim[0], dim[1], dim[3], dim[2], dim[5], dim[4] };
}
if(dir == ForgeDirection.EAST) {
// U D N S W E
return new double[] { dim[0], dim[1], dim[5], dim[4], dim[2], dim[3] };
}
if(dir == ForgeDirection.WEST) {
// U D N S W E
return new double[] { dim[0], dim[1], dim[4], dim[5], dim[3], dim[2] };
}
return dim;
}
}

View File

@ -14,6 +14,7 @@ import com.hbm.inventory.material.MaterialShapes;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
import com.hbm.items.machine.ItemPileRodMK2.EnumPileRod;
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
import com.hbm.items.machine.ItemWatzPellet.EnumWatzType;
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
@ -344,6 +345,14 @@ public class HazardRegistry {
registerRTGPellet(pellet_rtg_gold, au198 * rtg, 0, 5F);
registerRTGPellet(pellet_rtg_americium, am241 * rtg, 0);
HazardSystem.register(new ItemStack(pellet_rtg_depleted, 1, DepletedRTGMaterial.NEPTUNIUM.ordinal()), makeData(RADIATION, np237 * rtg));
HazardSystem.register(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.RA226BE.ordinal()), makeData(RADIATION, rabe * billet * 3));
HazardSystem.register(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PO210BE.ordinal()), makeData(RADIATION, pobe * billet * 3));
HazardSystem.register(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.NU.ordinal()), makeData(RADIATION, u * billet * 3));
HazardSystem.register(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PU239.ordinal()), makeData(RADIATION, pu239 * billet * 3));
HazardSystem.register(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.RGP.ordinal()), makeData(RADIATION, purg * billet * 3));
HazardSystem.register(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.WASTE.ordinal()), makeData(RADIATION, wst * billet * 3));
HazardSystem.register(pile_rod_uranium, makeData(RADIATION, u * billet * 3));
HazardSystem.register(pile_rod_pu239, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet + pu239 * billet + u * billet : purg * billet + pu239 * billet + wst * billet));

View File

@ -44,8 +44,11 @@ public class ItemWrench extends ItemSword {
TileEntity te = world.getTileEntity(x, y, z);
if(te != null && te instanceof TileEntityPipelineBase) {
if(stack.stackTagCompound == null)
stack.stackTagCompound = new NBTTagCompound();
if(stack.stackTagCompound == null) {
if(!stack.stackTagCompound.hasKey("x")) {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setInteger("x", x);
@ -77,13 +80,18 @@ public class ItemWrench extends ItemSword {
case 3: player.addChatMessage(new ChatComponentText("Pipe error - Pipe anchor is too far away")); break;
case 4: player.addChatMessage(new ChatComponentText("Pipe error - Pipe anchor fluid types do not match")); break;
}
stack.stackTagCompound = null;
stack.stackTagCompound.removeTag("x");
stack.stackTagCompound.removeTag("y");
stack.stackTagCompound.removeTag("z");
} else {
stack.stackTagCompound.removeTag("x");
stack.stackTagCompound.removeTag("y");
stack.stackTagCompound.removeTag("z");
player.addChatMessage(new ChatComponentText("Pipe error"));
stack.stackTagCompound = null;
}
}

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (5768)";
public static final String VERSION = "1.0.27 BETA (5771)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -17,7 +17,6 @@ public abstract class SatelliteBase {
public static final String CMD_GETTARGETX = "gettargetx";
public static final String CMD_GETTARGETZ = "gettargetz";
public int range = 1_000;
public int targetX;
public int targetZ;

View File

@ -11,6 +11,17 @@ import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityPylon extends TileEntityPylonBase {
@Override
public void updateEntity() {
// migration
if(!worldObj.isRemote && this.getBlockMetadata() == 0) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 12, 3);
}
super.updateEntity();
}
@Override
public ConnectionType getConnectionType() {
return ConnectionType.SINGLE;

View File

@ -254,7 +254,7 @@ public class NTMWorldGenerator implements IWorldGenerator {
spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsJSpawnWeight : 0;
}});
NBTStructure.registerStructure(0, new SpawnCondition("tower_base") {{
canSpawn = biome -> biome.heightVariation <= 0.3F && !isWaterBiome(biome);
canSpawn = biome -> biome.heightVariation <= 0.3F && !isWaterBiome(biome) && !BiomeDictionary.isBiomeOfType(biome, Type.SANDY);
structure = new JigsawPiece("tower_base", StructureManager.tower_base, -6);
spawnWeight = StructureConfig.towerBaseSpawnWeight;
}});