From f01ab3d8607f08cfe92ed53dfe696e6cbe81cd8a Mon Sep 17 00:00:00 2001 From: Gregorius Techneticies Date: Sun, 24 Dec 2023 01:20:37 +0100 Subject: [PATCH] snowed rocks and sticks --- src/main/java/gregapi/data/IL.java | 2 ++ .../java/gregapi/load/LoaderItemList.java | 10 ++++++++++ .../loaders/c/Loader_Recipes_Other.java | 4 ++-- .../loaders/c/Loader_Recipes_Temporary.java | 12 ++++++++++++ .../placeables/MultiTileEntityRock.java | 16 ++++++++++------ .../placeables/MultiTileEntityStick.java | 19 ++++++++++++++----- 6 files changed, 50 insertions(+), 13 deletions(-) diff --git a/src/main/java/gregapi/data/IL.java b/src/main/java/gregapi/data/IL.java index 89510c340..db2795c65 100644 --- a/src/main/java/gregapi/data/IL.java +++ b/src/main/java/gregapi/data/IL.java @@ -88,6 +88,8 @@ public enum IL implements IItemContainer { NeLi_Blackstone, NeLi_Blackstone_Bricks, NeLi_Blackstone_Chiseled, NeLi_Blackstone_Cracked, NeLi_Blackstone_Polished, NeLi_Blackstone_Tiles, NeLi_Blackstone_Cross, NeLi_Blackstone_Path, NeLi_Basalt, NeLi_Basalt_Polished, NeLi_Crystal_White, NeLi_Crystal_Blue, NeLi_Crystal_Green, NeLi_Crystal_Yellow, NeLi_Crystal_Magenta, NeLi_Budding_White, NeLi_Budding_Blue, NeLi_Budding_Green, NeLi_Budding_Yellow, NeLi_Budding_Magenta, + NeLi_Cluster_White, NeLi_Cluster_Blue, NeLi_Cluster_Green, NeLi_Cluster_Yellow, NeLi_Cluster_Magenta, + NeLi_Clu2ter_White, NeLi_Clu2ter_Blue, NeLi_Clu2ter_Green, NeLi_Clu2ter_Yellow, NeLi_Clu2ter_Magenta, NeLi_Glass_White, NeLi_Glass_Blue, NeLi_Glass_Green, NeLi_Glass_Yellow, NeLi_Glass_Magenta, NeLi_Lamp_White, NeLi_Lamp_Blue, NeLi_Lamp_Green, NeLi_Lamp_Yellow, NeLi_Lamp_Magenta, NeLi_Redstone_Lamp_White, NeLi_Redstone_Lamp_Blue, NeLi_Redstone_Lamp_Green, NeLi_Redstone_Lamp_Yellow, NeLi_Redstone_Lamp_Magenta, diff --git a/src/main/java/gregapi/load/LoaderItemList.java b/src/main/java/gregapi/load/LoaderItemList.java index 5d68b2804..9e4f20dfa 100644 --- a/src/main/java/gregapi/load/LoaderItemList.java +++ b/src/main/java/gregapi/load/LoaderItemList.java @@ -1311,6 +1311,16 @@ public void run() { IL.NeLi_Budding_Green .set(ST.make(MD.NeLi, "NetherCrystal" , 1, 7), new OreDictItemData(MT.FluoriteGreen , U*4)); IL.NeLi_Budding_Yellow .set(ST.make(MD.NeLi, "NetherCrystal" , 1, 8), new OreDictItemData(MT.FluoriteYellow , U*4)); IL.NeLi_Budding_Magenta .set(ST.make(MD.NeLi, "NetherCrystal" , 1, 9), new OreDictItemData(MT.FluoriteMagenta, U*4)); + IL.NeLi_Cluster_White .set(ST.make(MD.NeLi, "CrystalClusterWhite" , 1, 0), new OreDictItemData(MT.FluoriteWhite , U )); + IL.NeLi_Cluster_Blue .set(ST.make(MD.NeLi, "CrystalClusterBlue" , 1, 0), new OreDictItemData(MT.FluoriteBlue , U )); + IL.NeLi_Cluster_Green .set(ST.make(MD.NeLi, "CrystalClusterGreen" , 1, 0), new OreDictItemData(MT.FluoriteGreen , U )); + IL.NeLi_Cluster_Yellow .set(ST.make(MD.NeLi, "CrystalClusterYellow" , 1, 0), new OreDictItemData(MT.FluoriteYellow , U )); + IL.NeLi_Cluster_Magenta .set(ST.make(MD.NeLi, "CrystalClusterMagenta" , 1, 0), new OreDictItemData(MT.FluoriteMagenta, U )); + IL.NeLi_Clu2ter_White .set(ST.make(MD.NeLi, "CrystalClusterWhite" , 1, 1), new OreDictItemData(MT.FluoriteWhite , U*3)); + IL.NeLi_Clu2ter_Blue .set(ST.make(MD.NeLi, "CrystalClusterBlue" , 1, 1), new OreDictItemData(MT.FluoriteBlue , U*3)); + IL.NeLi_Clu2ter_Green .set(ST.make(MD.NeLi, "CrystalClusterGreen" , 1, 1), new OreDictItemData(MT.FluoriteGreen , U*3)); + IL.NeLi_Clu2ter_Yellow .set(ST.make(MD.NeLi, "CrystalClusterYellow" , 1, 1), new OreDictItemData(MT.FluoriteYellow , U*3)); + IL.NeLi_Clu2ter_Magenta .set(ST.make(MD.NeLi, "CrystalClusterMagenta" , 1, 1), new OreDictItemData(MT.FluoriteMagenta, U*3)); IL.NeLi_Lamp_White .set(ST.make(MD.NeLi, "CrystalLamp" , 1, 0), new OreDictItemData(MT.FluoriteWhite , U*4, ANY.Glowstone, U*4), CR.DELATE); IL.NeLi_Lamp_Blue .set(ST.make(MD.NeLi, "CrystalLamp" , 1, 1), new OreDictItemData(MT.FluoriteBlue , U*4, ANY.Glowstone, U*4), CR.DELATE); IL.NeLi_Lamp_Green .set(ST.make(MD.NeLi, "CrystalLamp" , 1, 2), new OreDictItemData(MT.FluoriteGreen , U*4, ANY.Glowstone, U*4), CR.DELATE); diff --git a/src/main/java/gregtech/loaders/c/Loader_Recipes_Other.java b/src/main/java/gregtech/loaders/c/Loader_Recipes_Other.java index 141859225..6f05dd982 100644 --- a/src/main/java/gregtech/loaders/c/Loader_Recipes_Other.java +++ b/src/main/java/gregtech/loaders/c/Loader_Recipes_Other.java @@ -556,9 +556,9 @@ public class Loader_Recipes_Other implements Runnable { // Glass for (int i = 0; i < 16; i++) { - RM.Mixer .addRecipe1(T, 16, 16, OM.dust(MT.Na2SO4 ), FL.array(MT.Glass.liquid(U*9*4, T), FL.mul(DYE_FLUIDS_CHEMICAL[i], 1, 1, T)), ZL_FS, ST.make(BlocksGT.Glass, 4, i)); + RM.Mixer .addRecipe1(T, 16, 64, OM.dust(MT.Na2SO4 ), FL.array(MT.Glass.liquid(U*9*4, T), FL.mul(DYE_FLUIDS_CHEMICAL[i], 1, 1, T)), ZL_FS, ST.make(BlocksGT.Glass, 4, i)); RM.Mixer .addRecipe1(T, 16, 16, OM.dust(MT.Na2SO4, U4), FL.array(MT.Glass.liquid(U*9 , T), FL.mul(DYE_FLUIDS_CHEMICAL[i], 1, 4, T)), ZL_FS, ST.make(BlocksGT.Glass, 1, i)); - RM.Mixer .addRecipe1(T, 16, 16, OM.dust(MT.K2SO4 ), FL.array(MT.Glass.liquid(U*9*4, T), FL.mul(DYE_FLUIDS_CHEMICAL[i], 1, 1, T)), ZL_FS, ST.make(BlocksGT.Glass, 4, i)); + RM.Mixer .addRecipe1(T, 16, 64, OM.dust(MT.K2SO4 ), FL.array(MT.Glass.liquid(U*9*4, T), FL.mul(DYE_FLUIDS_CHEMICAL[i], 1, 1, T)), ZL_FS, ST.make(BlocksGT.Glass, 4, i)); RM.Mixer .addRecipe1(T, 16, 16, OM.dust(MT.K2SO4 , U4), FL.array(MT.Glass.liquid(U*9 , T), FL.mul(DYE_FLUIDS_CHEMICAL[i], 1, 4, T)), ZL_FS, ST.make(BlocksGT.Glass, 1, i)); for (OreDictMaterial tMat : ANY.Glowstone.mToThis) { diff --git a/src/main/java/gregtech/loaders/c/Loader_Recipes_Temporary.java b/src/main/java/gregtech/loaders/c/Loader_Recipes_Temporary.java index 2e1a76722..dacef0d0f 100644 --- a/src/main/java/gregtech/loaders/c/Loader_Recipes_Temporary.java +++ b/src/main/java/gregtech/loaders/c/Loader_Recipes_Temporary.java @@ -370,6 +370,18 @@ public class Loader_Recipes_Temporary implements Runnable { RM.glowstone(IL.NeLi_Gloomstone.get(1), MT.Gloomstone); + RM.smash(IL.NeLi_Cluster_White .get(1), OP.gem.mat(MT.FluoriteWhite , 1)); + RM.smash(IL.NeLi_Cluster_Blue .get(1), OP.gem.mat(MT.FluoriteBlue , 1)); + RM.smash(IL.NeLi_Cluster_Green .get(1), OP.gem.mat(MT.FluoriteGreen , 1)); + RM.smash(IL.NeLi_Cluster_Yellow .get(1), OP.gem.mat(MT.FluoriteYellow , 1)); + RM.smash(IL.NeLi_Cluster_Magenta.get(1), OP.gem.mat(MT.FluoriteMagenta, 1)); + + RM.smash(IL.NeLi_Clu2ter_White .get(1), OP.gem.mat(MT.FluoriteWhite , 3)); + RM.smash(IL.NeLi_Clu2ter_Blue .get(1), OP.gem.mat(MT.FluoriteBlue , 3)); + RM.smash(IL.NeLi_Clu2ter_Green .get(1), OP.gem.mat(MT.FluoriteGreen , 3)); + RM.smash(IL.NeLi_Clu2ter_Yellow .get(1), OP.gem.mat(MT.FluoriteYellow , 3)); + RM.smash(IL.NeLi_Clu2ter_Magenta.get(1), OP.gem.mat(MT.FluoriteMagenta, 3)); + RM.compactsmash(OP.gem.mat(MT.FluoriteWhite , 1), 4, IL.NeLi_Crystal_White .get(1)); RM.compactsmash(OP.gem.mat(MT.FluoriteBlue , 1), 4, IL.NeLi_Crystal_Blue .get(1)); RM.compactsmash(OP.gem.mat(MT.FluoriteGreen , 1), 4, IL.NeLi_Crystal_Green .get(1)); diff --git a/src/main/java/gregtech/tileentity/placeables/MultiTileEntityRock.java b/src/main/java/gregtech/tileentity/placeables/MultiTileEntityRock.java index ed89b8844..7f5d8635e 100644 --- a/src/main/java/gregtech/tileentity/placeables/MultiTileEntityRock.java +++ b/src/main/java/gregtech/tileentity/placeables/MultiTileEntityRock.java @@ -53,8 +53,9 @@ * @author Gregorius Techneticies */ public class MultiTileEntityRock extends TileEntityBase03MultiTileEntities implements IMTE_CanEntityDestroy, IMTE_IgnorePlayerCollisionWhenPlacing, IMTE_OnToolClick, IMTE_OnNeighborBlockChange, IMTE_GetBlockHardness, IMTE_IsSideSolid, IMTE_GetLightOpacity, IMTE_GetExplosionResistance, ITileEntityQuickObstructionCheck, IMTE_GetCollisionBoundingBoxFromPool, IMTE_GetSelectedBoundingBoxFromPool, IMTE_SetBlockBoundsBasedOnState { + public static final ITexture sStoneTexture = BlockTextureCopied.get(Blocks.stone), sSnowTexture = BlockTextureCopied.get(Blocks.snow_layer); + public ITexture mTexture = sStoneTexture; public ItemStack mRock; - public ITexture mTexture; public float mMinX = PX_P[5], mMinZ = PX_P[5], mMaxX = PX_N[5], mMaxY = PX_P[2], mMaxZ = PX_N[5]; @Override @@ -191,13 +192,16 @@ public ItemStack getDefaultRock(int aAmount) { @Override public int getRenderPasses(Block aBlock, boolean[] aShouldSideBeRendered) { if (worldObj == null) { - mTexture = BlockTextureCopied.get(Blocks.stone); return 1; + mTexture = sStoneTexture; return 1; + } + for (byte tSide : ALL_SIDES_HORIZONTAL) if (getBlockAtSide(tSide) == Blocks.snow_layer) { + mTexture = sSnowTexture; return 2; } Block tBlock = getBlockAtSide(SIDE_BOTTOM); if (tBlock == BlocksGT.Diggables) { mTexture = BlockTextureCopied.get(BlocksGT.Kimberlite, SIDE_ANY, 0); return 1; } - if (tBlock instanceof BlockStones || tBlock == Blocks.stone || tBlock == Blocks.end_stone || tBlock == Blocks.obsidian) { + if (tBlock instanceof BlockStones || tBlock == Blocks.snow || tBlock == Blocks.stone || tBlock == Blocks.end_stone || tBlock == Blocks.obsidian) { mTexture = BlockTextureCopied.get(tBlock, SIDE_ANY, 0); return 1; } if (tBlock == Blocks.netherrack || tBlock == Blocks.nether_brick || tBlock == Blocks.soul_sand) { @@ -232,9 +236,9 @@ public int getRenderPasses(Block aBlock, boolean[] aShouldSideBeRendered) { return 1; } - @Override public boolean setBlockBounds(Block aBlock, int aRenderPass, boolean[] aShouldSideBeRendered) {box(aBlock,mMinX, 0, mMinZ, mMaxX, mMaxY, mMaxZ); return T;} - @Override public void setBlockBoundsBasedOnState(Block aBlock) {box(aBlock, mMinX, 0, mMinZ, mMaxX, mMaxY, mMaxZ);} - @Override public AxisAlignedBB getSelectedBoundingBoxFromPool() {return box( mMinX, 0, mMinZ, mMaxX, mMaxY, mMaxZ);} + @Override public boolean setBlockBounds(Block aBlock, int aRenderPass, boolean[] aShouldSideBeRendered) {box(aBlock, aRenderPass == 0 ? mMinX : 0, 0, aRenderPass == 0 ? mMinZ : 0, aRenderPass == 0 ? mMaxX : 1, aRenderPass == 0 ? mMaxY : PX_P[1], aRenderPass == 0 ? mMaxZ : 1); return T;} + @Override public void setBlockBoundsBasedOnState(Block aBlock) {box(aBlock, mMinX, 0, mMinZ, mMaxX, mMaxY, mMaxZ);} + @Override public AxisAlignedBB getSelectedBoundingBoxFromPool() {return box(mMinX, 0, mMinZ, mMaxX, mMaxY, mMaxZ);} @Override public AxisAlignedBB getCollisionBoundingBoxFromPool() {return null;} @Override public boolean isSurfaceSolid (byte aSide) {return F;} diff --git a/src/main/java/gregtech/tileentity/placeables/MultiTileEntityStick.java b/src/main/java/gregtech/tileentity/placeables/MultiTileEntityStick.java index 38de6febc..8de1f5074 100644 --- a/src/main/java/gregtech/tileentity/placeables/MultiTileEntityStick.java +++ b/src/main/java/gregtech/tileentity/placeables/MultiTileEntityStick.java @@ -49,7 +49,8 @@ * @author Gregorius Techneticies */ public class MultiTileEntityStick extends TileEntityBase03MultiTileEntities implements ITileEntityQuickObstructionCheck, IMTE_CanEntityDestroy, IMTE_IgnorePlayerCollisionWhenPlacing, IMTE_OnNeighborBlockChange, IMTE_GetBlockHardness, IMTE_IsSideSolid, IMTE_GetLightOpacity, IMTE_GetExplosionResistance, IMTE_GetCollisionBoundingBoxFromPool, IMTE_GetSelectedBoundingBoxFromPool, IMTE_SetBlockBoundsBasedOnState, IMTE_GetFlammability, IMTE_GetFireSpreadSpeed { - public static final ITexture mTexture = BlockTextureCopied.get(Blocks.log, SIDE_FRONT, 0); + public static final ITexture sWoodTexture = BlockTextureCopied.get(Blocks.log, SIDE_FRONT, 0), sSnowTexture = BlockTextureCopied.get(Blocks.snow_layer); + public ITexture mTexture = sWoodTexture; public float mMinX = PX_P[2], mMinZ = PX_P[7], mMaxX = PX_N[2], mMaxZ = PX_N[7]; @Override @@ -164,10 +165,18 @@ public ItemStack getStick(ItemStack aStack, int aAmount) { @Override public ITexture getTexture(Block aBlock, int aRenderPass, byte aSide, boolean[] aShouldSideBeRendered) {return aShouldSideBeRendered[aSide] || SIDES_TOP_HORIZONTAL[aSide] ? mTexture : null;} - @Override public int getRenderPasses(Block aBlock, boolean[] aShouldSideBeRendered) {return 1;} - @Override public boolean setBlockBounds(Block aBlock, int aRenderPass, boolean[] aShouldSideBeRendered) {box(aBlock, mMinX, 0, mMinZ, mMaxX, PX_P[2], mMaxZ); return T;} - @Override public void setBlockBoundsBasedOnState(Block aBlock) {box(aBlock, mMinX, 0, mMinZ, mMaxX, PX_P[2], mMaxZ);} - @Override public AxisAlignedBB getSelectedBoundingBoxFromPool() {return box( mMinX, 0, mMinZ, mMaxX, PX_P[2], mMaxZ);} + @Override + public int getRenderPasses(Block aBlock, boolean[] aShouldSideBeRendered) { + if (worldObj != null) for (byte tSide : ALL_SIDES_HORIZONTAL) if (getBlockAtSide(tSide) == Blocks.snow_layer) { + mTexture = sSnowTexture; return 2; + } + mTexture = sWoodTexture; + return 1; + } + + @Override public boolean setBlockBounds(Block aBlock, int aRenderPass, boolean[] aShouldSideBeRendered) {box(aBlock, aRenderPass == 0 ? mMinX : 0, 0, aRenderPass == 0 ? mMinZ : 0, aRenderPass == 0 ? mMaxX : 1, aRenderPass == 0 ? PX_P[2] : PX_P[1], aRenderPass == 0 ? mMaxZ : 1); return T;} + @Override public void setBlockBoundsBasedOnState(Block aBlock) {box(aBlock, mMinX, 0, mMinZ, mMaxX, PX_P[2], mMaxZ);} + @Override public AxisAlignedBB getSelectedBoundingBoxFromPool() {return box(mMinX, 0, mMinZ, mMaxX, PX_P[2], mMaxZ);} @Override public AxisAlignedBB getCollisionBoundingBoxFromPool() {return null;} @Override public boolean isSurfaceSolid (byte aSide) {return F;}