i cast: ovorial obliteration

This commit is contained in:
Bob 2026-03-14 13:42:19 +01:00
parent 0bf5a82391
commit c408a66e97
14 changed files with 103 additions and 52 deletions

View File

@ -26,6 +26,7 @@
* Due to complaints, the MOX recipe was now made more expensive
* Manual control rods now have the `extendrods` command, which allows the target setting to be adjusted without using an absolute value
* Removed the legacy relay structure
* Placing RBMK fuel rods in the fuel channels by right click no longer consumes the item in creative mode
## Fixed
* Fixed some damage categories not applying correctly, causing things like general energy resistance to not work against lasers
@ -33,3 +34,5 @@
* Fixed a crash in multiplayer regarding RBMK control rods
* Fixed outdated QMAW description of some RBMK parts
* Fixed log spam when placing down a RoR controller
* Fixed the RBMK fuel crane being all jittery and awful
* Fixed RoR reader sending the xenon value on RBMK fuel rods that's 100x the intended value

View File

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

View File

@ -82,7 +82,7 @@ public class RBMKRod extends RBMKBase {
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKRod && rbmk.slots[0] == null) {
rbmk.slots[0] = player.getHeldItem().copy();
rbmk.slots[0].stackSize = 1;
player.getHeldItem().stackSize--;
if(!player.capabilities.isCreativeMode) player.getHeldItem().stackSize--;
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
return false;
}

View File

