Jump to content

bconlon

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by bconlon

  1. What I've been trying to do is I have been attempting to implement an item that can create a transparent blue layer around the entire player. I am using Curios' API for this, as the item is meant to be an equippable accessory. There are also other accessories I have implemented to the mod using the API. I have been able to implement everything that handles this rendering with the accessory item, however I've become stuck after running into a specific issue: when the transparent blue layer is active, it will prevent any accessories specifically on the player's arms from rendering.

    As far as I can tell, this only happens with the accessories on the player's arms (such as the gloves or even Curios' template knuckles item), as accessories rendering on the player's body for some reason render just fine under the transparent layer. Images for better context:

    2021-04-22_16_27_42.png.04f28a052996f7393fc095a89ed1bff8.png

    2021-04-22_16_27_48.png.d03e4495e378f961f5c6b6e4b62582a8.png

    I have been at this for quite awhile but haven't able to figure out what is causing this issue, especially since the inconsistency between rendering for body parts has made me even more confused. It could be a Curios issue, but nothing in its accessory layer code exactly stands out as a cause (if it is indeed Curios' fault though it would at least be good to know what the issue is to pass on to the mod dev). The pendant and glove accessories both render with the same RenderType and render buffer, which I duplicated based on the vanilla armor layer's choices for that, as the vanilla armor layer is also immune to the transparency issue on the arm model part:

    2021-04-22_16_33_11.png.b8d6ae3685cef93fac9c017c0e6bf138.png

    The relevant code for items and renderers can be found below:

    Pendants:

    - https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/common/item/accessories/pendant/PendantItem.java

    - https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/client/renderer/accessory/model/PendantModel.java

    Gloves:

    - https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/common/item/accessories/gloves/GlovesItem.java

    - https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/client/renderer/accessory/model/GlovesModel.java

    Repulsion Shield (the item creating the transparency layer):

    - https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/common/item/accessories/misc/RepulsionShieldItem.java

    - https://github.com/Gilded-Games/The-Aether/blob/1.16/src/main/java/com/gildedgames/aether/client/renderer/accessory/model/RepulsionShieldModel.java

    and, if necessary,

    Curios' Accessory Layer (code not mine, obviously):

    - https://github.com/TheIllusiveC4/Curios/blob/1.16.x-forge/src/main/java/top/theillusivec4/curios/client/render/CuriosLayer.java

    Any help would be appreciated, as I've run out of ideas for what could be causing this issue and how I could fix it. I can provide more information if needed.

  2. Is it possible to have connected textures for blocks from mods with optifine's connected textures feature. I am working on connected textures support for a mod and can't seem to get them working. I used vanilla glass in a resource pack with optifine connected textures support and replicated it and the textures for a glass block from a mod but it didn't work, I have also tried specifying in the properties file of block (the file for specifying how the connected textures work) the block that the connected textures are for and that isn't working either.

     

    The properties file is called "quicksoil_glass.properties" and it looks like this:

    "matchblock=quicksoil_glass

    method=ctm

    tiles=0-47"

    I have tried it without the matchblock part but that didn't work either. I have also tried having the files as a resource pack and directly in the mod itself but neither have worked so far.

  3. All the item textures and models, as well as the block texture and item model (they show up as the missing texture cubes and appear in the middle of the screen with the file name), have all of a sudden stopped working and I can't seem to figure out what I changed that would've broken them. Looking at the logs it looks the items are trying to load as blocks? But I can't see why the block isn't working because that error wasn't shown.

    Code:

    https://gist.github.com/anonymous/2cd510805d33df25f6647372316d461b

     

    (if I need to post any other files just ask)

  4. https://gist.github.com/bconlonGaming/2e62eca86624e11801af063fe1c5c5d3

     

    EDIT: After looking it over it says I have the texture in the wrong place, let me put it in the right place and see if anything happens (it wasn't working before so I tried to move the texture out of the block textures folder to see what would happen)

     

    EDIT 2: Ok I fixed that and now it works.

  5. The texture for the item model of my block and the block model are both not working. I've been trying to figure it out for many hours but I have not been able to figure out the problem. I am using IntelliJ for my coding. I have also been following a modding guide by Loremaster for the most part and everything seems to be the same with my code but the block texture doesn't work. This is in 1.11.2.

    CODE:

    ----------------------------

    AetherFood.java

    package com.bconlon.aetherfood;
    
    import com.bconlon.aetherfood.proxy.CommonProxy;
    
    import init.ModBlocks;
    import init.ModCrafting;
    import init.ModItems;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.ItemStack;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.Mod.EventHandler;
    import net.minecraftforge.fml.common.Mod.Instance;
    import net.minecraftforge.fml.common.SidedProxy;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    
    @Mod(modid = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION, acceptedMinecraftVersions = Reference.ACCEPTED_VERSIONS, dependencies = Reference.DEPENDENCIES)
    public class AetherFood {
    	
    	@Instance
    	public static AetherFood instance;
    	
    	@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
    	public static CommonProxy proxy;
    	
    	@EventHandler
    	public void preInit(FMLPreInitializationEvent event)
    	{
    		
    		ModItems.init();
    		ModItems.register();
    
    		ModBlocks.init();
    		ModBlocks.register();
    		
    	}
    	
    	@EventHandler
    	public void preInit(FMLInitializationEvent event)
    	{
    		proxy.init();
    		
    		ModCrafting.register();
    	}
    	@EventHandler
    	public void preInit(FMLPostInitializationEvent event)
    	{
    		
    	}
    	
    	public static CreativeTabs tabAetherFood = new CreativeTabs("tab_aetherfood") {
    		
    		@Override
    		public ItemStack getTabIconItem() {
    			return new ItemStack(ModItems.fruit_salad);
    		}
    	};
    }

    Reference.java

    package com.bconlon.aetherfood;
    
    public class Reference {
    
    	public static final String MOD_ID = "bcaetherfood";
    	public static final String NAME = "Aether II: Additional Foods Addon";
    	public static final String VERSION = "0.1-indev";
    	public static final String ACCEPTED_VERSIONS = "[1.11.2]";
    	public static final String DEPENDENCIES = "required-after:aether@1.11.2-1.1.0.git-145c2ed";
    	
    	public static final String CLIENT_PROXY_CLASS = "com.bconlon.aetherfood.proxy.ClientProxy";
    	public static final String SERVER_PROXY_CLASS = "com.bconlon.aetherfood.proxy.ServerProxy";
    	
    	public static enum AetherFoodItems {
    		QUICKSOILBOTTLE("quicksoil_bottle", "quicksoil_bottle"),
    		QUICKSOILTEACUP("quicksoil_teacup", "quicksoil_teacup"),
    		BURRAKAIBROTH("burrakai_broth", "burrakai_broth"),
    		SKYROOTBOWL("skyroot_bowl", "skyroot_bowl"),
    		TAEGOREBROTH("taegore_broth", "taegore_broth"),
    		MOABROTH("moa_broth", "moa_broth"),
    		KIRRIDBROTH("kirrid_broth", "kirrid_broth"),
    		FRUITSALAD("fruit_salad", "fruit_salad"),
    		AECHORSOUP("aechor_soup", "aechor_soup"),
    		ENCHANTEDBLUEBERRYLOLLIPOP("enchanted_blueberry_lollipop", "enchanted_blueberry_lollipop"),
    		MEATDRUMSTICK("meat_drumstick", "meat_drumstick"),
    		MOAEGGSALAD("moa_egg_salad", "moa_egg_salad"),
    		BURRAKAICHEESE("burrakai_cheese", "burrakai_cheese"),
    		SALT("salt", "salt"),
    		CANDIEDWYNDBERRY("candied_wyndberry", "candied_wyndberry"),
    		CARRIONPETAL("carrion_petal", "carrion_petal");
    		
    		
    		private String unlocalizedName;
    		private String registryName;
    		
    		AetherFoodItems(String unlocalizedName, String registryName) {
    			this.unlocalizedName = unlocalizedName;
    			this.registryName = registryName;
    		}
    		
    		public String getUnlocalizedName() {
    			return unlocalizedName;
    		}
    		
    		public String getRegistryName() {
    			return registryName;
    		}
    	}
    
        public static enum AetherFoodBlocks {
            SALTBLOCK("salt_block", "salt_block");
    
    
            private String unlocalizedName;
            private String registryName;
    
            AetherFoodBlocks(String unlocalizedName, String registryName) {
                this.unlocalizedName = unlocalizedName;
                this.registryName = registryName;
            }
    
            public String getUnlocalizedName() {
                return unlocalizedName;
            }
    
            public String getRegistryName() {
                return registryName;
            }
        }
    }

    ModBlocks.java

    package com.bconlon.aetherfood;
    
    public class Reference {
    
    	public static final String MOD_ID = "bcaetherfood";
    	public static final String NAME = "Aether II: Additional Foods Addon";
    	public static final String VERSION = "0.1-indev";
    	public static final String ACCEPTED_VERSIONS = "[1.11.2]";
    	public static final String DEPENDENCIES = "required-after:aether@1.11.2-1.1.0.git-145c2ed";
    	
    	public static final String CLIENT_PROXY_CLASS = "com.bconlon.aetherfood.proxy.ClientProxy";
    	public static final String SERVER_PROXY_CLASS = "com.bconlon.aetherfood.proxy.ServerProxy";
    	
    	public static enum AetherFoodItems {
    		QUICKSOILBOTTLE("quicksoil_bottle", "quicksoil_bottle"),
    		QUICKSOILTEACUP("quicksoil_teacup", "quicksoil_teacup"),
    		BURRAKAIBROTH("burrakai_broth", "burrakai_broth"),
    		SKYROOTBOWL("skyroot_bowl", "skyroot_bowl"),
    		TAEGOREBROTH("taegore_broth", "taegore_broth"),
    		MOABROTH("moa_broth", "moa_broth"),
    		KIRRIDBROTH("kirrid_broth", "kirrid_broth"),
    		FRUITSALAD("fruit_salad", "fruit_salad"),
    		AECHORSOUP("aechor_soup", "aechor_soup"),
    		ENCHANTEDBLUEBERRYLOLLIPOP("enchanted_blueberry_lollipop", "enchanted_blueberry_lollipop"),
    		MEATDRUMSTICK("meat_drumstick", "meat_drumstick"),
    		MOAEGGSALAD("moa_egg_salad", "moa_egg_salad"),
    		BURRAKAICHEESE("burrakai_cheese", "burrakai_cheese"),
    		SALT("salt", "salt"),
    		CANDIEDWYNDBERRY("candied_wyndberry", "candied_wyndberry"),
    		CARRIONPETAL("carrion_petal", "carrion_petal");
    		
    		
    		private String unlocalizedName;
    		private String registryName;
    		
    		AetherFoodItems(String unlocalizedName, String registryName) {
    			this.unlocalizedName = unlocalizedName;
    			this.registryName = registryName;
    		}
    		
    		public String getUnlocalizedName() {
    			return unlocalizedName;
    		}
    		
    		public String getRegistryName() {
    			return registryName;
    		}
    	}
    
        public static enum AetherFoodBlocks {
            SALTBLOCK("salt_block", "salt_block");
    
    
            private String unlocalizedName;
            private String registryName;
    
            AetherFoodBlocks(String unlocalizedName, String registryName) {
                this.unlocalizedName = unlocalizedName;
                this.registryName = registryName;
            }
    
            public String getUnlocalizedName() {
                return unlocalizedName;
            }
    
            public String getRegistryName() {
                return registryName;
            }
        }
    }

    blockstates/salt_block.json

    {
        "variants": {
            "normal": {
                "model": "bcaetherfood:salt_block" }
        }
    }

    block/salt_block.json

    {
        "parent":"block/cube_all",
        "textures":{
            "all":"bcaetherfood:blocks/salt_block"
        }
    }

    item/salt_block.json

    {
        "parent":"block/cube_all",
        "textures":{
            "all":"bcaetherfood:blocks/salt_block"
        }
    }

    (If there is any extra info like more code needed then I will provide it)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.