but-on, press but-on, yep yep yep yep yep

This commit is contained in:
Boblet 2026-03-12 15:25:16 +01:00
parent 2049a05649
commit 06c8928229
14 changed files with 133 additions and 62 deletions

View File

@ -14,8 +14,10 @@
* Updated the SILEX recycling recipe for MOX fuel to reflect the recent recipe change
* High-xenon MOX pellets now yield xenon-135 again
* Improved logging for incorrectly configured machine recipes
* Removed the legacy toolbox item
## Fixed
* Fixed some damage categories not applying correctly, causing things like general energy resistance to not work against lasers
* Fixed RoR components not being able to be attached to the top of reasim fuel rods
* Fixed a crash in multiplayer regarding RBMK control rods
* Fixed incorrect QMAW description of the autoloader, talking about fuel depletion instead of fuel enrichment

View File

@ -2061,7 +2061,6 @@ public class ModItems {
public static Item hazmat_grey_kit;
public static Item kit_custom;
public static Item legacy_toolbox;
public static Item toolbox;
public static Item loot_10;
@ -3956,9 +3955,8 @@ public class ModItems {
hazmat_kit = new ItemStarterKit().setUnlocalizedName("hazmat_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":hazmat_kit");
hazmat_red_kit = new ItemStarterKit().setUnlocalizedName("hazmat_red_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":hazmat_red_kit");
hazmat_grey_kit = new ItemStarterKit().setUnlocalizedName("hazmat_grey_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":hazmat_grey_kit");
kit_custom = new ItemKitCustom().setUnlocalizedName("kit_custom").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":kit");
kit_custom = new ItemKitCustom().setUnlocalizedName("kit_custom").setCreativeTab(null).setTextureName(RefStrings.MODID + ":kit");
toolbox = new ItemToolBox().setUnlocalizedName("toolbox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":kit_toolbox");
legacy_toolbox = new ItemKitNBT().setUnlocalizedName("toolbox_legacy").setContainerItem(toolbox).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":kit_toolbox");
loot_10 = new ItemLootCrate().setUnlocalizedName("loot_10").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":loot_10");
loot_15 = new ItemLootCrate().setUnlocalizedName("loot_15").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":loot_15");
@ -6671,7 +6669,6 @@ public class ModItems {
GameRegistry.registerItem(hazmat_grey_kit, hazmat_grey_kit.getUnlocalizedName());
GameRegistry.registerItem(kit_custom, kit_custom.getUnlocalizedName());
GameRegistry.registerItem(euphemium_kit, euphemium_kit.getUnlocalizedName());
GameRegistry.registerItem(legacy_toolbox, legacy_toolbox.getUnlocalizedName());
GameRegistry.registerItem(toolbox, toolbox.getUnlocalizedName());
//Misile Loot Boxes

View File

@ -68,7 +68,7 @@ public class ItemKitNBT extends Item {
}
public static ItemStack create(ItemStack... contents) {
ItemStack stack = new ItemStack(ModItems.legacy_toolbox);
ItemStack stack = new ItemStack(ModItems.kit_custom);
stack.stackTagCompound = new NBTTagCompound();
ItemStackUtil.addStacksToNBT(stack, contents);

View File

@ -792,7 +792,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_inlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', IRON.plate(), 'B', ModItems.tank_steel });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_outlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.tank_steel });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_display, 1), new Object[] { "B", "C", "D", 'B', B.ingot(), 'D', ModBlocks.deco_rbmk, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
//addRecipeAuto(new ItemStack(ModBlocks.rbmk_heatex, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.pipes_steel });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_key_pad, 1), new Object[] { "B", "C", "D", 'B', ModBlocks.radio_torch_sender, 'D', ModBlocks.deco_rbmk, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG) });
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk, 8), new Object[] { "R", 'R', ModBlocks.rbmk_blank });
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk_smooth, 1), new Object[] { "R", 'R', ModBlocks.deco_rbmk });

View File

