Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NC hatches for PCB Factory and QFT #3737

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ce2954e
pcb nanite absorption
GDCloudstrike Dec 27, 2024
66796aa
nbt handling
GDCloudstrike Dec 27, 2024
f618325
integrate into processinglogic and fix some nbt issues
GDCloudstrike Dec 27, 2024
d17646f
make recipes work via stored nanites
GDCloudstrike Dec 27, 2024
5944035
add NC hatch base and nanite hatch
GDCloudstrike Dec 29, 2024
9829f2b
add filtering
GDCloudstrike Dec 29, 2024
579420e
nanite hatch textures
GDCloudstrike Dec 29, 2024
6fa9118
add output slot locking
GDCloudstrike Dec 29, 2024
43969d0
save to item nbt
GDCloudstrike Dec 29, 2024
08d045d
add stored amount to tooltip
GDCloudstrike Dec 29, 2024
707df40
add ae2 integration
GDCloudstrike Dec 29, 2024
f0b92ee
integrate hatch into pcb factory and revert some now obsoleted changes
GDCloudstrike Dec 30, 2024
ac90bb0
clear nanite bus list on structurecheck
GDCloudstrike Dec 30, 2024
baf4b0c
rename hatch to bus
GDCloudstrike Dec 30, 2024
0f5b98f
add bulk catalyst housing
GDCloudstrike Dec 30, 2024
9155623
add qft functionality
GDCloudstrike Dec 30, 2024
ee58e1a
add glow to regular catalyst housing
GDCloudstrike Dec 30, 2024
45354d7
update tooltips
GDCloudstrike Dec 30, 2024
554dccf
add capacity to tooltip
GDCloudstrike Dec 30, 2024
b5c5adb
Merge remote-tracking branch 'origin/master' into fix_stocking_dupes
GDCloudstrike Dec 30, 2024
4d1e590
bump nanite bus tier
GDCloudstrike Dec 30, 2024
ad3ab29
fix controller texture
GDCloudstrike Dec 30, 2024
be3b52d
add qft icon to recipemap
GDCloudstrike Dec 30, 2024
996fc35
Merge branch 'master' into fix_stocking_dupes
GDCloudstrike Dec 30, 2024
6f17355
Merge branch 'master' into fix_stocking_dupes
Dream-Master Dec 31, 2024
d3c8136
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 4, 2025
f9592da
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 5, 2025
8a3a33e
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 5, 2025
f01612d
add mention of new hatches to tooltips
GDCloudstrike Jan 6, 2025
78dd2ab
Merge branch 'master' into fix_stocking_dupes
GDCloudstrike Jan 6, 2025
663d353
Merge remote-tracking branch 'origin/master' into fix_stocking_dupes
GDCloudstrike Jan 7, 2025
9606754
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 8, 2025
5c242be
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 9, 2025
e4fe2ad
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 9, 2025
79d1f7e
Update ItemList.java
Dream-Master Jan 9, 2025
c82587a
Update Textures.java
Dream-Master Jan 9, 2025
06023c6
sa
Dream-Master Jan 9, 2025
ed2e3a4
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 10, 2025
4f97146
refactor recipe addition to use downstream
GDCloudstrike Jan 10, 2025
4f1ca3a
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 11, 2025
94961da
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 11, 2025
d7ade7d
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 11, 2025
c1f1123
Merge branch 'master' into fix_stocking_dupes
Dream-Master Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/gregtech/GTMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import gregtech.api.gui.modularui.GTUIInfos;
import gregtech.api.interfaces.internal.IGTMod;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
import gregtech.api.metatileentity.implementations.MTEHatchNonConsumableBase;
import gregtech.api.objects.ItemData;
import gregtech.api.objects.XSTR;
import gregtech.api.registries.LHECoolantRegistry;
Expand Down Expand Up @@ -513,6 +514,7 @@ public void onPostLoad(FMLPostInitializationEvent aEvent) {
GTForestryCompat.transferSqueezerRecipes();
}
MTEDigitalChestBase.registerAEIntegration();
MTEHatchNonConsumableBase.registerAEIntegration();
ItemStack facade = AEApi.instance()
.definitions()
.items()
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/gregtech/api/enums/ItemList.java
Original file line number Diff line number Diff line change
Expand Up @@ -2600,9 +2600,12 @@ public enum ItemList implements IItemContainer {
Casing_AirFilter_Vent_T3,
Casing_Pyrolyse,
NameRemover,
Hatch_Nanite,
Hatch_Catalyst_Bulk,
Machine_Multi_AirFilterT1,
Machine_Multi_AirFilterT2,
Machine_Multi_AirFilterT3,

// semicolon after the comment to reduce merge conflicts
;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/gregtech/api/enums/MetaTileEntityIDs.java
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,8 @@ public enum MetaTileEntityIDs {
PURIFICATION_UNIT_DEGASIFIER(9412),
HATCH_DEGASIFIER_CONTROL(9413),
PURIFICATION_UNIT_PARTICLE_EXTRACTOR(9414),
HATCH_NANITE(9415),
HATCH_CATALYST_BULK(9416),
PLASMA_GENERATOR_ZPM(10752),
PLASMA_GENERATOR_UV(10753),
ALLOY_SMELTER_LuV(10760),
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/gregtech/api/enums/Textures.java
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,12 @@ public enum BlockIcons implements IIconContainer, Runnable {
NEUTRONIUM_STABLE_CASING,
EXTREME_DENSITY_CASING,
RADIATION_ABSORBENT_CASING,
HAWKING_GLASS;
HAWKING_GLASS,
OVERLAY_NANITE_HATCH,
OVERLAY_NANITE_HATCH_GLOW

// semicolon after the comment to reduce merge conflicts
;

/**
* Icon for Fresh CFoam
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package gregtech.api.metatileentity.implementations;

import net.minecraft.item.ItemStack;

import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.render.TextureFactory;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;

public class MTEHatchBulkCatalystHousing extends MTEHatchNonConsumableBase {

private int catalystCapacity = 0;

public MTEHatchBulkCatalystHousing(int ID, String name, String nameRegional, int tier, int itemCapacity) {
super(ID, name, nameRegional, tier, "Dedicated Catalyst Storage");
catalystCapacity = itemCapacity;
}

public MTEHatchBulkCatalystHousing(String name, String[] description, ITexture[][][] textures, int tier,
int itemCapacity) {
super(name, tier, description, textures);
catalystCapacity = itemCapacity;
}

@Override
protected int getItemCapacity() {
return catalystCapacity;
}

public int getStoredCatalystMeta() {
if (getItemStack() == null) return -1;
return getItemStack().getItemDamage();
}

@Override
protected boolean isValidItem(ItemStack item) {
return ItemUtils.isCatalyst(item);
}

@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.builder()
.addIcon(TexturesGtBlock.Overlay_Bus_Catalyst)
.extFacing()
.build(),
TextureFactory.builder()
.addIcon(TexturesGtBlock.Overlay_Bus_Catalyst)
.extFacing()
.glow()
.build() };
}

@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.builder()
.addIcon(TexturesGtBlock.Overlay_Bus_Catalyst)
.extFacing()
.build(),
TextureFactory.builder()
.addIcon(TexturesGtBlock.Overlay_Bus_Catalyst)
.extFacing()
.glow()
.build() };
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new MTEHatchBulkCatalystHousing(mName, mDescriptionArray, mTextures, mTier, catalystCapacity);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package gregtech.api.metatileentity.implementations;

import net.minecraft.item.ItemStack;

import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.ItemData;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTOreDictUnificator;

public class MTEHatchNanite extends MTEHatchNonConsumableBase {

private int naniteCapacity = 0;

public MTEHatchNanite(int ID, String name, String nameRegional, int tier, int itemCapacity) {
super(ID, name, nameRegional, tier, "Holds nanites for use in multiblocks");
naniteCapacity = itemCapacity;
}

public MTEHatchNanite(String name, String[] description, ITexture[][][] textures, int tier, int itemCapacity) {
super(name, tier, description, textures);
naniteCapacity = itemCapacity;
}

@Override
protected int getItemCapacity() {
return naniteCapacity;
}

public Materials getStoredNaniteMaterial() {
if (getItemStack() == null) return null;
ItemData data = GTOreDictUnificator.getAssociation(getItemStack());
if (data == null) return null;
return data.mMaterial.mMaterial;
}

@Override
protected boolean isValidItem(ItemStack item) {
ItemData data = GTOreDictUnificator.getAssociation(item);
if (data == null) {
return false;
}
OrePrefixes prefix = data.mPrefix;
return prefix == OrePrefixes.nanite;
}

@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.builder()
.addIcon(Textures.BlockIcons.OVERLAY_NANITE_HATCH)
.extFacing()
.build(),
TextureFactory.builder()
.addIcon(Textures.BlockIcons.OVERLAY_NANITE_HATCH_GLOW)
.extFacing()
.glow()
.build() };
}

@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.builder()
.addIcon(Textures.BlockIcons.OVERLAY_NANITE_HATCH)
.extFacing()
.build(),
TextureFactory.builder()
.addIcon(Textures.BlockIcons.OVERLAY_NANITE_HATCH_GLOW)
.extFacing()
.glow()
.build() };
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new MTEHatchNanite(mName, mDescriptionArray, mTextures, mTier, naniteCapacity);
}
}
Loading
Loading