Jump to content

[SOLVED][1.11.2] Block texture


Recommended Posts

Hello everyone! I need a help with Block textures. On starting MC I get this message:



This is my block class:



package ivansteklow.ishelper.blocks;

import javax.annotation.Nullable;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.init.PotionTypes;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionUtils;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class BlockJar extends Block {

	public BlockJar() {
		setHarvestLevel("pickaxe", 1);

	public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
			EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
		ItemStack itemstack = playerIn.getHeldItem(hand);

		if (itemstack.isEmpty()) {
			return true;
		} else {

			Item item = heldItem.getItem();

			if (item == Items.BUCKET) {


				if (itemstack.isEmpty()) {
					playerIn.setHeldItem(hand, new ItemStack(Items.WATER_BUCKET));
				} else if (!playerIn.inventory.addItemStackToInventory(new ItemStack(Items.WATER_BUCKET))) {
					playerIn.dropItem(new ItemStack(Items.WATER_BUCKET), false);

				return true;
			} else if (item == Items.GLASS_BOTTLE) {

				ItemStack itemstack1 = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM),

				if (itemstack.isEmpty()) {
					playerIn.setHeldItem(hand, itemstack1);
				} else if (!playerIn.inventory.addItemStackToInventory(itemstack1)) {
					playerIn.dropItem(itemstack1, false);
				} else if (playerIn instanceof EntityPlayerMP) {
					((EntityPlayerMP) playerIn).sendContainerToPlayer(playerIn.inventoryContainer);

				return true;

			return false;


This is my Registering blocks class:



package ivansteklow.ishelper.init;

import ivansteklow.isdev.BlockRegisterer;
import ivansteklow.ishelper.blocks.BlockJar;
import net.minecraft.block.Block;
import net.minecraft.util.ResourceLocation;

public class ModBlocks {

	public static Block blockJar;

	public static void init() {
		blockJar = new BlockJar().setRegistryName(new ResourceLocation(Refs.MOD_ID, "waterjar"));

	public static void initRender() {
		BlockRegisterer.regRender(blockJar, Refs.MOD_ID);


BlockRegisterer.java (My API)

package ivansteklow.isdev;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class BlockRegisterer {
	public static void regRender(Block block, String modid) {
		Item item = Item.getItemFromBlock(block);
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
	public static void regBlock(Block block){
		ItemBlock item = new ItemBlock(block);


I have some files:



    "variants": {
        "normal": {
            "model": "ishelper:waterjar" 


 	"parent": "block/cube_all",
 	"textures": {
 		"all": "ishelper:blocks/waterjar"


	"parent": "block/cube_all",
	"textures": {
		"all": "ishelper:blocks/waterjar"


What's wrong?! HELP ME PLS!

Edited by IvanSteklow
  • Like 1
Link to comment
Share on other sites

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.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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