From 7f2411c216fcbc5cc6d5b5d6d62cb520c2ef2dd4 Mon Sep 17 00:00:00 2001 From: George Paton Date: Mon, 18 Mar 2024 23:44:17 +1100 Subject: [PATCH 1/5] Add how2hadron presentation scenes 1-3 --- .../tileentity/machine/TileEntityHadron.java | 6 +- .../com/hbm/wiaj/cannery/CanneryHadron.java | 201 ++++++++++++++++++ src/main/java/com/hbm/wiaj/cannery/Jars.java | 3 +- src/main/resources/assets/hbm/lang/en_US.lang | 10 + 4 files changed, 216 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java b/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java index 213fc6d59..a0c634cd9 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java @@ -364,9 +364,9 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs //If any particles expire, cancel any succeeding particles, since they'll confuse the player particlesCompleted.clear(); - TileEntityHadron.this.state = reason; - TileEntityHadron.this.delay = delayError; - TileEntityHadron.this.setExpireStats(reason, particle.momentum, particle.posX, particle.posY, particle.posZ); + state = reason; + delay = delayError; + setExpireStats(reason, particle.momentum, particle.posX, particle.posY, particle.posZ); } public class Particle { diff --git a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java new file mode 100644 index 000000000..832ab1d2d --- /dev/null +++ b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java @@ -0,0 +1,201 @@ +package com.hbm.wiaj.cannery; + +import com.hbm.blocks.ModBlocks; +import com.hbm.util.I18nUtil; +import com.hbm.wiaj.JarScene; +import com.hbm.wiaj.JarScript; +import com.hbm.wiaj.WorldInAJar; +import com.hbm.wiaj.actions.ActionCreateActor; +import com.hbm.wiaj.actions.ActionRemoveActor; +import com.hbm.wiaj.actions.ActionRotateBy; +import com.hbm.wiaj.actions.ActionSetBlock; +import com.hbm.wiaj.actions.ActionSetZoom; +import com.hbm.wiaj.actions.ActionWait; +import com.hbm.wiaj.actors.ActorFancyPanel; +import com.hbm.wiaj.actors.ActorFancyPanel.Orientation; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraftforge.common.util.ForgeDirection; + +public class CanneryHadron extends CanneryBase { + + @Override + public ItemStack getIcon() { + return new ItemStack(ModBlocks.hadron_core); + } + + @Override + public String getName() { + return "cannery.hadron"; + } + + @Override + public JarScript createScript() { + WorldInAJar world = new WorldInAJar(25, 5, 25); + JarScript script = new JarScript(world); + + + // FIRST SCENE: Show and explain the core component + JarScene scene0 = new JarScene(script); + + scene0.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); + + scene0.add(new ActionSetZoom(4, 0)); + + scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.0")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene0.add(new ActionWait(100)); + scene0.add(new ActionRemoveActor(1)); + scene0.add(new ActionWait(5)); + + scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.1")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene0.add(new ActionWait(100)); + scene0.add(new ActionRemoveActor(2)); + scene0.add(new ActionWait(10)); + + scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -14, 4, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.2")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene0.add(new ActionWait(80)); + scene0.add(new ActionRemoveActor(3)); + scene0.add(new ActionWait(5)); + + scene0.add(new ActionRotateBy(-90, 0, 10)); + + scene0.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 4, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.3")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene0.add(new ActionWait(80)); + scene0.add(new ActionRemoveActor(4)); + scene0.add(new ActionWait(5)); + + scene0.add(new ActionRotateBy(90, 0, 10)); + + + // SECOND SCENE: Begin building a coil around the core component + JarScene scene1 = new JarScene(script); + + scene1.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); + + scene1.add(new ActionSetZoom(4, 0)); + scene1.add(new ActionSetZoom(-2, 10)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_alloy)); + scene1.add(new ActionWait(2)); + } + + scene1.add(new ActionWait(5)); + + scene1.add(new ActionCreateActor(5, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -25, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.4")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(40)); + + for(Block block : new Block[] { + ModBlocks.hadron_coil_gold, + ModBlocks.hadron_coil_neodymium, + ModBlocks.hadron_coil_magtung, + ModBlocks.hadron_coil_schrabidium, + ModBlocks.hadron_coil_schrabidate, + ModBlocks.hadron_coil_starmetal, + ModBlocks.hadron_coil_chlorophyte, + ModBlocks.hadron_coil_mese + }) { + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, block)); + scene1.add(new ActionWait(1)); + } + + scene1.add(new ActionWait(4)); + } + + scene1.add(new ActionWait(20)); + scene1.add(new ActionRemoveActor(5)); + scene1.add(new ActionWait(5)); + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 12, ModBlocks.hadron_plating)); + scene1.add(new ActionWait(2)); + } + + scene1.add(new ActionCreateActor(6, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -40, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.5")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(60)); + scene1.add(new ActionRemoveActor(6)); + scene1.add(new ActionWait(5)); + + + // THIRD SCENE: Add the Access Terminal and Power Plug + JarScene scene2 = new JarScene(script); + + scene2.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); + scene2.add(new ActionSetZoom(2, 0)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene2.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_mese)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 12, ModBlocks.hadron_plating)); + } + + scene2.add(new ActionWait(5)); + + for(int i = 7; i >= 0; i--) { + double r = i * Math.PI / 4; + scene2.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_neodymium)); + scene2.add(new ActionWait(1)); + } + + scene2.add(new ActionWait(20)); + + scene2.add(new ActionSetBlock(12 - 2, 2, 12, Blocks.air)); + + scene2.add(new ActionWait(15)); + + scene2.add(new ActionSetBlock(12 - 2, 2, 12, ModBlocks.hadron_access, ForgeDirection.EAST.ordinal())); + + scene2.add(new ActionWait(10)); + + scene2.add(new ActionCreateActor(7, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 36, 18, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.6")}}, 100) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene2.add(new ActionWait(80)); + scene2.add(new ActionRemoveActor(7)); + scene2.add(new ActionWait(20)); + + scene2.add(new ActionSetBlock(12, 2 + 2, 12, Blocks.air)); + + scene2.add(new ActionWait(15)); + + scene2.add(new ActionSetBlock(12, 2 + 2, 12, ModBlocks.hadron_power)); + + scene2.add(new ActionWait(10)); + + scene2.add(new ActionCreateActor(8, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -40, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.7")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene2.add(new ActionWait(80)); + scene2.add(new ActionRemoveActor(8)); + scene2.add(new ActionWait(20)); + + + script.addScene(scene0).addScene(scene1).addScene(scene2); + + return script; + } + +} diff --git a/src/main/java/com/hbm/wiaj/cannery/Jars.java b/src/main/java/com/hbm/wiaj/cannery/Jars.java index 47723ba8a..5605b1a5f 100644 --- a/src/main/java/com/hbm/wiaj/cannery/Jars.java +++ b/src/main/java/com/hbm/wiaj/cannery/Jars.java @@ -11,7 +11,7 @@ import com.hbm.items.ItemEnums.EnumPlantType; public class Jars { - public static HashMap canneries = new HashMap(); + public static HashMap canneries = new HashMap(); public static void initJars() { canneries.put(new ComparableStack(ModBlocks.heater_firebox), new CanneryFirebox()); @@ -23,6 +23,7 @@ public class Jars { canneries.put(new ComparableStack(ModBlocks.machine_silex), new CannerySILEX()); canneries.put(new ComparableStack(ModBlocks.foundry_channel), new CanneryFoundryChannel()); canneries.put(new ComparableStack(ModBlocks.machine_crucible), new CanneryCrucible()); + canneries.put(new ComparableStack(ModBlocks.hadron_core), new CanneryHadron()); canneries.put(new ComparableStack(DictFrame.fromOne(ModItems.plant_item, EnumPlantType.MUSTARDWILLOW)), new CanneryWillow()); canneries.put(new ComparableStack(DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.CD0)), new CanneryWillow()); diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index b7473cda6..0185b8ab2 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -523,6 +523,16 @@ cannery.willow.7=Now the willow's leaves can be harvested. Breaking the top bloc cannery.willow.8=Soon the plant will start growing again, yielding more leaves if the dirt is replaced with oily dirt. The leaves can be processed into cadmium powder using an ore acidizer. cannery.willow.9=Harvesting willow leaves can be automated using the automatic buzzsaw, it will only break plants that are ready for harvest. +cannery.hadron=Particle Accelerator +cannery.hadron.0=A Particle Accelerator consists of three main parts: A Core, an Analysis Chamber, and a set of Superconducting Coils +cannery.hadron.1=This is the Particle Accelerator Core Component, which fires particles at relativistic speeds down the coils towards the Analysis Chamber +cannery.hadron.2=Particles are ejected from here +cannery.hadron.3=And in circular accelerators, return to here +cannery.hadron.4=A coil segment is constructed by using 8 Dense Coils with nothing (or the core) in the middle +cannery.hadron.5=This coil segment must itself also be enclosed within Particle Accelerator Plating +cannery.hadron.6=To access the Core Component, you'll need to add one or more Access Terminals +cannery.hadron.7=The Core Component will also require power to operate, add a power plug on an edge + chem.ARSENIC=Arsenic Extraction chem.ASPHALT=Asphalt Production chem.BAKELITE=Bakelite Production From 67fbcfd3c222064238a1605d72eebaeddc47f5c6 Mon Sep 17 00:00:00 2001 From: George Paton Date: Tue, 19 Mar 2024 00:44:41 +1100 Subject: [PATCH 2/5] Add fourth scene and convert indentation to tabs --- .../com/hbm/wiaj/cannery/CanneryHadron.java | 330 +++++++++++------- src/main/resources/assets/hbm/lang/en_US.lang | 2 + 2 files changed, 202 insertions(+), 130 deletions(-) diff --git a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java index 832ab1d2d..d12e20b73 100644 --- a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java +++ b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java @@ -22,180 +22,250 @@ import net.minecraftforge.common.util.ForgeDirection; public class CanneryHadron extends CanneryBase { - @Override - public ItemStack getIcon() { - return new ItemStack(ModBlocks.hadron_core); - } + @Override + public ItemStack getIcon() { + return new ItemStack(ModBlocks.hadron_core); + } - @Override - public String getName() { - return "cannery.hadron"; - } + @Override + public String getName() { + return "cannery.hadron"; + } - @Override - public JarScript createScript() { + @Override + public JarScript createScript() { WorldInAJar world = new WorldInAJar(25, 5, 25); JarScript script = new JarScript(world); - - // FIRST SCENE: Show and explain the core component - JarScene scene0 = new JarScene(script); - scene0.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); - - scene0.add(new ActionSetZoom(4, 0)); - scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.0")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + // FIRST SCENE: Show and explain the core component + JarScene scene0 = new JarScene(script); + scene0.add(new ActionSetZoom(4, 0)); + + scene0.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); + + scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.0")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); scene0.add(new ActionWait(100)); scene0.add(new ActionRemoveActor(1)); - scene0.add(new ActionWait(5)); + scene0.add(new ActionWait(5)); - scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.1")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.1")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - scene0.add(new ActionWait(100)); - scene0.add(new ActionRemoveActor(2)); - scene0.add(new ActionWait(10)); + scene0.add(new ActionWait(100)); + scene0.add(new ActionRemoveActor(2)); + scene0.add(new ActionWait(10)); - scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -14, 4, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.2")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -14, 4, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.2")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - scene0.add(new ActionWait(80)); - scene0.add(new ActionRemoveActor(3)); - scene0.add(new ActionWait(5)); + scene0.add(new ActionWait(80)); + scene0.add(new ActionRemoveActor(3)); + scene0.add(new ActionWait(5)); - scene0.add(new ActionRotateBy(-90, 0, 10)); + scene0.add(new ActionRotateBy(-90, 0, 10)); - scene0.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 4, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.3")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + scene0.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 4, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.3")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - scene0.add(new ActionWait(80)); - scene0.add(new ActionRemoveActor(4)); - scene0.add(new ActionWait(5)); + scene0.add(new ActionWait(80)); + scene0.add(new ActionRemoveActor(4)); + scene0.add(new ActionWait(5)); - scene0.add(new ActionRotateBy(90, 0, 10)); + scene0.add(new ActionRotateBy(90, 0, 10)); - // SECOND SCENE: Begin building a coil around the core component - JarScene scene1 = new JarScene(script); - scene1.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); + // SECOND SCENE: Begin building a coil around the core component + JarScene scene1 = new JarScene(script); - scene1.add(new ActionSetZoom(4, 0)); - scene1.add(new ActionSetZoom(-2, 10)); + scene1.add(new ActionSetZoom(4, 0)); + scene1.add(new ActionSetZoom(-2, 10)); - for(int i = 0; i < 8; i++) { - double r = i * Math.PI / 4; - scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_alloy)); - scene1.add(new ActionWait(2)); - } + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_alloy)); + scene1.add(new ActionWait(2)); + } - scene1.add(new ActionWait(5)); + scene1.add(new ActionWait(5)); - scene1.add(new ActionCreateActor(5, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -25, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.4")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + scene1.add(new ActionCreateActor(5, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -25, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.4")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - scene1.add(new ActionWait(40)); + scene1.add(new ActionWait(40)); - for(Block block : new Block[] { - ModBlocks.hadron_coil_gold, - ModBlocks.hadron_coil_neodymium, - ModBlocks.hadron_coil_magtung, - ModBlocks.hadron_coil_schrabidium, - ModBlocks.hadron_coil_schrabidate, - ModBlocks.hadron_coil_starmetal, - ModBlocks.hadron_coil_chlorophyte, - ModBlocks.hadron_coil_mese - }) { - for(int i = 0; i < 8; i++) { - double r = i * Math.PI / 4; - scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, block)); - scene1.add(new ActionWait(1)); - } + for(Block block : new Block[] { + ModBlocks.hadron_coil_gold, + ModBlocks.hadron_coil_neodymium, + ModBlocks.hadron_coil_magtung, + ModBlocks.hadron_coil_schrabidium, + ModBlocks.hadron_coil_schrabidate, + ModBlocks.hadron_coil_starmetal, + ModBlocks.hadron_coil_chlorophyte, + ModBlocks.hadron_coil_mese + }) { + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, block)); + scene1.add(new ActionWait(1)); + } - scene1.add(new ActionWait(4)); - } - - scene1.add(new ActionWait(20)); - scene1.add(new ActionRemoveActor(5)); - scene1.add(new ActionWait(5)); - - for(int i = 0; i < 12; i++) { - double r = i * Math.PI / 6; - scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 12, ModBlocks.hadron_plating)); - scene1.add(new ActionWait(2)); - } - - scene1.add(new ActionCreateActor(6, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -40, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.5")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - - scene1.add(new ActionWait(60)); - scene1.add(new ActionRemoveActor(6)); - scene1.add(new ActionWait(5)); - - - // THIRD SCENE: Add the Access Terminal and Power Plug - JarScene scene2 = new JarScene(script); + scene1.add(new ActionWait(4)); + } - scene2.add(new ActionSetBlock(12, 2, 12, ModBlocks.hadron_core, ForgeDirection.NORTH.ordinal())); + scene1.add(new ActionWait(20)); + scene1.add(new ActionRemoveActor(5)); + scene1.add(new ActionWait(5)); + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 12, ModBlocks.hadron_plating)); + scene1.add(new ActionWait(2)); + } + + scene1.add(new ActionCreateActor(6, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -40, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.5")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(60)); + scene1.add(new ActionRemoveActor(6)); + scene1.add(new ActionWait(5)); + + + + // THIRD SCENE: Add the Access Terminal and Power Plug + JarScene scene2 = new JarScene(script); scene2.add(new ActionSetZoom(2, 0)); - for(int i = 0; i < 8; i++) { - double r = i * Math.PI / 4; - scene2.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_mese)); - } + scene2.add(new ActionWait(5)); - for(int i = 0; i < 12; i++) { - double r = i * Math.PI / 6; - scene1.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 12, ModBlocks.hadron_plating)); - } + for(int i = 7; i >= 0; i--) { + double r = i * Math.PI / 4; + scene2.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_neodymium)); + scene2.add(new ActionWait(1)); + } - scene2.add(new ActionWait(5)); + scene2.add(new ActionWait(20)); - for(int i = 7; i >= 0; i--) { - double r = i * Math.PI / 4; - scene2.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 12, ModBlocks.hadron_coil_neodymium)); - scene2.add(new ActionWait(1)); - } + scene2.add(new ActionSetBlock(12 - 2, 2, 12, Blocks.air)); - scene2.add(new ActionWait(20)); + scene2.add(new ActionWait(15)); - scene2.add(new ActionSetBlock(12 - 2, 2, 12, Blocks.air)); + scene2.add(new ActionSetBlock(12 - 2, 2, 12, ModBlocks.hadron_access, ForgeDirection.EAST.ordinal())); - scene2.add(new ActionWait(15)); + scene2.add(new ActionWait(10)); - scene2.add(new ActionSetBlock(12 - 2, 2, 12, ModBlocks.hadron_access, ForgeDirection.EAST.ordinal())); + scene2.add(new ActionCreateActor(7, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 36, 18, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.6")}}, 100) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene2.add(new ActionWait(80)); + scene2.add(new ActionRemoveActor(7)); + scene2.add(new ActionWait(20)); - scene2.add(new ActionWait(10)); + scene2.add(new ActionSetBlock(12, 2 + 2, 12, Blocks.air)); - scene2.add(new ActionCreateActor(7, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 36, 18, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.6")}}, 100) - .setColors(colorCopper).setOrientation(Orientation.LEFT))); - - scene2.add(new ActionWait(80)); - scene2.add(new ActionRemoveActor(7)); - scene2.add(new ActionWait(20)); + scene2.add(new ActionWait(15)); - scene2.add(new ActionSetBlock(12, 2 + 2, 12, Blocks.air)); + scene2.add(new ActionSetBlock(12, 2 + 2, 12, ModBlocks.hadron_power)); - scene2.add(new ActionWait(15)); + scene2.add(new ActionWait(10)); - scene2.add(new ActionSetBlock(12, 2 + 2, 12, ModBlocks.hadron_power)); - - scene2.add(new ActionWait(10)); - - scene2.add(new ActionCreateActor(8, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -40, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.7")}}, 200) - .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - - scene2.add(new ActionWait(80)); - scene2.add(new ActionRemoveActor(8)); - scene2.add(new ActionWait(20)); + scene2.add(new ActionCreateActor(8, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.7")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene2.add(new ActionWait(80)); + scene2.add(new ActionRemoveActor(8)); + scene2.add(new ActionWait(20)); - script.addScene(scene0).addScene(scene1).addScene(scene2); - return script; - } - + // FOURTH SCENE: Add some coil segments and power them + JarScene scene3 = new JarScene(script); + scene3.add(new ActionSetZoom(2, 0)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene3.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 11, ModBlocks.hadron_coil_neodymium)); + scene3.add(new ActionWait(2)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene3.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 11, ModBlocks.hadron_plating)); + scene3.add(new ActionWait(2)); + } + + scene3.add(new ActionWait(5)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene3.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 10, ModBlocks.hadron_coil_neodymium)); + scene3.add(new ActionWait(2)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene3.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 10, ModBlocks.hadron_plating)); + scene3.add(new ActionWait(2)); + } + + scene3.add(new ActionWait(20)); + + scene3.add(new ActionSetBlock(12, 2 + 2, 10, Blocks.air)); + + scene3.add(new ActionWait(15)); + + scene3.add(new ActionSetBlock(12, 2 + 2, 10, ModBlocks.hadron_power)); + + scene3.add(new ActionWait(10)); + + scene3.add(new ActionCreateActor(9, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -28, -28, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.8")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene3.add(new ActionWait(20)); + + scene3.add(new ActionCreateActor(10, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -12, 28, new Object[][] {{I18nUtil.resolveKey("50 x 8 = 400 = 4MHE")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene3.add(new ActionWait(20)); + + scene3.add(new ActionWait(80)); + scene3.add(new ActionRemoveActor(9)); + scene3.add(new ActionWait(10)); + + scene3.add(new ActionCreateActor(11, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.9")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene3.add(new ActionWait(80)); + scene3.add(new ActionRemoveActor(11)); + scene3.add(new ActionWait(10)); + + scene3.add(new ActionRemoveActor(10)); + + + + + // FIFTH SCENE: Add a bend to the coil + + + + // SIXTH SCENE: Reach the Analysis Chamber + + + + // ADDENDUM SCENE: Linear accelerators + + + + // ADDENDUM SCENE: Schottky diodes + + + script.addScene(scene0).addScene(scene1).addScene(scene2).addScene(scene3); + + return script; + } + } diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 0185b8ab2..85ad59751 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -532,6 +532,8 @@ cannery.hadron.4=A coil segment is constructed by using 8 Dense Coils with nothi cannery.hadron.5=This coil segment must itself also be enclosed within Particle Accelerator Plating cannery.hadron.6=To access the Core Component, you'll need to add one or more Access Terminals cannery.hadron.7=The Core Component will also require power to operate, add a power plug on an edge +cannery.hadron.8=The Accelerator will require enough Power Plugs to supply at least 10KHE of electricity per unit of Coil Strength +cannery.hadron.9=Note that the coil segment that wraps around the Core Component is not factored into the Coil Strength calculation chem.ARSENIC=Arsenic Extraction chem.ASPHALT=Asphalt Production From cac7aa6705e9197068e56a3e98dd6d99c1e3d920 Mon Sep 17 00:00:00 2001 From: George Paton Date: Tue, 19 Mar 2024 11:51:40 +1100 Subject: [PATCH 3/5] Fix diode reentry behaviour being wonky due to shallow history copy Fix diode error handling, will always fail if a particle can't leave a diode --- .../hbm/tileentity/machine/TileEntityHadron.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java b/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java index a0c634cd9..55bbf917f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityHadron.java @@ -424,8 +424,14 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs p.cl1 = cl1; p.expired = expired; p.plugs = new ArrayList(plugs); - p.history = new HashMap>(history); p.cloned = true; + + //Deep clone the history + p.history = new HashMap>(history); + for(TileEntityHadronDiode diode : p.history.keySet()) { + p.history.put(diode, new ArrayList(p.history.get(diode))); + } + return p; } @@ -752,8 +758,11 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs //Add the used direction to the main particle AFTER cloning, so the clones don't get incorrect travel history usedDirections.add(p.dir); - //If we managed to exit, keep going - if(hasTurnedCurrent) return; + //If we failed to exit, raise DIODE_COLLISION + if(!hasTurnedCurrent) + expire(p, EnumHadronState.ERROR_DIODE_COLLISION); + + return; } //next step is air or the core, proceed From d65469e1c0c97873184c23399b022c2e6f18ac70 Mon Sep 17 00:00:00 2001 From: George Paton Date: Tue, 19 Mar 2024 15:03:49 +1100 Subject: [PATCH 4/5] Finish building the whole accelerator in the presentation! (fucking hell) --- .../com/hbm/wiaj/cannery/CanneryHadron.java | 425 +++++++++++++++++- src/main/resources/assets/hbm/lang/en_US.lang | 10 + 2 files changed, 423 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java index d12e20b73..ec57b7a13 100644 --- a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java +++ b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java @@ -6,6 +6,7 @@ import com.hbm.wiaj.JarScene; import com.hbm.wiaj.JarScript; import com.hbm.wiaj.WorldInAJar; import com.hbm.wiaj.actions.ActionCreateActor; +import com.hbm.wiaj.actions.ActionOffsetBy; import com.hbm.wiaj.actions.ActionRemoveActor; import com.hbm.wiaj.actions.ActionRotateBy; import com.hbm.wiaj.actions.ActionSetBlock; @@ -151,11 +152,9 @@ public class CanneryHadron extends CanneryBase { scene2.add(new ActionWait(20)); scene2.add(new ActionSetBlock(12 - 2, 2, 12, Blocks.air)); - scene2.add(new ActionWait(15)); scene2.add(new ActionSetBlock(12 - 2, 2, 12, ModBlocks.hadron_access, ForgeDirection.EAST.ordinal())); - scene2.add(new ActionWait(10)); scene2.add(new ActionCreateActor(7, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 36, 18, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.6")}}, 100) @@ -166,11 +165,9 @@ public class CanneryHadron extends CanneryBase { scene2.add(new ActionWait(20)); scene2.add(new ActionSetBlock(12, 2 + 2, 12, Blocks.air)); - scene2.add(new ActionWait(15)); scene2.add(new ActionSetBlock(12, 2 + 2, 12, ModBlocks.hadron_power)); - scene2.add(new ActionWait(10)); scene2.add(new ActionCreateActor(8, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.7")}}, 200) @@ -215,22 +212,32 @@ public class CanneryHadron extends CanneryBase { scene3.add(new ActionWait(20)); scene3.add(new ActionSetBlock(12, 2 + 2, 10, Blocks.air)); - scene3.add(new ActionWait(15)); scene3.add(new ActionSetBlock(12, 2 + 2, 10, ModBlocks.hadron_power)); - scene3.add(new ActionWait(10)); scene3.add(new ActionCreateActor(9, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -28, -28, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.8")}}, 200) .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); - scene3.add(new ActionWait(20)); + scene3.add(new ActionWait(40)); - scene3.add(new ActionCreateActor(10, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -12, 28, new Object[][] {{I18nUtil.resolveKey("50 x 8 = 400 = 4MHE")}}, 200) + scene3.add(new ActionCreateActor(10, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -12, 28, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.math.0")}, {I18nUtil.resolveKey("cannery.hadron.math.1")}}, 0) .setColors(colorCopper).setOrientation(Orientation.LEFT))); - scene3.add(new ActionWait(20)); + scene3.add(new ActionWait(40)); + scene3.add(new ActionRemoveActor(10)); + scene3.add(new ActionWait(5)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene3.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 10, ModBlocks.hadron_coil_starmetal)); + scene3.add(new ActionWait(1)); + } + + scene3.add(new ActionCreateActor(13, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -12, 28, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.math.2")}, {I18nUtil.resolveKey("cannery.hadron.math.3")}}, 0) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + scene3.add(new ActionWait(80)); scene3.add(new ActionRemoveActor(9)); @@ -241,29 +248,423 @@ public class CanneryHadron extends CanneryBase { scene3.add(new ActionWait(80)); scene3.add(new ActionRemoveActor(11)); + scene3.add(new ActionWait(5)); + + scene3.add(new ActionCreateActor(12, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -45, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.10")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene3.add(new ActionWait(80)); + scene3.add(new ActionRemoveActor(12)); scene3.add(new ActionWait(10)); - scene3.add(new ActionRemoveActor(10)); + scene3.add(new ActionRemoveActor(13)); + for(int i = 7; i >= 0; i--) { + double r = i * Math.PI / 4; + scene3.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 10, ModBlocks.hadron_coil_neodymium)); + scene3.add(new ActionWait(1)); + } // FIFTH SCENE: Add a bend to the coil + JarScene scene4 = new JarScene(script); + scene4.add(new ActionSetZoom(2, 0)); + + scene4.add(new ActionOffsetBy(0, 0, 4, 10)); + scene4.add(new ActionRotateBy(90, 0, 10)); + + + // BEGIN CORNER SEGMENT + for(int z = 9; z >= 7; z--) { + for(int x = 11; x <= 14; x++) { + if(z == 7 && x == 11) continue; + scene4.add(new ActionSetBlock(x, 0, z, ModBlocks.hadron_plating)); + scene4.add(new ActionWait(2)); + } + } + + for(int z = 9; z >= 6; z--) { + for(int x = 10; x <= 14; x++) { + if(z == 6 && x <= 11) continue; + if(z <= 7 && x == 10) continue; + scene4.add(new ActionSetBlock(x, 1, z, z == 6 || x == 10 || (z == 7 && x == 11) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene4.add(new ActionWait(2)); + } + } + + for(int z = 9; z >= 6; z--) { + for(int x = 10; x <= 14; x++) { + if(z == 6 && x <= 11) continue; + if(z <= 7 && x == 10) continue; + if(z == 9 && x == 12) continue; + if(z == 8 && x == 12) continue; + if(z == 8 && x == 13) continue; + if(z == 8 && x == 14) continue; + scene4.add(new ActionSetBlock(x, 2, z, z == 6 || x == 10 || (z == 7 && x == 11) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene4.add(new ActionWait(2)); + } + } + // END CORNER SEGMENT + + + scene4.add(new ActionWait(5)); + + scene4.add(new ActionCreateActor(14, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -8, -35, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.11")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene4.add(new ActionWait(80)); + scene4.add(new ActionRemoveActor(14)); + scene4.add(new ActionWait(5)); + + scene4.add(new ActionCreateActor(15, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 24, -16, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.12")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene4.add(new ActionWait(80)); + scene4.add(new ActionRemoveActor(15)); + scene4.add(new ActionWait(10)); + + for(int z = 9; z >= 6; z--) { + for(int x = 10; x <= 14; x++) { + if(z == 6 && x <= 11) continue; + if(z <= 7 && x == 10) continue; + scene4.add(new ActionSetBlock(x, 3, z, z == 6 || x == 10 || (z == 7 && x == 11) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene4.add(new ActionWait(2)); + } + } + + for(int z = 9; z >= 7; z--) { + for(int x = 11; x <= 14; x++) { + if(z == 7 && x == 11) continue; + scene4.add(new ActionSetBlock(x, 4, z, ModBlocks.hadron_plating)); + scene4.add(new ActionWait(2)); + } + } + + scene4.add(new ActionWait(10)); + + scene4.add(new ActionSetBlock(14, 2 + 2, 8, Blocks.air)); + scene4.add(new ActionWait(10)); + + scene4.add(new ActionSetBlock(14, 2 + 2, 8, ModBlocks.hadron_power)); + scene4.add(new ActionWait(10)); + // SIXTH SCENE: Reach the Analysis Chamber + JarScene scene5 = new JarScene(script); + scene5.add(new ActionSetZoom(2, 0)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene5.add(new ActionSetBlock(15, 2 + (int)(Math.sin(r) * 1.5F), 8 + (int)(Math.cos(r) * 1.5F), ModBlocks.hadron_coil_neodymium)); + scene5.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene5.add(new ActionSetBlock(15, 2 + (int)(Math.sin(r) * 2.75F), 8 + (int)(Math.cos(r) * 2.75F), ModBlocks.hadron_plating)); + scene5.add(new ActionWait(1)); + } + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene5.add(new ActionSetBlock(16, 2 + (int)(Math.sin(r) * 1.5F), 8 + (int)(Math.cos(r) * 1.5F), ModBlocks.hadron_coil_neodymium)); + scene5.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene5.add(new ActionSetBlock(16, 2 + (int)(Math.sin(r) * 2.75F), 8 + (int)(Math.cos(r) * 2.75F), i == 3 ? ModBlocks.hadron_power : ModBlocks.hadron_plating)); + scene5.add(new ActionWait(1)); + } + // BEGIN CORNER SEGMENT + for(int x = 17; x <= 19; x++) { + for(int z = 10; z >= 7; z--) { + if(z == 7 && x == 19) continue; + scene5.add(new ActionSetBlock(x, 0, z, ModBlocks.hadron_plating)); + scene5.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 20; x++) { + for(int z = 10; z >= 6; z--) { + if(z == 6 && x >= 19) continue; + if(z <= 7 && x == 20) continue; + scene5.add(new ActionSetBlock(x, 1, z, z == 6 || x == 20 || (z == 7 && x == 19) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene5.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 20; x++) { + for(int z = 10; z >= 6; z--) { + if(z == 6 && x >= 19) continue; + if(z <= 7 && x == 20) continue; + if(z == 9 && x == 18) continue; + if(z == 8 && x == 18) continue; + if(z == 8 && x == 17) continue; + if(z == 10 && x == 18) continue; + scene5.add(new ActionSetBlock(x, 2, z, z == 6 || x == 20 || (z == 7 && x == 19) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene5.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 20; x++) { + for(int z = 10; z >= 6; z--) { + if(z == 6 && x >= 19) continue; + if(z <= 7 && x == 20) continue; + scene5.add(new ActionSetBlock(x, 3, z, z == 6 || x == 20 || (z == 7 && x == 19) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene5.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 19; x++) { + for(int z = 10; z >= 7; z--) { + if(z == 7 && x == 19) continue; + scene5.add(new ActionSetBlock(x, 4, z, ModBlocks.hadron_plating)); + scene5.add(new ActionWait(1)); + } + } + // END CORNER SEGMENT + + + scene5.add(new ActionRotateBy(-90, 0, 5)); + scene5.add(new ActionOffsetBy(0, 0, -8, 10)); + scene5.add(new ActionRotateBy(-90, 0, 10)); + scene5.add(new ActionSetZoom(-1, 10)); + + for(int z = 11; z <= 20; z++) { + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene5.add(new ActionSetBlock(18 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), z, ModBlocks.hadron_coil_neodymium)); + if(z == 11 || z == 20) scene5.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene5.add(new ActionSetBlock(18 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), z, i == 3 && z % 3 == 0 ? ModBlocks.hadron_power : ModBlocks.hadron_plating)); + if(z == 11 || z == 20) scene5.add(new ActionWait(1)); + } + + scene5.add(new ActionWait(z < 13 || z > 18 ? 2 : 1)); + } + + // SEVENTH SCENE: Actually build the Analysis Chamber + JarScene scene6 = new JarScene(script); + scene6.add(new ActionSetZoom(1, 0)); + + scene6.add(new ActionSetZoom(1, 10)); + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene6.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), 13, ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene6.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), 13, ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + + for(int z = 14; z <= 16; z++) { + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene6.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), z, i == 6 ? ModBlocks.hadron_analysis_glass : ModBlocks.hadron_analysis)); + scene6.add(new ActionWait(2)); + } + } + + scene6.add(new ActionWait(10)); + + scene6.add(new ActionCreateActor(16, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, 0, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.13")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene6.add(new ActionWait(100)); + scene6.add(new ActionRemoveActor(16)); + scene6.add(new ActionWait(10)); + + for(int z = 17; z <= 20; z++) { + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene6.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 1.5F), 2 + (int)(Math.sin(r) * 1.5F), z, ModBlocks.hadron_coil_neodymium)); + if(z == 17 || z == 20) scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene6.add(new ActionSetBlock(12 + (int)(Math.cos(r) * 2.75F), 2 + (int)(Math.sin(r) * 2.75F), z, i == 3 && (z == 18 || z == 20) ? ModBlocks.hadron_power : ModBlocks.hadron_plating)); + if(z == 17 || z == 20) scene6.add(new ActionWait(1)); + } + + scene6.add(new ActionWait(1)); + } + + scene6.add(new ActionSetZoom(-1, 10)); + + // BEGIN CORNER SEGMENT + for(int x = 17; x <= 19; x++) { + for(int z = 23; z >= 21; z--) { + if(z == 23 && x == 19) continue; + scene6.add(new ActionSetBlock(x, 0, z, ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 20; x++) { + for(int z = 24; z >= 21; z--) { + if(z == 24 && x >= 19) continue; + if(z >= 23 && x == 20) continue; + scene6.add(new ActionSetBlock(x, 1, z, z == 24 || x == 20 || (z == 23 && x == 19) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 20; x++) { + for(int z = 24; z >= 21; z--) { + if(z == 24 && x >= 19) continue; + if(z >= 23 && x == 20) continue; + if(z == 21 && x == 18) continue; + if(z == 22 && x == 18) continue; + if(z == 22 && x == 17) continue; + if(z == 20 && x == 18) continue; + scene6.add(new ActionSetBlock(x, 2, z, z == 24 || x == 20 || (z == 23 && x == 19) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 20; x++) { + for(int z = 24; z >= 21; z--) { + if(z == 24 && x >= 19) continue; + if(z >= 23 && x == 20) continue; + scene6.add(new ActionSetBlock(x, 3, z, z == 24 || x == 20 || (z == 23 && x == 19) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 17; x <= 19; x++) { + for(int z = 23; z >= 21; z--) { + if(z == 23 && x == 19) continue; + scene6.add(new ActionSetBlock(x, 4, z, ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + } + // END CORNER SEGMENT + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene6.add(new ActionSetBlock(16, 2 + (int)(Math.sin(r) * 1.5F), 22 + (int)(Math.cos(r) * 1.5F), ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene6.add(new ActionSetBlock(16, 2 + (int)(Math.sin(r) * 2.75F), 22 + (int)(Math.cos(r) * 2.75F), i == 3 ? ModBlocks.hadron_power : ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene6.add(new ActionSetBlock(15, 2 + (int)(Math.sin(r) * 1.5F), 22 + (int)(Math.cos(r) * 1.5F), ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene6.add(new ActionSetBlock(15, 2 + (int)(Math.sin(r) * 2.75F), 22 + (int)(Math.cos(r) * 2.75F), ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 8; i++) { + double r = i * Math.PI / 4; + scene6.add(new ActionSetBlock(14, 2 + (int)(Math.sin(r) * 1.5F), 22 + (int)(Math.cos(r) * 1.5F), ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + + for(int i = 0; i < 12; i++) { + double r = i * Math.PI / 6; + scene6.add(new ActionSetBlock(14, 2 + (int)(Math.sin(r) * 2.75F), 22 + (int)(Math.cos(r) * 2.75F), i == 3 ? ModBlocks.hadron_power : ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + + // BEGIN CORNER SEGMENT + for(int x = 11; x <= 13; x++) { + for(int z = 23; z >= 21; z--) { + if(z == 23 && x == 11) continue; + scene6.add(new ActionSetBlock(x, 0, z, ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 10; x <= 13; x++) { + for(int z = 24; z >= 21; z--) { + if(z == 24 && x <= 11) continue; + if(z >= 23 && x == 10) continue; + scene6.add(new ActionSetBlock(x, 1, z, z == 24 || x == 10 || (z == 23 && x == 11) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 10; x <= 13; x++) { + for(int z = 24; z >= 21; z--) { + if(z == 24 && x <= 11) continue; + if(z >= 23 && x == 10) continue; + if(z == 21 && x == 12) continue; + if(z == 22 && x == 12) continue; + if(z == 22 && x == 13) continue; + scene6.add(new ActionSetBlock(x, 2, z, z == 24 || x == 10 || (z == 23 && x == 11) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 10; x <= 13; x++) { + for(int z = 24; z >= 21; z--) { + if(z == 24 && x <= 11) continue; + if(z >= 23 && x == 10) continue; + scene6.add(new ActionSetBlock(x, 3, z, z == 24 || x == 10 || (z == 23 && x == 11) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_neodymium)); + scene6.add(new ActionWait(1)); + } + } + + for(int x = 11; x <= 13; x++) { + for(int z = 23; z >= 21; z--) { + if(z == 23 && x == 11) continue; + scene6.add(new ActionSetBlock(x, 4, z, ModBlocks.hadron_plating)); + scene6.add(new ActionWait(1)); + } + } + // END CORNER SEGMENT + + scene6.add(new ActionWait(10)); + + scene6.add(new ActionCreateActor(17, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -50, new Object[][] {{I18nUtil.resolveKey("cannery.hadron.14")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene6.add(new ActionWait(100)); + scene6.add(new ActionRemoveActor(17)); + scene6.add(new ActionWait(10)); - // ADDENDUM SCENE: Linear accelerators // ADDENDUM SCENE: Schottky diodes - script.addScene(scene0).addScene(scene1).addScene(scene2).addScene(scene3); + + // ADDENDUM SCENE: Cooling + + + script + .addScene(scene0) + .addScene(scene1) + .addScene(scene2) + .addScene(scene3) + .addScene(scene4) + .addScene(scene5) + .addScene(scene6); return script; } diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 85ad59751..58acaa682 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -534,6 +534,16 @@ cannery.hadron.6=To access the Core Component, you'll need to add one or more Ac cannery.hadron.7=The Core Component will also require power to operate, add a power plug on an edge cannery.hadron.8=The Accelerator will require enough Power Plugs to supply at least 10KHE of electricity per unit of Coil Strength cannery.hadron.9=Note that the coil segment that wraps around the Core Component is not factored into the Coil Strength calculation +cannery.hadron.10=Nor is this coil segment required for purely linear accelerators +cannery.hadron.11=For circular accelerators, you will need to add corners to change the direction of the particle +cannery.hadron.12=The outside corner coils can be omitted entirely +cannery.hadron.13=The final part of our Accelerator is the Analysis Chamber, which is a 3x3x3 empty chamber surrounded by Analysis Chamber blocks +cannery.hadron.14=Your completed Particle Accelerator should look something like this! + +cannery.hadron.math.0=Neodymium Coil Strength: 50 +cannery.hadron.math.1=50 x 8 x 10KHE = 400 x 10KHE = 4MHE +cannery.hadron.math.2=Starmetal Coil Strength: 1,000 +cannery.hadron.math.3=1,000 x 8 x 10KHE = 8,000 x 10KHE = 80MHE chem.ARSENIC=Arsenic Extraction chem.ASPHALT=Asphalt Production From df7808b48ea1c3e8d8cb51da78d2b06974075e4c Mon Sep 17 00:00:00 2001 From: George Paton Date: Tue, 19 Mar 2024 18:14:53 +1100 Subject: [PATCH 5/5] Add presentation for the Schottky Particle Diode --- .../com/hbm/wiaj/cannery/CanneryHadron.java | 7 + .../com/hbm/wiaj/cannery/CannerySchottky.java | 250 ++++++++++++++++++ src/main/java/com/hbm/wiaj/cannery/Jars.java | 1 + src/main/resources/assets/hbm/lang/en_US.lang | 12 + 4 files changed, 270 insertions(+) create mode 100644 src/main/java/com/hbm/wiaj/cannery/CannerySchottky.java diff --git a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java index ec57b7a13..90089afc6 100644 --- a/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java +++ b/src/main/java/com/hbm/wiaj/cannery/CanneryHadron.java @@ -32,6 +32,13 @@ public class CanneryHadron extends CanneryBase { public String getName() { return "cannery.hadron"; } + + @Override + public CanneryBase[] seeAlso() { + return new CanneryBase[] { + new CannerySchottky() + }; + } @Override public JarScript createScript() { diff --git a/src/main/java/com/hbm/wiaj/cannery/CannerySchottky.java b/src/main/java/com/hbm/wiaj/cannery/CannerySchottky.java new file mode 100644 index 000000000..e7d956e53 --- /dev/null +++ b/src/main/java/com/hbm/wiaj/cannery/CannerySchottky.java @@ -0,0 +1,250 @@ +package com.hbm.wiaj.cannery; + +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; +import com.hbm.tileentity.machine.TileEntityHadronDiode; +import com.hbm.util.I18nUtil; +import com.hbm.wiaj.JarScene; +import com.hbm.wiaj.JarScript; +import com.hbm.wiaj.WorldInAJar; +import com.hbm.wiaj.actions.ActionCreateActor; +import com.hbm.wiaj.actions.ActionRemoveActor; +import com.hbm.wiaj.actions.ActionRotateBy; +import com.hbm.wiaj.actions.ActionSetBlock; +import com.hbm.wiaj.actions.ActionSetTile; +import com.hbm.wiaj.actions.ActionSetZoom; +import com.hbm.wiaj.actions.ActionWait; +import com.hbm.wiaj.actors.ActorFancyPanel; +import com.hbm.wiaj.actors.ActorFancyPanel.Orientation; + +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; + +public class CannerySchottky extends CanneryBase { + + @Override + public ItemStack getIcon() { + return new ItemStack(ModBlocks.hadron_diode); + } + + @Override + public String getName() { + return "cannery.schottky"; + } + + @Override + public CanneryBase[] seeAlso() { + return new CanneryBase[] { + new CanneryHadron() + }; + } + + @Override + public JarScript createScript() { + WorldInAJar world = new WorldInAJar(5, 5, 5); + JarScript script = new JarScript(world); + + + // FIRST SCENE: Show and explain the diode + JarScene scene0 = new JarScene(script); + scene0.add(new ActionSetZoom(4, 0)); + + scene0.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode())); + scene0.add(new ActionSetBlock(2, 2, 2, ModBlocks.hadron_diode)); + + scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.0")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene0.add(new ActionWait(100)); + scene0.add(new ActionRemoveActor(1)); + scene0.add(new ActionWait(5)); + + scene0.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.1")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene0.add(new ActionWait(80)); + scene0.add(new ActionRemoveActor(1)); + scene0.add(new ActionWait(10)); + + scene0.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -14, 8, new Object[][] {{new ItemStack(ModItems.screwdriver)}}, 0) + .setColors(colorCopper).setOrientation(Orientation.RIGHT))); + + scene0.add(new ActionWait(20)); + scene0.add(new ActionRemoveActor(2)); + + scene0.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode() {{ sides[2] = DiodeConfig.IN; }})); + + scene0.add(new ActionWait(10)); + + scene0.add(new ActionCreateActor(3, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -14, 8, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.2")}}, 100) + .setColors(colorCopper).setOrientation(Orientation.RIGHT))); + + scene0.add(new ActionWait(60)); + scene0.add(new ActionRemoveActor(3)); + scene0.add(new ActionWait(10)); + + scene0.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 8, new Object[][] {{new ItemStack(ModItems.screwdriver)}}, 0) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene0.add(new ActionWait(10)); + scene0.add(new ActionRemoveActor(4)); + + scene0.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode() {{ sides[2] = DiodeConfig.IN; sides[4] = DiodeConfig.IN; }})); + + scene0.add(new ActionWait(5)); + + scene0.add(new ActionCreateActor(5, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 8, new Object[][] {{new ItemStack(ModItems.screwdriver)}}, 0) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene0.add(new ActionWait(10)); + scene0.add(new ActionRemoveActor(5)); + + scene0.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode() {{ sides[2] = DiodeConfig.IN; sides[4] = DiodeConfig.OUT; }})); + + scene0.add(new ActionWait(10)); + + scene0.add(new ActionCreateActor(6, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 8, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.3")}}, 100) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene0.add(new ActionWait(60)); + scene0.add(new ActionRemoveActor(6)); + scene0.add(new ActionWait(10)); + + + // SECOND SCENE: Add another entrance and exit + JarScene scene1 = new JarScene(script); + scene1.add(new ActionSetZoom(4, 0)); + + scene1.add(new ActionRotateBy(180, 0, 10)); + + scene1.add(new ActionCreateActor(2, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, -14, 8, new Object[][] {{new ItemStack(ModItems.screwdriver)}}, 0) + .setColors(colorCopper).setOrientation(Orientation.RIGHT))); + + scene1.add(new ActionWait(10)); + scene1.add(new ActionRemoveActor(2)); + + scene1.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode() {{ sides[2] = DiodeConfig.IN; sides[4] = DiodeConfig.OUT; sides[3] = DiodeConfig.IN; }})); + + scene1.add(new ActionWait(10)); + + scene1.add(new ActionCreateActor(4, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 8, new Object[][] {{new ItemStack(ModItems.screwdriver)}}, 0) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene1.add(new ActionWait(10)); + scene1.add(new ActionRemoveActor(4)); + + scene1.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode() {{ sides[2] = DiodeConfig.IN; sides[4] = DiodeConfig.OUT; sides[3] = DiodeConfig.IN; sides[5] = DiodeConfig.IN; }})); + + scene1.add(new ActionWait(5)); + + scene1.add(new ActionCreateActor(5, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 14, 8, new Object[][] {{new ItemStack(ModItems.screwdriver)}}, 0) + .setColors(colorCopper).setOrientation(Orientation.LEFT))); + + scene1.add(new ActionWait(10)); + scene1.add(new ActionRemoveActor(5)); + + scene1.add(new ActionSetTile(2, 2, 2, new TileEntityHadronDiode() {{ sides[2] = DiodeConfig.IN; sides[4] = DiodeConfig.OUT; sides[3] = DiodeConfig.IN; sides[5] = DiodeConfig.OUT; }})); + + scene1.add(new ActionWait(10)); + + scene1.add(new ActionRotateBy(-180, 0, 10)); + + scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.4")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(100)); + scene1.add(new ActionRemoveActor(1)); + scene1.add(new ActionWait(10)); + + scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.5")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(100)); + scene1.add(new ActionRemoveActor(1)); + scene1.add(new ActionWait(10)); + + scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.6")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(100)); + scene1.add(new ActionRemoveActor(1)); + scene1.add(new ActionWait(10)); + + scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.7")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(100)); + scene1.add(new ActionRemoveActor(1)); + scene1.add(new ActionWait(10)); + + scene1.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.8")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + scene1.add(new ActionWait(100)); + scene1.add(new ActionRemoveActor(1)); + scene1.add(new ActionWait(10)); + + + + // THIRD SCENE: Correctly enclose the diode + JarScene scene2 = new JarScene(script); + scene2.add(new ActionSetZoom(4, 0)); + + scene2.add(new ActionSetZoom(-2, 10)); + + for(int x = 0; x < 5; x++) { + for(int z = 0; z < 5; z++) { + if((x == 0 || x == 4) && (z == 0 || z == 4)) continue; + scene2.add(new ActionSetBlock(x, 0, z, ModBlocks.hadron_plating)); + scene2.add(new ActionWait(1)); + } + } + + for(int x = 0; x < 5; x++) { + for(int z = 0; z < 5; z++) { + scene2.add(new ActionSetBlock(x, 1, z, (x == 0 || x == 4) && (z == 0 || z == 4) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_alloy)); + scene2.add(new ActionWait(1)); + } + } + + for(int x = 0; x < 5; x++) { + for(int z = 0; z < 5; z++) { + if(x == 2 || z == 2) continue; + scene2.add(new ActionSetBlock(x, 2, z, (x == 0 || x == 4) && (z == 0 || z == 4) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_alloy)); + scene2.add(new ActionWait(1)); + } + } + + scene2.add(new ActionCreateActor(1, new ActorFancyPanel(Minecraft.getMinecraft().fontRenderer, 0, -20, new Object[][] {{I18nUtil.resolveKey("cannery.schottky.9")}}, 200) + .setColors(colorCopper).setOrientation(Orientation.BOTTOM))); + + + scene2.add(new ActionRotateBy(360, 0, 100)); + scene2.add(new ActionRemoveActor(1)); + scene2.add(new ActionWait(10)); + + for(int x = 0; x < 5; x++) { + for(int z = 0; z < 5; z++) { + scene2.add(new ActionSetBlock(x, 3, z, (x == 0 || x == 4) && (z == 0 || z == 4) ? ModBlocks.hadron_plating : ModBlocks.hadron_coil_alloy)); + scene2.add(new ActionWait(1)); + } + } + + for(int x = 0; x < 5; x++) { + for(int z = 0; z < 5; z++) { + if((x == 0 || x == 4) && (z == 0 || z == 4)) continue; + scene2.add(new ActionSetBlock(x, 4, z, ModBlocks.hadron_plating)); + scene2.add(new ActionWait(1)); + } + } + + + script + .addScene(scene0) + .addScene(scene1) + .addScene(scene2); + + return script; + } + +} diff --git a/src/main/java/com/hbm/wiaj/cannery/Jars.java b/src/main/java/com/hbm/wiaj/cannery/Jars.java index 5605b1a5f..7355cdd5c 100644 --- a/src/main/java/com/hbm/wiaj/cannery/Jars.java +++ b/src/main/java/com/hbm/wiaj/cannery/Jars.java @@ -24,6 +24,7 @@ public class Jars { canneries.put(new ComparableStack(ModBlocks.foundry_channel), new CanneryFoundryChannel()); canneries.put(new ComparableStack(ModBlocks.machine_crucible), new CanneryCrucible()); canneries.put(new ComparableStack(ModBlocks.hadron_core), new CanneryHadron()); + canneries.put(new ComparableStack(ModBlocks.hadron_diode), new CannerySchottky()); canneries.put(new ComparableStack(DictFrame.fromOne(ModItems.plant_item, EnumPlantType.MUSTARDWILLOW)), new CanneryWillow()); canneries.put(new ComparableStack(DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.CD0)), new CanneryWillow()); diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 58acaa682..77db3a726 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -545,6 +545,18 @@ cannery.hadron.math.1=50 x 8 x 10KHE = 400 x 10KHE = 4MHE cannery.hadron.math.2=Starmetal Coil Strength: 1,000 cannery.hadron.math.3=1,000 x 8 x 10KHE = 8,000 x 10KHE = 80MHE +cannery.schottky=Schottky Particle Diode +cannery.schottky.0=This is a Schottky Particle Diode. It can allow for more complex particle accelerator designs and save on electricity +cannery.schottky.1=By default it blocks all particles and must be configured with a Screwdriver +cannery.schottky.2=This face will now accept entering particles +cannery.schottky.3=And this face will eject particles that enter +cannery.schottky.4=The diode now has two exits, and will now behave in a quantum manner, creating virtual particles for each exit +cannery.schottky.5=Once all the virtual particles have reached an Analysis Chamber, the particle with the lowest momentum required for the current recipe is chosen +cannery.schottky.6=The chosen particle undergoes a wavefunction collapse and is made real, consuming only the power that the collapsing particle requires +cannery.schottky.7=If any virtual particles encounter any malformed segments, all virtual particles will be discarded and the erroring particle will be collapsed instead +cannery.schottky.8=Note that virtual particles will never use the same Diode exit twice. Infinite loops will fail, but re-entering a Diode is otherwise fine +cannery.schottky.9=Your Schottky Particle Diode should be properly enclosed, with free paths for each intersection exit + chem.ARSENIC=Arsenic Extraction chem.ASPHALT=Asphalt Production chem.BAKELITE=Bakelite Production