RBMK guidebook almost completed

This commit is contained in:
Bob 2021-05-15 18:04:18 +02:00
parent dfc8749fbe
commit df55b5e5f6
23 changed files with 171 additions and 40 deletions

View File

@ -774,6 +774,9 @@ public class ModBlocks {
public static Block machine_large_turbine;
public static final int guiID_machine_large_turbine = 100;
public static Block machine_deaerator;
public static final int guiID_machine_deaerator = 74;
public static Block machine_drill;
public static Block drill_pipe;
public static final int guiID_machine_drill = 45;
@ -1731,6 +1734,8 @@ public class ModBlocks {
machine_turbine = new MachineTurbine(Material.iron).setBlockName("machine_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbine");
machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine");
machine_deaerator = new MachineDeaerator(Material.iron).setBlockName("machine_deaerator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_deaerator");
machine_waste_drum = new WasteDrum(Material.iron).setBlockName("machine_waste_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":waste_drum");
machine_schrabidium_transmutator = new MachineSchrabidiumTransmutator(Material.iron).setBlockName("machine_schrabidium_transmutator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);

View File

@ -0,0 +1,31 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.machine.TileEntityDeaerator;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineDeaerator extends BlockDummyable {
public MachineDeaerator(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityDeaerator();
}
@Override
public int[] getDimensions() {
return new int[] {2, 0, 3, 4, 1, 1};
}
@Override
public int getOffset() {
return 0;
}
}

View File

@ -15,7 +15,7 @@ public class NukeEnvironmentalEffect {
/**
* Area of effect radiation effect. j > 0 for jagged edges of the spherical area. Args: world, x, y, z, radius, outer radius with random chance.
*/
@Deprecated //does not use scorched uranium, implementation is gaarbage anyway
@Deprecated //does not use scorched uranium, implementation is garbage anyway
public static void applyStandardAOE(World world, int x, int y, int z, int r, int j) {
int r2 = r * r;

View File

@ -1647,7 +1647,7 @@ public class GUIHandler implements IGuiHandler {
case ModItems.guiID_item_book:
return new GUIBook(player.inventory);
case ModItems.guiID_item_guide:
return new GUIIScreenGuide(player);
return new GUIScreenGuide(player);
}
return null;
}

View File

@ -273,7 +273,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.machine_dineutronium_battery, 1), new AStack[] {new ComparableStack(ModItems.ingot_dineutronium, 24), new ComparableStack(ModItems.powder_spark_mix, 12), new ComparableStack(ModItems.battery_spark_cell_1000, 1), new ComparableStack(ModItems.ingot_combine_steel, 32), new ComparableStack(ModItems.coil_magnetized_tungsten, 8), },1600);
makeRecipe(new ComparableStack(ModBlocks.machine_shredder, 1), new AStack[] {new OreDictStack("ingotSteel", 2), new OreDictStack("plateSteel", 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.wire_red_copper, 2), new ComparableStack(ModBlocks.steel_beam, 2), new ComparableStack(Blocks.iron_bars, 2), new ComparableStack(ModBlocks.red_wire_coated, 1), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModBlocks.steel_beam, 8), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 3), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.wire_red_copper, 6), },250);
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new ComparableStack(ModBlocks.block_steel, 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack("ingotSteel", 24), new OreDictStack("plateSteel", 16), new OreDictStack("plateAluminum", 6), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.wire_red_copper, 8), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack("blockSteel", 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack("ingotSteel", 24), new OreDictStack("plateSteel", 16), new OreDictStack("plateAluminum", 6), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.wire_red_copper, 8), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 28), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.hull_small_steel, 1), new ComparableStack(ModItems.thermo_element, 3), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {new OreDictStack("ingotSteel", 16), new OreDictStack("plateSteel", 20), new OreDictStack("plateCopper", 16), new ComparableStack(ModItems.hull_big_steel, 6), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.coil_tungsten, 8), new ComparableStack(ModItems.wire_red_copper, 8), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.circuit_red_copper, 1), new ComparableStack(ModItems.plate_polymer, 8), },350);
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack("plateSteel", 8), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.bolt_tungsten, 4), new ComparableStack(ModItems.coil_copper, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.canister_canola, 1), },160);

