mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-26 03:44:37 +00:00
drinking the forbidden gatorade out of a glowstick
This commit is contained in:
parent
d157004f03
commit
f7c0cd130a
@ -2,6 +2,10 @@
|
||||
* Plasma forge
|
||||
* Plasma-powered assembly machine
|
||||
* Used to produce lategame items that until now were regular assembler recipes
|
||||
* Can pass on plasma, 25% of the plasma energy that passes through a plasma forge is consumed
|
||||
* This allows plasma forges to be chained, or unused residue energy to be used in turbines
|
||||
* Parts that interact with the fusion reactor directly, like the collector chambers, are not compatible
|
||||
* Like all assembler-type machines, features custom animations (i spent a lot of time on those, please look at them for prolonged periods of time, ideally without blinking)
|
||||
|
||||
## Changed
|
||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||
@ -12,7 +16,7 @@
|
||||
* Gerald assembly now requires stellar flux
|
||||
* The DFC parts are now made in the plasma forge, with the recipes being more expensive
|
||||
* The restrictions for firing Folly (using the scope, waiting for the startup) no longer apply to NPCs (which can never fulfill them anyway), allowing them to actually use it
|
||||
* The plinking sound played when a drill cannot break a block now only plays once for the entire AoE instead of once for every single block that couldnt be broken
|
||||
* The plinking sound played when a drill cannot break a block now only plays once for the entire AoE instead of once for every single block that couldn't be broken
|
||||
|
||||
## Fixed
|
||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||
|
||||
@ -54,7 +54,7 @@ public class GUIMachinePlasmaForge extends GuiInfoContainer {
|
||||
PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe);
|
||||
|
||||
if(recipe != null) {
|
||||
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(forge.plasmaEnergySync) + "KyU / " + BobMathUtil.getShortNumber(recipe.ignitionTemp) + "KyU");
|
||||
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(forge.plasmaEnergySync) + "TU / " + BobMathUtil.getShortNumber(recipe.ignitionTemp) + "TU");
|
||||
} else {
|
||||
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, "0TU / 0TU");
|
||||
}
|
||||
|
||||
@ -42,8 +42,6 @@ public class ArcWelderRecipes extends SerializableRecipe {
|
||||
new OreDictStack(AL.plate(), 4), new OreDictStack(FIBER.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot())));
|
||||
recipes.add(new ArcWelderRecipe(DictFrame.fromOne(ModItems.part_generic, EnumPartType.LDE), 200, 10_000L,
|
||||
new OreDictStack(TI.plate(), 2), new OreDictStack(FIBER.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot())));
|
||||
recipes.add(new ArcWelderRecipe(DictFrame.fromOne(ModItems.part_generic, EnumPartType.HDE), 600, 25_000_000L, new FluidStack(Fluids.STELLAR_FLUX, 4_000),
|
||||
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 2), new OreDictStack(CMB.plateWelded(), 1), new ComparableStack(ModItems.ingot_cft)));
|
||||
|
||||
//Dense Wires
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.wire_dense, 1, Mats.MAT_COPPER.id), 100, 10_000L,
|
||||
|
||||
@ -557,6 +557,10 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
this.register(new GenericRecipe("ass.fusioncoupler").setup(300, 100).outputItems(new ItemStack(ModBlocks.fusion_coupler, 1))
|
||||
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 4), new OreDictStack(CU.plate(), 32), new OreDictStack(BSCCO.wireDense(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new OreDictStack(BSCCO.wireDense(), 16), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.COMPUTER)));
|
||||
this.register(new GenericRecipe("ass.fusionplasmaforge").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.fusion_plasma_forge, 1))
|
||||
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BSCCO.wireDense(), 32), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.PLASTIC), new OreDictStack(BSCCO.wireDense(), 32), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.COMPUTER))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
|
||||
// watz
|
||||
this.register(new GenericRecipe("ass.watzrod").setup(200, 100).outputItems(new ItemStack(ModBlocks.watz_element, 3))
|
||||
|
||||
@ -22,6 +22,7 @@ public class PlasmaForgeRecipe extends GenericRecipe {
|
||||
List<String> list = new ArrayList();
|
||||
list.add(EnumChatFormatting.YELLOW + this.getLocalizedName());
|
||||
|
||||
autoSwitch(list);
|
||||
duration(list);
|
||||
power(list);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey("gui.recipe.fusionIn") + ": " + BobMathUtil.getShortNumber(ignitionTemp) + "TU/t");
|
||||
|
||||
@ -13,10 +13,12 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.BlockICFLaserComponent.EnumICFPart;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -43,12 +45,60 @@ public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
String autoPlate = "autoswitch.weldPlates";
|
||||
|
||||
// Plates
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.plateeuphemium").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
|
||||
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.platednt").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
|
||||
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
|
||||
|
||||
// Components
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.hde").setInputEnergy(10_000_000).setup(600, 25_000_000L)
|
||||
.outputItems(DictFrame.fromOne(ModItems.part_generic, EnumPartType.HDE))
|
||||
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 2), new OreDictStack(CMB.plateWelded(), 1), new ComparableStack(ModItems.ingot_cft))
|
||||
.inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000)).setGroup(autoPlate, this));
|
||||
|
||||
// Welded Plates
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldiron").setInputEnergy(500_000).setup(50, 100L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_IRON.id))
|
||||
.inputItems(new OreDictStack(IRON.plateCast(), 2)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldsteel").setInputEnergy(500_000).setup(50, 500L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_STEEL.id))
|
||||
.inputItems(new OreDictStack(STEEL.plateCast(), 2)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldcopper").setInputEnergy(500_000).setup(50, 1_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_COPPER.id))
|
||||
.inputItems(new OreDictStack(CU.plateCast(), 2)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldtitanium").setInputEnergy(500_000).setup(300, 50_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_TITANIUM.id))
|
||||
.inputItems(new OreDictStack(TI.plateCast(), 2)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldzirconium").setInputEnergy(500_000).setup(300, 10_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_ZIRCONIUM.id))
|
||||
.inputItems(new OreDictStack(ZR.plateCast(), 2)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldaluminium").setInputEnergy(500_000).setup(150, 10_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_ALUMINIUM.id))
|
||||
.inputItems(new OreDictStack(AL.plateCast(), 2)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldtcalloy").setInputEnergy(500_000).setup(600, 1_000_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_TCALLOY.id))
|
||||
.inputItems(new OreDictStack(TCALLOY.plateCast(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.OXYGEN, 1_000)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldcdalloy").setInputEnergy(500_000).setup(600, 1_000_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_CDALLOY.id))
|
||||
.inputItems(new OreDictStack(CDALLOY.plateCast(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.OXYGEN, 1_000)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldtungsten").setInputEnergy(500_000).setup(600, 250_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_TUNGSTEN.id))
|
||||
.inputItems(new OreDictStack(W.plateCast(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.OXYGEN, 1_000)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldcmb").setInputEnergy(500_000).setup(600, 10_000_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_CMB.id))
|
||||
.inputItems(new OreDictStack(CMB.plateCast(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.REFORMGAS, 1_000)).setGroup(autoPlate, this));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.weldosmiridium").setInputEnergy(500_000).setup(3_000, 50_000_000L)
|
||||
.outputItems(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id))
|
||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateCast(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.REFORMGAS, 16_000)).setGroup(autoPlate, this));
|
||||
|
||||
// ICF
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcell").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CELL.ordinal()))
|
||||
.inputItems(new ComparableStack(ModItems.ingot_cft, 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new ComparableStack(ModBlocks.glass_quartz, 16))
|
||||
|
||||
@ -4,19 +4,33 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.Clock;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
public static EntityItem dummy;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
@ -39,13 +53,21 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
bindTexture(ResourceManager.fusion_plasma_forge_tex);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Body");
|
||||
|
||||
GenericRecipe recipe = PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe);
|
||||
|
||||
renderPlasma(forge);
|
||||
renderItem(forge, recipe, interp);
|
||||
renderBeam(forge, recipe, interp);
|
||||
|
||||
bindTexture(ResourceManager.fusion_plasma_forge_tex);
|
||||
|
||||
double[] striker = forge.armStriker.getPositions(interp);
|
||||
double[] jet = forge.armJet.getPositions(interp);
|
||||
double rotor = forge.prevRing + (forge.ring - forge.prevRing) * interp;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushMatrix(); { // brackets added in post for readability for the common person. i don't have such weaknesses.
|
||||
GL11.glRotated(rotor, 0, 1, 0);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushMatrix(); {
|
||||
ResourceManager.fusion_plasma_forge.renderPart("SliderStriker");
|
||||
GL11.glTranslated(-2.75, 2.5, 0);
|
||||
GL11.glRotated(-striker[0], 0, 0, 1);
|
||||
@ -59,25 +81,25 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
GL11.glRotated(-striker[2], 0, 0, 1);
|
||||
GL11.glTranslated(1.5, -3.75, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("StrikerMount");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushMatrix(); {
|
||||
GL11.glTranslated(0, 3.375, 0.5);
|
||||
GL11.glRotated(striker[3], 1, 0, 0);
|
||||
GL11.glTranslated(0, -3.375, -0.5);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("StrikerRight");
|
||||
GL11.glTranslated(0, -striker[4], 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("PistonRight");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
} GL11.glPopMatrix();
|
||||
GL11.glPushMatrix(); {
|
||||
GL11.glTranslated(0, 3.375, -0.5);
|
||||
GL11.glRotated(-striker[3], 1, 0, 0);
|
||||
GL11.glTranslated(0, -3.375, 0.5);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("StrikerLeft");
|
||||
GL11.glTranslated(0, -striker[5], 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("PistonLeft");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
} GL11.glPopMatrix();
|
||||
} GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushMatrix(); {
|
||||
ResourceManager.fusion_plasma_forge.renderPart("SliderJet");
|
||||
GL11.glTranslated(2.75, 2.5, 0);
|
||||
GL11.glRotated(jet[0], 0, 0, 1);
|
||||
@ -91,8 +113,89 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
GL11.glRotated(jet[2], 0, 0, 1);
|
||||
GL11.glTranslated(-1.5, -3.75, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Jet");
|
||||
if(forge.didProcess && forge.armJet.angles[2] == forge.armJet.prevAngles[2]) renderJet(forge);
|
||||
} GL11.glPopMatrix();
|
||||
} GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void renderJet(TileEntityFusionPlasmaForge forge) {
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
double outerLen = 1 + MainRegistry.proxy.me().getRNG().nextDouble() * 0.125;
|
||||
double narrow = 0.01;
|
||||
double side = 0.125;
|
||||
double near = 1.375;
|
||||
double far = 1.625;
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, side - narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, side - narrow);
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, -side + narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, -side + narrow);
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, -side + narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, side - narrow);
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, -side + narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, side - narrow);
|
||||
|
||||
narrow = 0.0625 * 1.5;
|
||||
outerLen *= 1.5;
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, side - narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, side - narrow);
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, -side + narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, -side + narrow);
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(near, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, -side + narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(near + narrow, 3 - outerLen, side - narrow);
|
||||
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 1F); tess.addVertex(far, 3, -side);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, -side + narrow);
|
||||
tess.setColorRGBA_F(forge.plasmaRed, forge.plasmaGreen, forge.plasmaBlue, 0F); tess.addVertex(far - narrow, 3 - outerLen, side - narrow);
|
||||
tess.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
protected void renderPlasma(TileEntityFusionPlasmaForge forge) {
|
||||
|
||||
if(forge.plasmaEnergySync <= 0) {
|
||||
GL11.glColor3f(0F, 0F, 0F);
|
||||
@ -152,12 +255,95 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
RenderArcFurnace.fullbright(false);
|
||||
}
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
protected void renderItem(TileEntityFusionPlasmaForge forge, GenericRecipe recipe, float interp) {
|
||||
if(recipe == null) return;
|
||||
if(MainRegistry.proxy.me().getDistanceSq(forge.xCoord + 0.5, forge.yCoord + 1, forge.zCoord + 0.5) > 35 * 35) return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glTranslated(0, 1.75, 0);
|
||||
|
||||
ItemStack stack = recipe.getIcon();
|
||||
stack.stackSize = 1;
|
||||
|
||||
if(stack.getItemSpriteNumber() == 0 && stack.getItem() instanceof ItemBlock) {
|
||||
if(RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType())) {
|
||||
GL11.glTranslated(0, -0.0625, 0);
|
||||
} else {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
}
|
||||
} else {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
}
|
||||
|
||||
GL11.glTranslated(0, Math.sin((MainRegistry.proxy.me().ticksExisted + interp) * 0.1) * 0.0625, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
|
||||
if(dummy == null || dummy.worldObj != forge.getWorldObj()) dummy = new EntityItem(forge.getWorldObj(), 0, 0, 0, stack);
|
||||
dummy.setEntityItemStack(stack);
|
||||
dummy.hoverStart = 0.0F;
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
RenderManager.instance.renderEntityWithPosYaw(dummy, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
// beam renders after the item so the transparency works correctly. beam is also larger, so the LOD sets off a bit later
|
||||
public void renderBeam(TileEntityFusionPlasmaForge forge, GenericRecipe recipe, float interp) {
|
||||
if(recipe == null) return;
|
||||
if(MainRegistry.proxy.me().getDistanceSq(forge.xCoord + 0.5, forge.yCoord + 1, forge.zCoord + 0.5) > 50 * 50) return;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
// i fucking love reusing textures
|
||||
this.bindTexture(Fluids.STELLAR_FLUX.getTexture());
|
||||
|
||||
double offset = ((MainRegistry.proxy.me().ticksExisted + interp) / 15D) % 1D;
|
||||
double in = 0.4375;
|
||||
double b = 1;
|
||||
double t = 1.5;
|
||||
double h = b + t;
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(-in, b, in, offset + t, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(-in, h, in, offset + 0, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(-in, h, -in, offset + 0, 1);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(-in, b, -in, offset + t, 1);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(in, h, in, offset + 0, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(in, b, in, offset + t, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(in, b, -in, offset + t, 1);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(in, h, -in, offset + 0, 1);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(in, b, in, offset + t, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(in, h, in, offset + 0, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(-in, h, in, offset + 0, 1);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(-in, b, in, offset + t, 1);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(in, h, -in, offset + 0, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(in, b, -in, offset + t, 0);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F); tess.addVertexWithUV(-in, b, -in, offset + t, 1);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F); tess.addVertexWithUV(-in, h, -in, offset + 0, 1);
|
||||
tess.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.fusion_plasma_forge);
|
||||
|
||||
@ -50,6 +50,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
public float plasmaBlue;
|
||||
public long plasmaEnergy;
|
||||
public long plasmaEnergySync;
|
||||
public double neutronEnergy;
|
||||
protected GenNode receiverNode;
|
||||
protected GenNode providerNode;
|
||||
|
||||
@ -85,6 +86,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
@Override public boolean receivesFusionPower() { return true; }
|
||||
@Override public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b) {
|
||||
this.plasmaEnergy = fusionPower;
|
||||
this.neutronEnergy = neutronPower;
|
||||
this.plasmaRed = r;
|
||||
this.plasmaGreen = g;
|
||||
this.plasmaBlue = b;
|
||||
@ -127,25 +129,25 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
this.didProcess = this.plasmaModule.didProcess;
|
||||
if(this.plasmaModule.markDirty) this.markDirty();
|
||||
|
||||
if(providerNode != null && providerNode.hasValidNet()) {
|
||||
long powerReceived = (long) Math.ceil(this.plasmaEnergySync * 0.75);
|
||||
if(powerReceived > 0 && providerNode != null && providerNode.hasValidNet()) {
|
||||
|
||||
for(Object o : providerNode.net.receiverEntries.entrySet()) {
|
||||
Entry<Object, Long> entry = (Entry<Object, Long>) o;
|
||||
|
||||
if(entry.getKey() instanceof IFusionPowerReceiver) {
|
||||
long powerReceived = (long) Math.ceil(this.plasmaEnergySync * 0.75);
|
||||
((IFusionPowerReceiver) entry.getKey()).receiveFusionPower(powerReceived, 0, plasmaRed, plasmaGreen, plasmaBlue);
|
||||
((IFusionPowerReceiver) entry.getKey()).receiveFusionPower(powerReceived, this.neutronEnergy, plasmaRed, plasmaGreen, plasmaBlue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.neutronEnergy = 0D;
|
||||
|
||||
this.networkPackNT(100);
|
||||
} else {
|
||||
|
||||
if(timeOffset == -1) this.timeOffset = worldObj.rand.nextInt(30_000);
|
||||
|
||||
didProcess = true;
|
||||
|
||||
this.armStriker.updateArm();
|
||||
this.armJet.updateArm();
|
||||
|
||||
@ -454,9 +456,15 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
} break;
|
||||
case RETRACT2: {
|
||||
if(arm.move()) {
|
||||
if(rand.nextInt(3) == 0) {
|
||||
arm.actionDelay = 10;
|
||||
arm.state = ForgeArmState.REPOSITION;
|
||||
choosePosition(arm, strikerPositions);
|
||||
} else {
|
||||
arm.actionDelay = 5;
|
||||
arm.state = ForgeArmState.EXTEND1;
|
||||
arm.targetAngles[4] = 0.5D;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case RETIRE: {
|
||||
@ -468,6 +476,12 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
/*if(arm.state == ForgeArmState.REPOSITION || arm.state == ForgeArmState.RETIRE) {
|
||||
arm.targetAngles[3] = 0;
|
||||
} else {
|
||||
arm.targetAngles[3] = 30;
|
||||
}*/
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") // shut up
|
||||
@ -478,7 +492,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
switch(arm.state) {
|
||||
case REPOSITION: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 40;
|
||||
arm.actionDelay = 20;
|
||||
arm.state = ForgeArmState.REPOSITION;
|
||||
choosePosition(arm, jetPositions);
|
||||
}
|
||||
|
||||
@ -191,6 +191,7 @@ autoswitch.plates=Metal Plates
|
||||
autoswitch.pwr=Reprocessing PWR Fuel
|
||||
autoswitch.schrab=Schrabidium Extraction
|
||||
autoswitch.watz=Reprocessing Watz Pellet
|
||||
autoswitch.weldPlates=Welded Plates
|
||||
autoswitch.zirnox=Reprocessing ZIRNOX Fuel
|
||||
|
||||
battery.mode.buffer=Input/Output Mode
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user