Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Large Fusion (#16)
Browse files Browse the repository at this point in the history
* large fusion structure

* gui stuff for large fusion

* minor fix

* more fusion and coils

* new structure block

* redesign the sturcture

* mk4 compact

* recipes

* oversight

* fix crash with latest tt

* fix PA recipe buttom

* casing tooltip

* nerf the controler and coil recipe

* remove the origin glass

* fix casing amount

* compact mk5

* remove shit

* cache

* no null positionstack

* fix OF in mk5 and balance

* balance
  • Loading branch information
GlodBlock authored Feb 20, 2022
1 parent 9e3ad3d commit c713272
Show file tree
Hide file tree
Showing 28 changed files with 2,633 additions and 112 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ usesShadowedDependencies = false
#customArchiveBaseName =

# Optional parameter to prevent the source code from being published
# noPublishedSources =
# noPublishedSources =
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

public interface ITextureBlock {

ITexture[] getTexture(Block aBlock, byte aSide);
default ITexture[] getTexture(Block aBlock, byte aSide) {
return getTexture(aBlock, 0, aSide);
}

ITexture[] getTexture(Block aBlock, byte aSide, IBlockAccess aWorld, int xCoord, int yCoord, int zCoord);

ITexture[] getTexture(Block aBlock, int aMeta, byte aSide);

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ public ITexture[] getTurbineCasing(int iconIndex, boolean active, boolean hasTur
};
}

@Override
public ITexture[] getTexture(Block aBlock, byte aSide) {
return new ITexture[] {
TextureFactory.of(base)
};
}

@Override
public ITexture[] getTexture(Block aBlock, byte aSide, IBlockAccess aWorld, int xCoord, int yCoord, int zCoord) {
int tInvertLeftRightMod = aSide % 2 * 2 - 1;
Expand Down Expand Up @@ -98,6 +91,13 @@ public ITexture[] getTexture(Block aBlock, byte aSide, IBlockAccess aWorld, int
return getTexture(aBlock, aSide);
}

@Override
public ITexture[] getTexture(Block aBlock, int aMeta, byte aSide) {
return new ITexture[] {
TextureFactory.of(base)
};
}

@Override
public int getRenderType() {
if (BlockRenderHandler.INSTANCE == null) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
package goodgenerator.blocks.tileEntity;

import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import goodgenerator.blocks.tileEntity.base.LargeFusionComputer;
import goodgenerator.loader.Loaders;
import goodgenerator.util.DescTextLocalization;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import org.lwjgl.input.Keyboard;

import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW;

public class LargeFusionComputer1 extends LargeFusionComputer {

private static final ITexture textureOverlay = TextureFactory.of(
TextureFactory.builder().addIcon(OVERLAY_FUSION1).extFacing().build(),
TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build());

public LargeFusionComputer1(int id, String name, String nameRegional) {
super(id,name,nameRegional);
}

public LargeFusionComputer1(String name) {
super(name);
}

@Override
public String[] getDescription() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Fusion Reactor")
.addInfo("Millions of nuclear.")
.addInfo("Controller block for the Compact Fusion Reactor MK-I Prototype.")
.addInfo("131,072EU/t and 5M EU capacity per Energy Hatch")
.addInfo("If the recipe has a startup cost greater than the")
.addInfo("number of energy hatches * cap, you can't do it")
.addInfo("Make sure the whole structure is built in the 3x3")
.addInfo("chuck area of the ring center (not controller).")
.addInfo("It can run 64x recipes at most.")
.addInfo("Support" + EnumChatFormatting.BLUE + " Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.GRAY + " Energy/Laser Hatches!")
.addInfo("The structure is too complex!")
.addInfo(BLUE_PRINT_INFO)
.addSeparator()
.addCasingInfo("LuV Machine Casing", 1666)
.addCasingInfo("Ameliorated Superconduct Coil", 558)
.addCasingInfo("Naquadah Alloy Frame Boxes", 128)
.addCasingInfo("Chrome Reinforced Borosilicate Glass Block", 63)
.addEnergyHatch("1-32, Hint block with dot 3", 3)
.addInputHatch("2-16, Hint block with dot 1", 1)
.addOutputHatch("1-16, Hint block with dot 2", 2)
.addStructureInfo("ALL Hatches must be LuV or better")
.toolTipFinisher("Good Generator");
if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
return tt.getInformation();
} else {
return tt.getStructureInformation();
}
}

@Override
public long maxEUStore() {
return 160008000L * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

@Override
public Block getCasingBlock() {
return GregTech_API.sBlockCasings1;
}

@Override
public int getCasingMeta() {
return 6;
}

@Override
public Block getCoilBlock() {
return Loaders.compactFusionCoil;
}

@Override
public int getCoilMeta() {
return 0;
}

@Override
public Block getGlassBlock() {
return ItemRegistry.bw_realglas;
}

@Override
public int getGlassMeta() {
return 3;
}

@Override
public int hatchTier() {
return 6;
}

@Override
public Materials getFrameBox() {
return Materials.NaquadahAlloy;
}

@Override
public int getMaxPara() {
return 64;
}

@Override
public int extraPara(int startEnergy) {
return 1;
}

@Override
public ITexture getTextureOverlay() {
return textureOverlay;
}

@Override
public int tierOverclock() {
return 1;
}

@Override
public String[] getStructureDescription(ItemStack stackSize) {
return DescTextLocalization.addText("LargeFusion1.hint", 9);
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new LargeFusionComputer1(mName);
}
}
Loading

0 comments on commit c713272

Please sign in to comment.