View File

@ -11,29 +11,29 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIBook extends GuiContainer {
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_book.png");
public GUIBook(InventoryPlayer player) {
super(new ContainerBook(player));
}
protected void drawGuiContainerForegroundLayer(int mX, int mY) {
Minecraft.getMinecraft().standardGalacticFontRenderer.drawString("Extended 4-Slot Crafting", 28, 6, 4210752);
Minecraft.getMinecraft().standardGalacticFontRenderer.drawString("Standard Inventory", 8, this.ySize - 96 + 2, 4210752);
}
public GUIBook(InventoryPlayer player) {
super(new ContainerBook(player));
}
protected void drawGuiContainerBackgroundLayer(float inter, int mX, int mY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(texture);
int left = (this.width - this.xSize) / 2;
int top = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(left, top, 0, 0, this.xSize, this.ySize);
if(this.inventorySlots.getSlot(0).getHasStack())
this.drawTexturedModalRect(left + 29, top + 16, 176, 0, 54, 54);
}
protected void drawGuiContainerForegroundLayer(int mX, int mY) {
Minecraft.getMinecraft().standardGalacticFontRenderer.drawString("Extended 4-Slot Crafting", 28, 6, 4210752);
Minecraft.getMinecraft().standardGalacticFontRenderer.drawString("Standard Inventory", 8, this.ySize - 96 + 2, 4210752);
}
protected void drawGuiContainerBackgroundLayer(float inter, int mX, int mY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(texture);
int left = (this.width - this.xSize) / 2;
int top = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(left, top, 0, 0, this.xSize, this.ySize);
if(this.inventorySlots.getSlot(0).getHasStack())
this.drawTexturedModalRect(left + 29, top + 16, 176, 0, 54, 54);
}
}

View File

