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

Remove deprecated render classes #3773

Merged
merged 24 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4ad9d33
remove GTMultiTexture
serenibyss Jan 9, 2025
99398b2
remove GTSidedTexture
serenibyss Jan 9, 2025
1a99a9b
remove GTStdRenderedTexture
serenibyss Jan 9, 2025
25a15fa
remove GTPPCopiedBlockTexture
serenibyss Jan 9, 2025
a26912a
remove GTCopiedBlockTexture
serenibyss Jan 9, 2025
95204d1
remove GTPPRenderedTexture
serenibyss Jan 9, 2025
b127163
GTRenderedTexture - simple fixes
serenibyss Jan 10, 2025
d3d2b8d
GTRenderedTexture - complex fixes
serenibyss Jan 10, 2025
e904fea
remove GTRenderedTexture
serenibyss Jan 10, 2025
1cfbd06
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 10, 2025
5f5dce1
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 11, 2025
964ca11
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 11, 2025
c767ac4
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 12, 2025
93fa6aa
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 12, 2025
a22da78
Merge branch 'master' into deprecations-cleanup/render
serenibyss Jan 14, 2025
8d2d61b
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 15, 2025
a9c1130
Merge branch 'master' into deprecations-cleanup/render
serenibyss Jan 17, 2025
e47290a
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 18, 2025
927715f
Merge branch 'master' into deprecations-cleanup/render
serenibyss Jan 19, 2025
9c821a8
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 20, 2025
d3c6c46
fix gt++ ore block renderer
serenibyss Jan 25, 2025
cacdbdc
Merge branch 'master' into deprecations-cleanup/render
serenibyss Jan 25, 2025
9911665
Merge branch 'master' into deprecations-cleanup/render
Dream-Master Jan 25, 2025
69be879
Merge branch 'master' into deprecations-cleanup/render
serenibyss Jan 25, 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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.logic.ProcessingLogic;
import gregtech.api.objects.GTRenderedTexture;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
Expand Down Expand Up @@ -268,17 +267,16 @@ public boolean supportsVoidProtection() {
}

@Override
@SuppressWarnings("ALL")
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
int colorIndex, boolean aActive, boolean aRedstone) {
if (side == facing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(179),
new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE), TextureFactory.builder()
TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE), TextureFactory.builder()
.addIcon(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
.glow()
.build() };
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(179),
new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE), TextureFactory.builder()
TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE), TextureFactory.builder()
.addIcon(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
.glow()
.build() };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import gregtech.api.metatileentity.implementations.MTEHatch;
import gregtech.api.metatileentity.implementations.MTEHatchDynamo;
import gregtech.api.metatileentity.implementations.MTEHatchInput;
import gregtech.api.objects.GTRenderedTexture;
import gregtech.api.objects.XSTR;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
Expand Down Expand Up @@ -479,17 +478,16 @@ protected MultiblockTooltipBuilder createTooltip() {
}

@Override
@SuppressWarnings("ALL")
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
int colorIndex, boolean aActive, boolean aRedstone) {
if (side == facing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(1536),
new GTRenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG), TextureFactory.builder()
TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG), TextureFactory.builder()
.addIcon(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG_GLOW)
.glow()
.build() };
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(1536),
new GTRenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG) };
TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG) };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(1536) };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import gregtech.api.metatileentity.implementations.MTEHatchInput;
import gregtech.api.metatileentity.implementations.MTEHatchMaintenance;
import gregtech.api.metatileentity.implementations.MTEHatchOutput;
import gregtech.api.objects.GTRenderedTexture;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
Expand Down Expand Up @@ -439,17 +438,16 @@ protected MultiblockTooltipBuilder createTooltip() {
}

@Override
@SuppressWarnings("ALL")
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
int colorIndex, boolean aActive, boolean aRedstone) {
if (side == facing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(44),
new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), TextureFactory.builder()
TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), TextureFactory.builder()
.addIcon(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW)
.glow()
.build() };
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(44),
new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT) };
TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT) };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(44) };
}
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/gregtech/api/enums/TAE.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import java.util.HashSet;