@ -1516,6 +1516,7 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.tritium_deuterium_cake");
ignoreMappings.add("hbm:item.redcoil_capacitor");
ignoreMappings.add("hbm:item.euphemium_capacitor");
ignoreMappings.add("hbm:item.toolbox_legacy");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
@ -1523,7 +1524,6 @@ public class MainRegistry {
remapItems.put("hbm:item.briquette_lignite", ModItems.briquette);
remapItems.put("hbm:item.antiknock", ModItems.fuel_additive);
remapItems.put("hbm:item.kit_toolbox_empty", ModItems.toolbox);
remapItems.put("hbm:item.kit_toolbox", ModItems.legacy_toolbox);
for(MissingMapping mapping : event.get()) {

View File

@ -1624,6 +1624,7 @@ public class ResourceManager {
public static final ResourceLocation rbmk_crane_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_crane.png");
public static final ResourceLocation rbmk_autoloader_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_autoloader.png");
public static final ResourceLocation rbmk_console_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_control.png");
public static final ResourceLocation rbmk_keypad_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/keypad.png");
public static final HFRWavefrontObject hev_battery = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/battery.obj")).noSmooth();
public static final HFRWavefrontObject anvil = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/anvil.obj")).noSmooth();
public static final HFRWavefrontObject crystal_power = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/crystals_power.obj")).noSmooth();

View File

@ -35,25 +35,27 @@ public class RenderRBMKKeyPad extends TileEntitySpecialRenderer {
KeyUnit key = keypad.keys[i];
if(!key.active) continue;
boolean glow = !(key.polling && !key.isPressed);
float mult = glow ? 1F : 0.5F;
boolean glow = key.isPressed;
float mult = glow ? 1F : 0.65F;
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glTranslated(0.25, (i / 2) * -0.5 + 0.25, (i % 2) * -0.5 + 0.25);
GL11.glColor3f(0.5F, 0.5F, 0.5F);
GL11.glColor3f(1F, 1F, 1F);
this.bindTexture(ResourceManager.rbmk_keypad_tex);
ResourceManager.rbmk_button.renderPart("Socket");
GL11.glPushMatrix();
GL11.glTranslated((key.polling && key.isPressed) ? -0.03125 : 0, 0, 0);
GL11.glTranslated(key.isPressed ? -0.03125 : 0, 0, 0);
GL11.glColor3f(ColorUtil.fr(key.color) * mult, ColorUtil.fg(key.color) * mult, ColorUtil.fb(key.color) * mult);
if(glow) RenderArcFurnace.fullbright(true);
if(glow) {
RenderArcFurnace.fullbright(true);
GL11.glEnable(GL11.GL_LIGHTING); // we want a glow, but normal lighting should still apply
}
ResourceManager.rbmk_button.renderPart("Button");
if(glow) RenderArcFurnace.fullbright(false);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
FontRenderer font = Minecraft.getMinecraft().fontRenderer;

View File

@ -55,6 +55,20 @@ public class TileEntityRBMKKeyPad extends TileEntityLoadedBase implements IGUIPr
for(int i = 0; i < 4; i++) this.keys[i].deserialize(buf);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
for(int i = 0; i < 4; i++) this.keys[i].readFromNBT(nbt, i);
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
for(int i = 0; i < 4; i++) this.keys[i].writeToNBT(nbt, i);
}
public class KeyUnit {
/** If the output should be per tick, allows the "is pressed" state */
@ -64,13 +78,15 @@ public class TileEntityRBMKKeyPad extends TileEntityLoadedBase implements IGUIPr
/** Color of the button as rendered on the panel */
public int color;
/** Label on the button as rendered on the panel */
public String label;
public String label = "";
/** What channel to send the command over */
public String rtty;
public String rtty = "";
/** What to send when pressed */
public String command;
public String command = "";
/** Whether this button is enabled and can be pressed */
public boolean active;
/** For non-polling buttons, the time until the button visually upresses */
public int clickTimer;
public KeyUnit(int initialIndex) {
if(initialIndex == 0) color = 0xff0000;
@ -85,6 +101,8 @@ public class TileEntityRBMKKeyPad extends TileEntityLoadedBase implements IGUIPr
if(!polling) {
if(canSend()) RTTYSystem.broadcast(worldObj, rtty, command);
this.isPressed = true;
this.clickTimer = 10;
} else {
this.isPressed = !this.isPressed;
TileEntityRBMKKeyPad.this.markDirty();
@ -97,6 +115,10 @@ public class TileEntityRBMKKeyPad extends TileEntityLoadedBase implements IGUIPr
if(polling && isPressed) {
if(canSend()) RTTYSystem.broadcast(worldObj, rtty, command);
}
if(!polling && isPressed) {
if(this.clickTimer-- <= 0) this.isPressed = false;
}
}
public boolean canSend() {
@ -106,7 +128,7 @@ public class TileEntityRBMKKeyPad extends TileEntityLoadedBase implements IGUIPr
public void serialize(ByteBuf buf) {
buf.writeBoolean(active);
buf.writeBoolean(polling);
if(polling) buf.writeBoolean(isPressed);
buf.writeBoolean(isPressed);
buf.writeInt(color);
BufferUtil.writeString(buf, label);
BufferUtil.writeString(buf, rtty);
@ -116,12 +138,32 @@ public class TileEntityRBMKKeyPad extends TileEntityLoadedBase implements IGUIPr
public void deserialize(ByteBuf buf) {
active = buf.readBoolean();
polling = buf.readBoolean();
if(polling) isPressed = buf.readBoolean();
isPressed = buf.readBoolean();
color = buf.readInt();
label = BufferUtil.readString(buf);
rtty = BufferUtil.readString(buf);
command = BufferUtil.readString(buf);
}
public void readFromNBT(NBTTagCompound nbt, int index) {
this.active = nbt.getBoolean("active" + index);
this.polling = nbt.getBoolean("polling" + index);
this.isPressed = nbt.getBoolean("isPressed" + index);
this.color = nbt.getInteger("color" + index);
this.label = nbt.getString("label" + index);
this.rtty = nbt.getString("rtty" + index);
this.command = nbt.getString("command" + index);
}
public void writeToNBT(NBTTagCompound nbt, int index) {
nbt.setBoolean("active" + index, active);
nbt.setBoolean("polling" + index, polling);
nbt.setBoolean("isPressed" + index, isPressed);
nbt.setInteger("color" + index, color);
nbt.setString("label" + index, label);
nbt.setString("rtty" + index, rtty);
nbt.setString("command" + index, command);
}
}
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; }

View File

@ -463,6 +463,7 @@ container.rbmkBoiler=RBMK Dampfkanal
container.rbmkControl=RBMK Steuerstäbe
container.rbmkControlAuto=RBMK Automatische Steuerstäbe
container.rbmkHeater=RBMK Heizer
container.rbmkKeyPad=Redstone-over-Radio Tastenfeld
container.rbmkOutgasser=RBMK Bestrahlungskanal
container.rbmkReaSim=RBMK Brennstäbe (ReaSim)
container.rbmkRod=RBMK Brennstäbe
@ -4889,6 +4890,7 @@ tile.rbmk_control_reasim_auto.name=RBMK Automatische Steuerstäbe (ReaSim)
tile.rbmk_crane_console.name=RBMK Kransteuerung
tile.rbmk_display.name=RBMK Anzeigepanel
tile.rbmk_heater.name=RBMK-Heizer
tile.rbmk_key_pad.name=Redstone-over-Radio Tastenfeld
tile.rbmk_loader.name=RBMK-Dampfadapter
tile.rbmk_moderator.name=RBMK Graphitmoderator
tile.rbmk_outgasser.name=RBMK Bestrahlungskanal

View File

@ -870,6 +870,7 @@ container.rbmkBoiler=RBMK Steam Channel
container.rbmkControl=RBMK Control Rods
container.rbmkControlAuto=RBMK Automatic Control Rods
container.rbmkHeater=RBMK Fluid Heater
container.rbmkKeyPad=Redstone-over-Radio Keypad
container.rbmkOutgasser=RBMK Irradiation Channel
container.rbmkReaSim=RBMK Fuel Rod (ReaSim)
container.rbmkRod=RBMK Fuel Rod
@ -6168,6 +6169,7 @@ tile.rbmk_control_reasim_auto.name=RBMK Automatic Control Rods (ReaSim)
tile.rbmk_crane_console.name=RBMK Crane Console
tile.rbmk_display.name=RBMK Display Panel
tile.rbmk_heater.name=RBMK Fluid Heater
tile.rbmk_key_pad.name=Redstone-over-Radio Keypad
tile.rbmk_loader.name=RBMK Steam Connector
tile.rbmk_loader.desc=Allows RBMKs to have both water and steam connections at the bottom$Place one water pipe below the RBMK column, then the connector,$then connect the steam duct to the connector.
tile.rbmk_moderator.name=RBMK Graphite Moderator

View File

@ -7,7 +7,6 @@
"zh_CN": "RBMK燃料自动装填机"
},
"content": {
"en_US": "The autoloader is an advanced component of an [[RBMK]] that can be placed on top of [[fuel channels|RBMK Fuel Channel]]. The autoloader has two inventory grids, one for fresh fuel, and one for spent fuel, as well as a selector for the fuel depletion percentage which can be changed in 5% increments. If the [[fuel rod's|RBMK Fuel Rod]] depletion of the connected fuel channel exceeds the configured percentage, the autoloader will drop down, remove the spent fuel and insert a new fuel rod. The autoloader can be automated using hoppers or conveyors, the item access ports are on the very top.",
"zh_CN": "RBMK燃料自动装填机是一种高级的[[RBMK]]部件, 需要放置在[[燃料通道|RBMK Fuel Channel]]的顶部。燃料自动装填机的物品栏内有两组格子, 一组用于储存新燃料另一组用于储存使用过的燃料其GUI中还有一个用 于设定燃料消耗程度的框分度值为5%。若下方[[燃料棒|RBMK Fuel Rod]]的消耗 程度超过了设定的比例,燃料自动装填机就会下降并拔出使用过的燃料棒,同 时插入新燃料棒。燃料自动装填机可通过漏斗或传送带自动化,其物品接口位 于最顶部。"
"en_US": "The autoloader is an advanced component of an [[RBMK]] that can be placed on top of [[fuel channels|RBMK Fuel Channel]]. The autoloader has two inventory grids, one for fresh fuel, and one for spent fuel, as well as a selector for the fuel enrichment percentage (i.e. 100% - depletion percentage) which can be changed in 5% increments. If the [[fuel rod's|RBMK Fuel Rod]] enrichment of the connected fuel channel is lower than the configured percentage, the autoloader will drop down, remove the spent fuel and insert a new fuel rod. The autoloader can be automated using hoppers or conveyors, the item access ports are on the very top."
}
}

View File

@ -1,52 +1,76 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
o Socket
v 0.062500 0.718750 0.156250
v 0.000000 0.406250 -0.156250
v 0.062500 0.406250 0.156250
v 0.000000 0.406250 0.156250
v 0.062500 0.718750 0.156250
v 0.000000 0.718750 0.156250
v 0.000000 0.718750 -0.156250
v 0.062500 0.406250 -0.156250
v 0.062500 0.718750 -0.156250
v 0.000000 0.718750 -0.156250
v 0.000000 0.406250 -0.156250
v 0.000000 0.718750 0.156250
v 0.000000 0.406250 0.156250
vn 0.0000 -1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vt 0.076923 0.857143
vt 0.461538 1.000000
vt 0.076923 1.000000
vt 0.461538 0.142857
vt 0.461538 0.857143
vt 0.538462 0.142857
vt 0.538462 0.857143
vt 0.076923 0.000000
vt 0.461538 0.000000
vt 0.076923 0.142857
vt 0.000000 0.857143
vt 0.000000 0.142857
vn 0.0000 1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 -0.0000 1.0000
s off
f 6//1 2//1 8//1
f 8//2 1//2 7//2
f 5//3 3//3 6//3
f 7//4 4//4 5//4
f 4//5 2//5 3//5
f 6//1 3//1 2//1
f 8//2 2//2 1//2
f 5//3 4//3 3//3
f 7//4 1//4 4//4
f 4//5 1//5 2//5
f 4/1/1 6/2/1 5/3/1
f 4/1/2 7/4/2 8/5/2
f 8/5/3 1/6/3 6/7/3
f 7/4/4 3/8/4 1/9/4
f 2/10/5 5/11/5 3/12/5
f 4/1/1 8/5/1 6/2/1
f 4/1/2 2/10/2 7/4/2
f 8/5/3 7/4/3 1/6/3
f 7/4/4 2/10/4 3/8/4
f 2/10/5 4/1/5 5/11/5
o Button
v 0.062500 0.437500 0.125000
v 0.062500 0.687500 0.125000
v 0.062500 0.437500 -0.125000
v 0.062500 0.687500 -0.125000
v 0.125000 0.687500 -0.125000
v 0.125000 0.437500 -0.125000
v 0.125000 0.437500 0.125000
v 0.125000 0.437500 -0.125000
v 0.062500 0.687500 0.125000
v 0.062500 0.687500 -0.125000
v 0.062500 0.437500 -0.125000
v 0.062500 0.437500 0.125000
v 0.125000 0.687500 0.125000
vn 1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 0.0000 1.0000
vt 0.615385 0.285714
vt 0.538462 0.857143
vt 0.538462 0.285714
vt 0.923077 0.285714
vt 0.615385 0.142857
vt 0.923077 0.142857
vt 0.615385 0.857143
vt 0.923077 1.000000
vt 0.615385 1.000000
vt 0.923077 0.857143
vt 1.000000 0.285714
vt 1.000000 0.857143
vn 0.0000 -0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
s off
f 13//6 15//6 14//6
f 10//7 13//7 12//7
f 12//8 14//8 11//8
f 9//9 16//9 10//9
f 11//10 15//10 9//10
f 13//6 16//6 15//6
f 10//7 16//7 13//7
f 12//8 13//8 14//8
f 9//9 15//9 16//9
f 11//10 14//10 15//10
f 10/13/6 12/14/6 15/15/6
f 11/16/7 15/17/7 14/18/7
f 16/19/8 13/20/8 12/21/8
f 16/19/9 11/16/9 9/22/9
f 9/22/10 14/23/10 13/24/10
f 10/13/6 16/19/6 12/14/6
f 11/16/7 10/13/7 15/17/7
f 16/19/8 9/22/8 13/20/8
f 16/19/9 10/13/9 11/16/9
f 9/22/10 11/16/10 14/23/10

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 397 B