@ -58,7 +58,7 @@ public class ContainerRBMKRod extends Container {
var3 = var5.copy();
if(par2 <= rbmk.getSizeInventory() - 1) {
if(!rbmk.coldEnoughForManual()) return null;
if(!rbmk.coldEnoughForManual() && !player.capabilities.isCreativeMode) return null;
if(!this.mergeItemStack(var5, rbmk.getSizeInventory(), this.inventorySlots.size(), true)) {
return 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 (5629)";
public static final String VERSION = "1.0.27 BETA (5634)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -74,6 +74,8 @@ public class RenderRBMKConsole extends TileEntitySpecialRenderer {
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), (float) color, (float) color);
}
if(col.data.getByte("indicator") > 0) tess.setColorOpaque_F(1F, 1F, 0F);
drawColumn(tess, kx, ky, kz, 0, 0);
switch(col.type) {

View File

@ -61,6 +61,8 @@ public class RenderRBMKDisplay extends TileEntitySpecialRenderer {
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), (float) color, (float) color);
}
if(col.data.getByte("indicator") > 0) tess.setColorOpaque_F(1F, 1F, 0F);
drawColumn(tess, kx, ky, kz);
switch(col.type) {

View File

@ -46,11 +46,12 @@ public class RenderRBMKGauge extends TileEntitySpecialRenderer {
GL11.glPushMatrix();
GL11.glColor3f(ColorUtil.fr(unit.color), ColorUtil.fg(unit.color), ColorUtil.fb(unit.color));
double value = unit.lastRenderValue + (unit.renderValue - unit.lastRenderValue) * interp;
int lower = Math.min(unit.min, unit.max);
int upper = Math.max(unit.min, unit.max);
if(lower == upper) upper += 1;
int range = upper - lower;
double angle = (double) (unit.value - lower) / (double) range * 50D;
double angle = (double) (value - lower) / (double) range * 50D;
if(unit.min > unit.max) angle = 50 - angle;
angle = MathHelper.clamp_double(angle, 0, 80);

View File

@ -52,24 +52,48 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
public double lastPosLeft = 0;
public double posFront = 0;
public double posLeft = 0;
public double syncFront = 0;
public double syncLeft = 0;
private static final double speed = 0.05D;
private boolean goesDown = false;
public double lastProgress = 1D;
public double progress = 1D;
public double syncProgress = 1D;
private ItemStack loadedItem;
private boolean hasLoaded = false;
public double loadedHeat;
public double loadedEnrichment;
private int turnProgress;
@Override
public void updateEntity() {
if(worldObj.isRemote) {
lastTiltFront = tiltFront;
lastTiltLeft = tiltLeft;
lastPosFront = posFront;
lastPosLeft = posLeft;
lastProgress = progress;
if(this.turnProgress > 0) {
this.posFront = this.posFront + ((this.syncFront - this.posFront) / (double) this.turnProgress);
this.posLeft = this.posLeft + ((this.syncLeft - this.posLeft) / (double) this.turnProgress);
this.progress = this.progress + ((this.syncProgress - this.progress) / (double) this.turnProgress);
--this.turnProgress;
} else {
this.posFront = this.syncFront;
this.posLeft = this.syncLeft;
this.progress = this.syncProgress;
}
}
if(!worldObj.isRemote) {
TileEntityRBMKBase aboveColumn = this.getColumnAtPos();
if(aboveColumn != null) aboveColumn.craneIndicator = 10;
if(goesDown) {
@ -79,8 +103,8 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
progress = 0;
goesDown = false;
if(!worldObj.isRemote && this.canTargetInteract()) {
IRBMKLoadable column = getColumnAtPos();
if(aboveColumn instanceof IRBMKLoadable && this.canTargetInteract((IRBMKLoadable) aboveColumn)) {
IRBMKLoadable column = (IRBMKLoadable) aboveColumn;
if(column != null) { // canTargetInteract already assumes this, but there seems to be some freak race conditions that cause the column to be null anyway
if(this.loadedItem != null) {
column.load(this.loadedItem);
@ -103,6 +127,7 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
progress = 1D;
}
}
}
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
ForgeDirection side = dir.getRotation(ForgeDirection.UP);
@ -181,12 +206,10 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
}
public boolean isAboveValidTarget() {
return getColumnAtPos() != null;
return getLoadableAtPos() != null;
}
public boolean canTargetInteract() {
IRBMKLoadable column = getColumnAtPos();
public boolean canTargetInteract(IRBMKLoadable column) {
if(column == null)
return false;
@ -198,7 +221,7 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
}
}
public IRBMKLoadable getColumnAtPos() {
public TileEntityRBMKBase getColumnAtPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
ForgeDirection left = dir.getRotation(ForgeDirection.DOWN);
@ -214,15 +237,19 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
int[] pos = ((BlockDummyable)b).findCore(worldObj, x, y, z);
if(pos != null) {
TileEntityRBMKBase column = (TileEntityRBMKBase)worldObj.getTileEntity(pos[0], pos[1], pos[2]);
if(column instanceof IRBMKLoadable) {
return (IRBMKLoadable) column;
}
return column;
}
}
return null;
}
public IRBMKLoadable getLoadableAtPos() {
TileEntityRBMKBase column = this.getColumnAtPos();
if(column instanceof IRBMKLoadable) return (IRBMKLoadable) column;
return null;
}
@Override
public void serialize(ByteBuf buf) {
buf.writeBoolean(this.setUpCrane);
@ -239,6 +266,7 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
buf.writeInt(this.height);
buf.writeDouble(this.posFront);
buf.writeDouble(this.posLeft);
buf.writeDouble(this.progress);
buf.writeBoolean(this.hasItemLoaded());
buf.writeDouble(this.loadedHeat);
buf.writeDouble(this.loadedEnrichment);
@ -247,10 +275,6 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
@Override
public void deserialize(ByteBuf buf) {
lastPosFront = posFront;
lastPosLeft = posLeft;
lastProgress = progress;
this.setUpCrane = buf.readBoolean();
if (this.setUpCrane) {
this.craneRotationOffset = buf.readInt();
@ -262,8 +286,9 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
this.spanL = buf.readInt();
this.spanR = buf.readInt();
this.height = buf.readInt();
this.posFront = buf.readDouble();
this.posLeft = buf.readDouble();
this.syncFront = buf.readDouble();
this.syncLeft = buf.readDouble();
this.syncProgress = buf.readDouble();
this.hasLoaded = buf.readBoolean();
this.loadedHeat = buf.readDouble();
this.loadedEnrichment = buf.readDouble();

View File

@ -56,6 +56,7 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase {
public static final int maxWater = 16000;
public int reasimSteam;
public static final int maxSteam = 16000;
public int craneIndicator;
public static boolean explodeOnBroken = true;
@ -106,6 +107,8 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase {
if(!worldObj.isRemote) {
if(this.craneIndicator > 0) this.craneIndicator--;
this.worldObj.theProfiler.startSection("rbmkBase_heat_movement");
moveHeat();
if(RBMKDials.getReasimBoilers(worldObj)) {
@ -288,6 +291,7 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase {
buf.writeDouble(this.heat);
buf.writeInt(this.reasimWater);
buf.writeInt(this.reasimSteam);
buf.writeByte((byte) this.craneIndicator);
}
@Override
@ -295,6 +299,7 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase {
this.heat = buf.readDouble();
this.reasimWater = buf.readInt();
this.reasimSteam = buf.readInt();
this.craneIndicator = buf.readByte();
}
public void getDiagData(NBTTagCompound nbt) {

View File

@ -100,6 +100,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
columns[index] = new RBMKColumn(rbmk.getConsoleType(), rbmk.getNBTForConsole());
columns[index].data.setDouble("heat", rbmk.heat);
columns[index].data.setDouble("maxHeat", rbmk.maxHeat());
columns[index].data.setByte("indicator", (byte) rbmk.craneIndicator);
if(rbmk.isModerated()) columns[index].data.setBoolean("moderated", true); //false is the default anyway and not setting it when we don't need to reduces cruft
if(te instanceof TileEntityRBMKRod) {
@ -136,8 +137,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
RBMKColumn col = this.columns[i];
if(col == null)
continue;
if(col == null) continue;
switch(screen.type) {
case COL_TEMP:

View File

@ -81,6 +81,7 @@ public class TileEntityRBMKDisplay extends TileEntityLoadedBase {
columns[index] = new RBMKColumn(rbmk.getConsoleType(), rbmk.getNBTForConsole());
columns[index].data.setDouble("heat", rbmk.heat);
columns[index].data.setDouble("maxHeat", rbmk.maxHeat());
columns[index].data.setByte("indicator", (byte) rbmk.craneIndicator);
if(te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual control = (TileEntityRBMKControlManual) te;

View File

@ -41,6 +41,9 @@ public class TileEntityRBMKGauge extends TileEntityLoadedBase implements IGUIPro
for(int i = 0; i < 4; i++) this.gauges[i].update();
this.networkPackNT(50);
} else {
for(int i = 0; i < 4; i++) this.gauges[i].updateClient();
}
}
@ -86,6 +89,9 @@ public class TileEntityRBMKGauge extends TileEntityLoadedBase implements IGUIPro
public int max = 100;
/** The current read value of the gauge, i.e. the needle position */
public int value;
/** For smoothig */
public double renderValue;
public double lastRenderValue;
/** Whether this gauge is visible on the panel */
public boolean active;
@ -97,6 +103,12 @@ public class TileEntityRBMKGauge extends TileEntityLoadedBase implements IGUIPro
label = "Gauge " + (initialIndex + 1);
}
public void updateClient() {
this.lastRenderValue = this.renderValue;
double delta = value - renderValue;
this.renderValue += delta * 0.1D;
}
public void update() {
if(!active) return;
if(rtty == null || rtty.isEmpty()) return;

View File

@ -562,7 +562,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
if((PREFIX_VALUE + "rodheat").equals(name)) return "" + (int) ItemRBMKRod.getHullHeat(slots[0]);
if((PREFIX_VALUE + "depletion").equals(name)) return "" + (int) (100 - ItemRBMKRod.getEnrichment(slots[0]) * 100);
if((PREFIX_VALUE + "xenon").equals(name)) return "" + (int) (ItemRBMKRod.getPoison(slots[0]) * 100);
if((PREFIX_VALUE + "xenon").equals(name)) return "" + (int) (ItemRBMKRod.getPoison(slots[0]));
}
return null;
}