diff options
| author | Martin Robertz <dream-master@gmx.net> | 2022-10-31 18:20:16 +0100 |
|---|---|---|
| committer | Martin Robertz <dream-master@gmx.net> | 2022-10-31 18:20:16 +0100 |
| commit | 751e9117abff08d46d82081bc043757d65d67823 (patch) | |
| tree | c63546423f436a5f1cd077dbb836fe0ea78b2c91 /src/main/java/gtPlusPlus/core | |
| parent | 444c1846d07a7eec71879cf039034ef8dccc60d0 (diff) | |
| download | GT5-Unofficial-751e9117abff08d46d82081bc043757d65d67823.tar.gz GT5-Unofficial-751e9117abff08d46d82081bc043757d65d67823.tar.bz2 GT5-Unofficial-751e9117abff08d46d82081bc043757d65d67823.zip | |
Revert "ref(texture_api): update to the texture api (#386)"
This reverts commit 0121112e5ea9c72050957af2c2ad4aecd9d70270.
Diffstat (limited to 'src/main/java/gtPlusPlus/core')
| -rw-r--r-- | src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java | 16 | ||||
| -rw-r--r-- | src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java index cfc107b4fa..81f1737f8c 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -5,7 +5,6 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.interfaces.ITexturedBlock; import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer; @@ -15,6 +14,8 @@ import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; +import gtPlusPlus.xmod.gregtech.api.objects.GTPP_RenderedTexture; import java.lang.reflect.Field; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +23,6 @@ import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.util.ForgeDirection; public class BlockBaseOre extends BasicBlock implements ITexturedBlock { @@ -101,11 +101,11 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { public ITexture[] getTexture(Block block, byte side) { if (this.blockMaterial != null) { - ITexture aIconSet = TextureFactory.of( + GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null) { - return new ITexture[] {TextureFactory.of(Blocks.stone, 0, ForgeDirection.DOWN), aIconSet}; + return new ITexture[] {new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; } } @@ -126,7 +126,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { } } } - return new ITexture[] {TextureFactory.of(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; + return new ITexture[] {new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; } @Override @@ -214,11 +214,11 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { public ITexture[] getTexture(Block block, byte side) { if (this.blockMaterial != null) { - ITexture aIconSet = TextureFactory.of( + GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null) { - return new ITexture[] {TextureFactory.of(Blocks.stone, 0, ForgeDirection.DOWN), aIconSet}; + return new ITexture[] {new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; } } @@ -239,7 +239,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { } } } - return new ITexture[] {TextureFactory.of(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; + return new ITexture[] {new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; } } } diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index 46c40a3bdc..aa22f7d813 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -6,7 +6,7 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; @@ -155,13 +155,13 @@ public class BaseItemComponent extends Item { if (componentType == ComponentTypes.PLATE) { GregTech_API.registerCover( componentMaterial.getPlate(1), - TextureFactory.of( + new GT_RenderedTexture( componentMaterial.getTextureSet().mTextures[71], componentMaterial.getRGBA(), false), null); } else if (componentType == ComponentTypes.PLATEDOUBLE) { GregTech_API.registerCover( componentMaterial.getPlateDouble(1), - TextureFactory.of( + new GT_RenderedTexture( componentMaterial.getTextureSet().mTextures[72], componentMaterial.getRGBA(), false), null); } |