import gregtech.api.interfaces.ITexture;
import gregtech.api.render.TextureFactory;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.GTPPCore;
import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture;

public class TAE {

Expand All @@ -16,7 +16,7 @@ public class TAE {
public static int gtPPLastUsedIndex = 64;
public static int secondaryIndex = 0;

public static HashMap<Integer, GTPPCopiedBlockTexture> mTAE = new HashMap<>();
public static HashMap<Integer, ITexture> mTAE = new HashMap<>();
private static final HashSet<Integer> mFreeSlots = new HashSet<>(64);

static {
Expand All @@ -28,20 +28,20 @@ public class TAE {

/**
*
* @param aPage - The Texture page (0-3)
* @param aID - The ID on the specified page (0-15)
* @param GTPPCopiedBlockTexture - The Texture to register
* @param aPage - The Texture page (0-3)
* @param aID - The ID on the specified page (0-15)
* @param texture - The Texture to register
* @return - Did it register correctly?
*/
public static boolean registerTexture(int aPage, int aID, GTPPCopiedBlockTexture GTPPCopiedBlockTexture) {
public static boolean registerTexture(int aPage, int aID, ITexture texture) {
int aRealID = aID + (aPage * 16);
return registerTexture(64 + aRealID, GTPPCopiedBlockTexture);
return registerTexture(64 + aRealID, texture);
}

public static boolean registerTexture(int aID, GTPPCopiedBlockTexture GTPPCopiedBlockTexture) {
public static boolean registerTexture(int aID, ITexture texture) {
if (mFreeSlots.contains(aID)) {
mFreeSlots.remove(aID);
mTAE.put(aID, GTPPCopiedBlockTexture);
mTAE.put(aID, texture);
return true;
} else {
GTPPCore.crash("Tried to register texture with ID " + aID + " to TAE, but it is already in use.");
Expand All @@ -66,7 +66,7 @@ public static void finalizeTAE() {
Logger.INFO("Free Page slots within TAE: " + aPageAndSlotFree);
Logger.INFO("Filling them with ERROR textures.");
for (int aFreeSlot : aTemp) {
registerTexture(aFreeSlot, new GTPPCopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15));
registerTexture(aFreeSlot, TextureFactory.of(ModBlocks.blockCasingsTieredGTPP, 15));
}
Logger.INFO("Finalising TAE.");
for (int aKeyTae : mTAE.keySet()) {
Expand Down
36 changes: 0 additions & 36 deletions src/main/java/gregtech/api/objects/GTCopiedBlockTexture.java

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/java/gregtech/api/objects/GTMultiTexture.java

This file was deleted.

33 changes: 0 additions & 33 deletions src/main/java/gregtech/api/objects/GTRenderedTexture.java

This file was deleted.

48 changes: 0 additions & 48 deletions src/main/java/gregtech/api/objects/GTSidedTexture.java

This file was deleted.

46 changes: 0 additions & 46 deletions src/main/java/gregtech/api/objects/GTStdRenderedTexture.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.MTETieredMachineBlock;
import gregtech.api.objects.GTRenderedTexture;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTLog;

public class MTEWorldAccelerator extends MTETieredMachineBlock {
Expand Down Expand Up @@ -173,10 +173,10 @@ public ITexture[] getTexture(IGregTechTileEntity pBaseMetaTileEntity, ForgeDirec
int colorIndex, boolean pActive, boolean pRedstone) {
if (mMode == 0) {
return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][colorIndex + 1], side.offsetY != 0 ? null
: pActive ? new GTRenderedTexture(_mGTIco_Norm_Active) : new GTRenderedTexture(_mGTIco_Norm_Idle) };
: pActive ? TextureFactory.of(_mGTIco_Norm_Active) : TextureFactory.of(_mGTIco_Norm_Idle) };
} else {
return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][colorIndex + 1], side.offsetY != 0 ? null
: pActive ? new GTRenderedTexture(_mGTIco_TE_Active) : new GTRenderedTexture(_mGTIco_TE_Idle) };
: pActive ? TextureFactory.of(_mGTIco_TE_Active) : TextureFactory.of(_mGTIco_TE_Idle) };
}
}

Expand Down
Loading
Loading