Skip to content

Commit

Permalink
Version 1.9.4 Release: RBMK Console
Browse files Browse the repository at this point in the history
Changed Stacksize of fuse and heat element to 16

Fixed Silo rotation
Fixed RBMK Steam Channel Capacity
Fixed Digamma Diagnostic Coords
  • Loading branch information
Alcatergit committed Apr 26, 2023
1 parent d79cb43 commit 853bc88
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 70 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/items/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public class ModItems {
public static final Item blades_schrabidium = new ItemBlades("blades_schrabidium", 250);
public static final Item blades_desh = new ItemBlades("blades_desh", 0).setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab);

public static final Item fuse = new ItemCustomLore("fuse").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab);
public static final Item fuse = new ItemCustomLore("fuse").setMaxStackSize(16).setCreativeTab(MainRegistry.controlTab);
public static final Item screwdriver = new ItemTooling(ToolType.SCREWDRIVER, 100, "screwdriver");
public static final Item hand_drill = new ItemTooling(ToolType.HAND_DRILL, 100, "hand_drill");
public static final Item redcoil_capacitor = new ItemCapacitor(10, "redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab);
Expand All @@ -460,7 +460,7 @@ public class ModItems {
public static final Item bismuth_tool = new ItemAmatExtractor("bismuth_tool").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab);
public static final Item overfuse = new ItemCustomLore("overfuse").setMaxStackSize(1).setFull3D();
public static final Item piston_selenium = new ItemBase("piston_selenium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1);
public static final Item thermo_element = new ItemBase("thermo_element").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab);
public static final Item thermo_element = new ItemBase("thermo_element").setMaxStackSize(16).setCreativeTab(MainRegistry.controlTab);
public static final Item antiknock = new ItemBase("antiknock").setCreativeTab(MainRegistry.controlTab);
public static final Item part_lithium = new ItemBase("part_lithium").setCreativeTab(MainRegistry.controlTab);
public static final Item part_beryllium = new ItemBase("part_beryllium").setCreativeTab(MainRegistry.controlTab);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/lib/RefStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech - Extended Edition";
public static final String VERSION = "NTM-Extended-1.12.2-1.9.3-d";
public static final String CHANGELOG = "$§2Added Colorable FEnSU$§3Changed Crystalizer texture$§3Changed Vortex Gun texture$§6Fixed Sellaline Bedrock Flood$§6Fixed Geiger Sounds";
public static final String VERSION = "NTM-Extended-1.12.2-1.9.4";
public static final String CHANGELOG = "$§2Added RBMk Lid jumping$§2Added RBMK Console Upgrade$§2Added Craftweaker Support$§2Added changelog print config$§2Added Geiger gui position config$§2Added Performance optimizations$§2Added Gradients to Fallout$§2Added acceleration to missiles$§2Added rocket sounds to missiles$§2Added ItemContam Rad threshold of 5 RAD/s$§3Changed PAA armor color to white$§3Changed Doors to be open on redstone signal$§3Changed WasteLeaves to be actual leaves$§6Fixed Gas moving lag$§6Fixed DFC Fuel balance$§6Fixed assembler recipe found$§6Fixed too long mushroom clouds$§6Fixed Gas and Explosive Gas Spawning$§6Fixed Crystallizer fluid acceptance$§6Fixed rocket exaust culling issues";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/main/ModEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ public void clientJoinServer(PlayerLoggedInEvent e) {
}

if(HTTPHandler.newVersion && GeneralConfig.changelog) {
e.player.sendMessage(new TextComponentString(eNICE - §aNew§e version §3" + HTTPHandler.versionNumber + "§e is available§r"));
e.player.sendMessage(new TextComponentString("§aNew§e version §3" + HTTPHandler.versionNumber + "§e is available§r"));
e.player.sendMessage(new TextComponentString("§ePlaying on version §7" + RefStrings.VERSION + "§e right now§r"));
if(HTTPHandler.changes != ""){
String[] lines = HTTPHandler.changes.split("\\$");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/render/misc/RenderScreenOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static void renderDigCounter(ScaledResolution resolution, float in, Gui g
// bar -= (1 + Minecraft.getMinecraft().theWorld.rand.nextInt(3));

int posX = RadiationConfig.digammaX;
int posY = resolution.getScaledHeight() - 36 - RadiationConfig.digammaY;
int posY = resolution.getScaledHeight() - 18 - RadiationConfig.digammaY;

Minecraft.getMinecraft().renderEngine.bindTexture(misc);
gui.drawTexturedModalRect(posX, posY, 0, 218, 94, 18);
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/hbm/render/tileentity/RenderSiloHatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public void render(TileEntitySiloHatch te, double x, double y, double z, float p
GL11.glPushMatrix();
GL11.glTranslated(x+0.5, y+0.595, z+0.5);
switch(te.getBlockMetadata()-2) {
case 0: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 1: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 0: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 1: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(180, 0F, 1F, 0F); break;
}
GL11.glTranslated(-3, 0, 0);
GL11.glTranslated(3, 0, 0);
GlStateManager.enableLighting();
GlStateManager.shadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.hatch_tex);
Expand Down
38 changes: 31 additions & 7 deletions src/main/java/com/hbm/tileentity/TileEntityDoorGeneric.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ public void update(){
}
}

if(world.isRemote) {

} else {
if(!world.isRemote) {
int[][] ranges = doorType.getDoorOpenRanges();
ForgeDirection dir = ForgeDirection.getOrientation(getBlockMetadata() - BlockDummyable.offset);
if(state == 3) {
Expand Down Expand Up @@ -144,10 +142,10 @@ public void update(){
}
PacketDispatcher.wrapper.sendToAllAround(new TEDoorAnimationPacket(pos, state, (byte)(shouldUseBB ? 1 : 0)), new TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 100));

if(redstonePower == -1 && state == 0){
tryToggle(-1);
} else if(redstonePower > 0 && state == 1){
tryToggle(-1);
if(redstonePower > 0){
tryOpen(-1);
} else {
tryClose(-1);
}
if(redstonePower == -1){
redstonePower = 0;
Expand Down Expand Up @@ -202,6 +200,19 @@ public boolean tryToggle(EntityPlayer player){
return false;
}

public boolean tryOpen(int passcode){
if(this.isLocked() && passcode != this.lock)
return false;
if(this.state == 0) {
if(!world.isRemote) {
this.state = 3;
broadcastControlEvt();
}
return true;
}
return false;
}

public boolean tryToggle(int passcode){
if(this.isLocked() && passcode != this.lock)
return false;
Expand All @@ -221,6 +232,19 @@ public boolean tryToggle(int passcode){
return false;
}

public boolean tryClose(int passcode){
if(this.isLocked() && passcode != this.lock)
return false;
if(this.state == 1) {
if(!world.isRemote) {
this.state = 2;
broadcastControlEvt();
}
return true;
}
return false;
}

@Override
public void open(){
if(state == 0)
Expand Down
32 changes: 21 additions & 11 deletions src/main/java/com/hbm/tileentity/machine/TileEntityBlastDoor.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public class TileEntityBlastDoor extends TileEntityLockableBase implements ITick
public int state = 0;
public long sysTime;
private int timer = 0;
public boolean redstoned = false;

@Override
public AxisAlignedBB getRenderBoundingBox() {
Expand All @@ -50,15 +49,13 @@ public double getMaxRenderDistanceSquared()
public void update() {
if(!world.isRemote) {

if(!isLocked() && world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up(6)) > 0) {
if(!isLocked()) {

if(!redstoned) {
this.tryToggle();
if(world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up(6)) > 0) {
this.tryOpen();
} else {
this.tryClose();
}
redstoned = true;

} else {
redstoned = false;
}

if(state != 1) {
Expand Down Expand Up @@ -118,6 +115,7 @@ public void open() {
PacketDispatcher.wrapper.sendToAllTracking(new TEVaultPacket(pos.getX(), pos.getY(), pos.getZ(), isOpening, state, 1, 0), new TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 150));
isOpening = true;
state = 1;
timer = 0;
broadcastControlEvt();
this.world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), HBMSoundHandler.reactorStart, SoundCategory.BLOCKS, 0.5F, 0.75F);
}
Expand All @@ -136,6 +134,7 @@ public void close() {

isOpening = false;
state = 1;
timer = 0;
broadcastControlEvt();
this.world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), HBMSoundHandler.reactorStart, SoundCategory.BLOCKS, 0.5F, 0.75F);
}
Expand Down Expand Up @@ -289,6 +288,13 @@ public boolean canClose() {
return state == 2;
}

public void tryOpen() {
if(canOpen()) {
open();
openNeigh();
}
}

public void tryToggle() {
if(canOpen()) {
open();
Expand All @@ -298,6 +304,13 @@ public void tryToggle() {
closeNeigh();
}
}

public void tryClose() {
if(canClose()) {
close();
closeNeigh();
}
}

public boolean placeDummy(BlockPos pos) {

Expand Down Expand Up @@ -331,7 +344,6 @@ public void readFromNBT(NBTTagCompound compound) {
state = compound.getInteger("state");
sysTime = compound.getLong("sysTime");
timer = compound.getInteger("timer");
redstoned = compound.getBoolean("redstoned");
super.readFromNBT(compound);
}

Expand All @@ -341,7 +353,6 @@ public NBTTagCompound writeToNBT(NBTTagCompound compound) {
compound.setInteger("state", state);
compound.setLong("sysTime", sysTime);
compound.setInteger("timer", timer);
compound.setBoolean("redstoned", redstoned);
return super.writeToNBT(compound);
}

Expand Down Expand Up @@ -383,5 +394,4 @@ public BlockPos getControlPos(){
public World getControlWorld(){
return getWorld();
}

}
29 changes: 23 additions & 6 deletions src/main/java/com/hbm/tileentity/machine/TileEntitySiloHatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class TileEntitySiloHatch extends TileEntityLockableBase implements ITick
public byte state = 0;
public long sysTime;
public int timer = -1;
public boolean redstoned = false;
public EnumFacing facing = null;
public AxisAlignedBB renderBox = null;

Expand All @@ -35,9 +34,11 @@ public void update() {
if(!world.isRemote){
if(!this.isLocked()){
boolean rs = world.isBlockIndirectlyGettingPowered(pos) > 0;
if(rs && !redstoned)
tryToggle();
redstoned = rs;
if(rs){
tryOpen();
} else {
tryClose();
}
}
int oldState = state;
if(timer < 0)
Expand Down Expand Up @@ -101,6 +102,24 @@ public void tryToggle() {
}
}

public void tryOpen() {
if(this.state == 0) {
if(!world.isRemote) {
this.state = 3;
timer = -1;
}
}
}

public void tryClose() {
if(this.state == 1) {
if(!world.isRemote) {
this.state = 2;
timer = -1;
}
}
}

public boolean placeDummy(BlockPos pos) {

if(!world.getBlockState(pos).getBlock().isReplaceable(world, pos))
Expand Down Expand Up @@ -129,14 +148,12 @@ public void removeDummy(BlockPos pos) {
@Override
public void readFromNBT(NBTTagCompound compound) {
state = compound.getByte("state");
redstoned = compound.getBoolean("redstoned");
super.readFromNBT(compound);
}

@Override
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
compound.setByte("state", state);
compound.setBoolean("redstoned", redstoned);
return super.writeToNBT(compound);
}

Expand Down
Loading

0 comments on commit 853bc88

Please sign in to comment.