Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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:[email protected]";
	
	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:[email protected]";
	
	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)

  • Author

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.

Edited by bconlon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.