@ -17,7 +17,7 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIIScreenGuide extends GuiScreen {
public class GUIScreenGuide extends GuiScreen {
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/book/book.png");
private static final ResourceLocation texture_cover = new ResourceLocation(RefStrings.MODID + ":textures/gui/book/book_cover.png");
@ -32,9 +32,11 @@ public class GUIIScreenGuide extends GuiScreen {
int page;
int maxPage;
public GUIIScreenGuide(EntityPlayer player) {
public GUIScreenGuide(EntityPlayer player) {
type = BookType.values()[player.getHeldItem().getItemDamage()];
type = BookType.getType(player.getHeldItem().getItemDamage());
System.out.println(type.toString());
page = -1;
maxPage = (int)Math.ceil(type.pages.size() / 2D) - 1;
@ -106,13 +108,18 @@ public class GUIIScreenGuide extends GuiScreen {
if(this.page < 0) {
float scale = 2;
String cover = "HOW 2 SEX";
float scale = this.type.titleScale;
String[] coverLines = I18nUtil.resolveKeyArray(this.type.title);
GL11.glPushMatrix();
GL11.glScalef(scale, scale, 1F);
this.fontRendererObj.drawString(cover, (int)((guiLeft + ((this.xSize / 2) - (this.fontRendererObj.getStringWidth(cover) / 2 * scale))) / scale), (int)((guiTop + 50) / scale), 0xfece00);
GL11.glPopMatrix();
for(int i = 0; i < coverLines.length; i++) {
String cover = coverLines[i];
GL11.glPushMatrix();
GL11.glScalef(scale, scale, 1F);
this.fontRendererObj.drawString(cover, (int)((guiLeft + ((this.xSize / 2) - (this.fontRendererObj.getStringWidth(cover) / 2 * scale))) / scale), (int)((guiTop + 50 + i * 10 * scale) / scale), 0xfece00);
GL11.glPopMatrix();
}
return;
}
@ -165,10 +172,11 @@ public class GUIIScreenGuide extends GuiScreen {
if(page.title != null) {
float tScale = page.titleScale;
String titleLoc = I18nUtil.resolveKey(page.title);
GL11.glPushMatrix();
GL11.glScalef(1F/tScale, 1F/tScale, 1F);
this.fontRendererObj.drawString(page.title, (int)((guiLeft + 20 + i * sideOffset + ((width / 2) - (this.fontRendererObj.getStringWidth(page.title) / 2 / tScale))) * tScale), (int)((guiTop + 20) * tScale), page.titleColor);
this.fontRendererObj.drawString(titleLoc, (int)((guiLeft + 20 + i * sideOffset + ((width / 2) - (this.fontRendererObj.getStringWidth(titleLoc) / 2 / tScale))) * tScale), (int)((guiTop + 20) * tScale), page.titleColor);
GL11.glPopMatrix();
}
@ -185,7 +193,7 @@ public class GUIIScreenGuide extends GuiScreen {
drawImage(guiLeft + 20 + ix + sideOffset * i, guiTop + page.y, page.sizeX, page.sizeY);
}
String pageLabel = (defacto + 1) + "/" + (maxPage * 2 + 1);
String pageLabel = (defacto + 1) + "/" + (this.type.pages.size());
this.fontRendererObj.drawString(pageLabel, guiLeft + 44 + i * 185 - i * this.fontRendererObj.getStringWidth(pageLabel), guiTop + 156, 4210752);
}
}

View File

@ -4,9 +4,14 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemGuideBook.BookType;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -14,6 +19,11 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class ItemGuideBook extends Item {
public ItemGuideBook() {
this.setMaxStackSize(1);
this.setHasSubtypes(true);
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
@ -23,19 +33,37 @@ public class ItemGuideBook extends Item {
return stack;
}
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
for(int i = 0; i < BookType.values().length; i++)
list.add(new ItemStack(item, 1, i));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { }
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add(String.join(" ", I18nUtil.resolveKeyArray(BookType.getType(stack.getItemDamage()).title)));
}
public enum BookType {
TEST(statFacTest());
TEST("book.test.cover", 2F, statFacTest()),
RBMK("book.rbmk.cover", 1.5F, statFacRBMK());
public List<GuidePage> pages;
public float titleScale;
public String title;
private BookType(List<GuidePage> pages) {
private BookType(String title, float titleScale, List<GuidePage> pages) {
this.title = title;
this.titleScale = titleScale;
this.pages = pages;
}
public static BookType getType(int i) {
return BookType.values()[Math.abs(i) % BookType.values().length];
}
}
public static List<GuidePage> statFacTest() {
@ -51,6 +79,34 @@ public class ItemGuideBook extends Item {
return pages;
}
public static List<GuidePage> statFacRBMK() {
List<GuidePage> pages = new ArrayList();
pages.add(new GuidePage("book.rbmk.page1").setScale(2).addTitle("book.rbmk.title1", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk1.png"), 90, 80, 60));
pages.add(new GuidePage("book.rbmk.page2").setScale(2F).addTitle("book.rbmk.title2", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk2.png"), 95, 52, 52));
pages.add(new GuidePage("book.rbmk.page3").setScale(2F).addTitle("book.rbmk.title3", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk3.png"), 95, 88, 52));
pages.add(new GuidePage("book.rbmk.page4").setScale(2F).addTitle("book.rbmk.title4", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk4.png"), 95, 88, 52));
pages.add(new GuidePage("book.rbmk.page5").setScale(2F).addTitle("book.rbmk.title5", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk5.png"), 95, 80, 42));
pages.add(new GuidePage("book.rbmk.page6").setScale(2F).addTitle("book.rbmk.title6", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk6.png"), 90, 100, 60));
pages.add(new GuidePage("book.rbmk.page7").setScale(2F).addTitle("book.rbmk.title7", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk7.png"), 95, 52, 52));
pages.add(new GuidePage("book.rbmk.page8").setScale(2F).addTitle("book.rbmk.title8", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk8.png"), 95, 88, 52));
pages.add(new GuidePage("book.rbmk.page9").setScale(2F).addTitle("book.rbmk.title9", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk9.png"), 95, 88, 52));
pages.add(new GuidePage("book.rbmk.page10").setScale(2F).addTitle("book.rbmk.title10", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk10.png"), 95, 88, 52));
pages.add(new GuidePage("book.rbmk.page11").setScale(2F).addTitle("book.rbmk.title11", 0x800000, 1F)
.addImage(new ResourceLocation(RefStrings.MODID + ":textures/gui/book/rbmk11.png"), 75, 85, 72));
return pages;
}
public static class GuidePage {
public String title;

View File

@ -0,0 +1,7 @@
package com.hbm.tileentity.machine;
import net.minecraft.tileentity.TileEntity;
public class TileEntityDeaerator extends TileEntity {
}

View File

@ -93,7 +93,31 @@ armor.thermal=Thermal Sight
armor.threshold=Damage threshold of %s
armor.vats=Enemy HUD
book.test.cover=HOW 2 SEX
book.test.page1=Test Page 1
book.rbmk.cover=HOW 2 RBMK:$The Basics$of Reactor$Construction
book.rbmk.title1=Introduction
book.rbmk.page1=The §lRBMK§r is a fully modular nuclear reactor. Unlike most other reactors, there is no "core", and no size limitations, rather, the behavior and efficiency of the reactor comes from how it is built and how the different pieces interact with each other.
book.rbmk.title2=Heat
book.rbmk.page2=As the reactor operates, it will generate §lheat§r. Heat will spread between parts, slowly decreasing in the process. The goal is to produce as much heat as possible without melting the reactor, and to move that heat to a §lsteam channel§r which cools the reactor and produces steam.
book.rbmk.title3=Fuel Rod
book.rbmk.page3=The §lfuel rod§r will capture neutron flux, causing the fuel inside the fuel rod to react, giving off neutrons in the process. Neutrons are released in all four cardinal directions with a maximum range of 5 blocks. The amount of neutrons released depends on the §lfuel§r used.
book.rbmk.title4=Control Rod
book.rbmk.page4=The §lcontrol rod§r will decrease the amount of neutrons passing though it. Fully inserted, it will block all neutrons, at half insertion, it will only block half. Control rods are used to regulate the reactor's activity and to turn it off.
book.rbmk.title5=Control Rod - Usage
book.rbmk.page5=The center of the GUI will display the current rod insertion. The colored buttons on the left will add a control rod to a color group, which is useful to quickly select grouped rods from the §lRBMK console§r. The buttons on the right allow for manual insertion in increments of 25%%.
book.rbmk.title6=Automatic Control Rod
book.rbmk.page6=§lAutomatic control rods§r function nearly identical to regular control rods, but they cannot be configured manually, instead they will adjust the rod position based on the current temperature. What function to use and how deep to insert at what temperature has to be defined first.
book.rbmk.title7=Steam Channel
book.rbmk.page7=The §lsteam channel§r is the only part that will actively reduce the reactor's heat level. If the component's temperature exceeds the boiling point of the set steam type, it will try to consume as much water and produce as much steam as needed to cool back below the boiling point.
book.rbmk.title8=Neutron Reflector
book.rbmk.page8=The §lneutron reflector§r will block neutrons from passing it, instead the neutrons will be reflected back at the fuel rod they came from. This is useful for utilizing neutrons that would otherwise be wasted by simply exiting the reactor.
book.rbmk.title9=Neutron Absorber
book.rbmk.page9=The §lneutron absorber§r will simply block neutrons. Neutrons absorbed will not generate heat and be effectively voided. This is useful to prevent fuel rods from reacting that would otherwise be in range.
book.rbmk.title10=Graphite Moderator
book.rbmk.page10=The §lgraphite moderator§r will convert fast neutrons passing through it into slow neutrons. Most fuels fission into fast neutrons while needing slow neutrons to split, so using moderators is strongly recommended.
book.rbmk.title11=Structural Column
book.rbmk.page11=The §lstructural column§r will not interfere with neutrons, nor does it have special uses. It is recommended to fill the reactor with structural columns where no other parts will be, because structural columns are capable of transporting heat.
chem.ASPHALT=Asphalt Production
chem.BALEFIRE=BF Rocket Fuel Mixing

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB