Compare commits

..

No commits in common. "c408a66e9702a76e54cfdda16aedcf4287d176fd" and "e8bbc53e36f21667f79d119c32f544d0ff7948de" have entirely different histories.

15 changed files with 51 additions and 102 deletions

View File

@ -26,7 +26,6 @@
* Due to complaints, the MOX recipe was now made more expensive * 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 * 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 * 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
* Fixed some damage categories not applying correctly, causing things like general energy resistance to not work against lasers * Fixed some damage categories not applying correctly, causing things like general energy resistance to not work against lasers
@ -34,5 +33,3 @@
* Fixed a crash in multiplayer regarding RBMK control rods * Fixed a crash in multiplayer regarding RBMK control rods
* Fixed outdated QMAW description of some RBMK parts * Fixed outdated QMAW description of some RBMK parts
* Fixed log spam when placing down a RoR controller * 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 mod_version=1.0.27
# Empty build number makes a release type # Empty build number makes a release type
mod_build_number=5634 mod_build_number=5629
credits=HbMinecraft,\ credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\ \ 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) { if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKRod && rbmk.slots[0] == null) {
rbmk.slots[0] = player.getHeldItem().copy(); rbmk.slots[0] = player.getHeldItem().copy();
rbmk.slots[0].stackSize = 1; rbmk.slots[0].stackSize = 1;
if(!player.capabilities.isCreativeMode) player.getHeldItem().stackSize--; player.getHeldItem().stackSize--;
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F); world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
return false; return false;
} }

View File

@ -58,7 +58,7 @@ public class ContainerRBMKRod extends Container {
var3 = var5.copy(); var3 = var5.copy();
if(par2 <= rbmk.getSizeInventory() - 1) { if(par2 <= rbmk.getSizeInventory() - 1) {
if(!rbmk.coldEnoughForManual() && !player.capabilities.isCreativeMode) return null; if(!rbmk.coldEnoughForManual()) return null;
if(!this.mergeItemStack(var5, rbmk.getSizeInventory(), this.inventorySlots.size(), true)) { if(!this.mergeItemStack(var5, rbmk.getSizeInventory(), this.inventorySlots.size(), true)) {
return null; return null;
} }

View File

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

View File

@ -74,8 +74,6 @@ public class RenderRBMKConsole extends TileEntitySpecialRenderer {
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), (float) color, (float) color); 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); drawColumn(tess, kx, ky, kz, 0, 0);
switch(col.type) { switch(col.type) {

View File

@ -61,8 +61,6 @@ public class RenderRBMKDisplay extends TileEntitySpecialRenderer {
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), (float) color, (float) color); 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); drawColumn(tess, kx, ky, kz);
switch(col.type) { switch(col.type) {

View File

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

View File

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

View File

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

View File

@ -100,7 +100,6 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
columns[index] = new RBMKColumn(rbmk.getConsoleType(), rbmk.getNBTForConsole()); columns[index] = new RBMKColumn(rbmk.getConsoleType(), rbmk.getNBTForConsole());
columns[index].data.setDouble("heat", rbmk.heat); columns[index].data.setDouble("heat", rbmk.heat);
columns[index].data.setDouble("maxHeat", rbmk.maxHeat()); 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(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) { if(te instanceof TileEntityRBMKRod) {
@ -137,7 +136,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
RBMKColumn col = this.columns[i]; RBMKColumn col = this.columns[i];
if(col == null) continue; if(col == null)
continue;
switch(screen.type) { switch(screen.type) {
case COL_TEMP: case COL_TEMP:

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB