Jump to content

Recommended Posts

Posted

so i have a block which has TileEntity, it renders as an invisible block. with

@Override
   public int getRenderType() {
      return 3;
   }

it renders as an untextured block but i want it to render model of my json file... can anyone help?

~thanks

"The cycle of life and death continues. We will live, they will die."

Posted

this is how i registered my tile entity:

 public class Te {

public static void register() {
	GameRegistry.registerTileEntity(TileEntityDistillery.class, Reference.MOD_ID);

}

}

 @EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	Te.register();				
}

 

and this is my block class:

public class BlockDistillery extends BlockContainer{

    public BlockDistillery()
    {
        super(Material.rock);
        setUnlocalizedName("distillery");
        setCreativeTab(Kudo.tabKudo);
        
    }

    @Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) {
	if (worldIn.isRemote) return true;

	playerIn.openGui(Kudo.instance, GUIHandler.getGuiID(), worldIn, pos.getX(), pos.getY(), pos.getZ());
	return true;
}
    
    @Override
public boolean isOpaqueCube() {
	return false;
}	

@Override
public boolean isFullCube() {
	return false;
}

@SideOnly(Side.CLIENT)
    public EnumWorldBlockLayer getBlockLayer()
    {
        return EnumWorldBlockLayer.CUTOUT;
    }

@Override
   public int getRenderType() {
      return 3;
   }

    @Override
    public TileEntity createNewTileEntity(World worldIn, int meta){
        return new TileEntityDistillery();
    }
}    

"The cycle of life and death continues. We will live, they will die."

Posted

public class Bs {
public static Block distillery;

public static void init(){
	distillery = new BlockDistillery();

}

public static void register(){
	GameRegistry.registerBlock(distillery, distillery.getUnlocalizedName().substring(5));


}

public static void registerRenders(){
	registerRender(distillery);
}

public static void registerRender(Block block){
	Item item = Item.getItemFromBlock(block);
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
}

@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	Te.register();
        Bs.init();
	Bs.register();	
}

... any ideas?

"The cycle of life and death continues. We will live, they will die."

Posted

public class ClientProxy extends CommonProxy{
@Override
public void registerRenders(){
	Bs.registerRenders();
}

public class CommonProxy {
public void registerRenders(){

}

 

@EventHandler
public void Init(FMLInitializationEvent event)
{
	proxy.registerRenders();

"The cycle of life and death continues. We will live, they will die."

Posted

assets/kudo/blockstates :

{
    "variants": {
        "facing=north": { "model": "kudo:distillery" },
        "facing=east":  { "model": "kudo:distillery", "y": 90 },
        "facing=south": { "model": "kudo:distillery", "y": 180 },
        "facing=west":  { "model": "kudo:distillery", "y": 270 }
    }
}

assets/kudo/models/block :

{
    "textures": {
        "0": "kudo:blocks/distillery",
        "1": "kudo:blocks/distillery_top",
        "2": "blocks/iron_bars"
    },
    "elements": [
        {
            "name": "bot",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 2.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 14.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 3.0, 3.0, 13.0, 13.0 ] }
            }
        },
        {
            "name": "corner2",
            "from": [ 2.0, 2.0, 0.0 ], 
            "to": [ 14.0, 10.0, 3.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 6.0, 14.0, 14.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 6.0, 14.0, 14.0 ] },
                "west": { "texture": "#0", "uv": [ 1.0, 0.0, 0.0, 1.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "corner3",
            "from": [ 0.0, 2.0, 0.0 ], 
            "to": [ 2.0, 10.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 14.0, 6.0, 16.0, 14.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 6.0, 16.0, 14.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 6.0, 2.0, 14.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 6.0, 16.0, 14.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "corner4",
            "from": [ 14.0, 2.0, 0.0 ], 
            "to": [ 16.0, 10.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 6.0, 2.0, 14.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 7.0, 16.0, 14.0 ] },
                "south": { "texture": "#0", "uv": [ 14.0, 6.0, 16.0, 14.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 6.0, 16.0, 14.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "mid",
            "from": [ 0.0, 10.0, 0.0 ], 
            "to": [ 16.0, 12.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 2.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 3.0, 3.0, 13.0, 13.0 ] }
            }
        },
        {
            "name": "bar",
            "from": [ 3.2000000029802322, 2.0, 14.50000000745058 ], 
            "to": [ 4.200000002980232, 10.0, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 16.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 16.0 ] },
                "south": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 16.0 ] },
                "west": { "texture": "#2", "uv": [ 12.0, 0.0, 14.0, 16.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "bar2",
            "from": [ 5.300000004470348, 2.0, 14.50000000745058 ], 
            "to": [ 6.300000004470348, 10.0, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 0.0, 14.0, 16.0 ] },
                "east": { "texture": "#2", "uv": [ 12.0, 0.0, 14.0, 16.0 ] },
                "south": { "texture": "#2", "uv": [ 2.0, 16.0, 4.0, 0.0 ] },
                "west": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 16.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "bar3",
            "from": [ 7.500000007450581, 2.0, 14.50000000745058 ], 
            "to": [ 8.50000000745058, 10.0, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 16.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 16.0 ] },
                "south": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 16.0 ] },
                "west": { "texture": "#2", "uv": [ 12.0, 0.0, 14.0, 16.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "bar4",
            "from": [ 9.700000010430813, 2.0, 14.50000000745058 ], 
            "to": [ 10.700000010430813, 10.0, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 16.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 16.0 ] },
                "south": { "texture": "#2", "uv": [ 12.0, 16.0, 14.0, 0.0 ] },
                "west": { "texture": "#2", "uv": [ 4.0, 0.0, 2.0, 16.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "bar5",
            "from": [ 11.800000011920929, 2.0, 14.50000000745058 ], 
            "to": [ 12.800000011920929, 10.0, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 16.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 16.0 ] },
                "south": { "texture": "#2", "uv": [ 2.0, 16.0, 4.0, 0.0 ] },
                "west": { "texture": "#2", "uv": [ 7.0, 16.0, 9.0, 0.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "barc1",
            "from": [ 10.700000025331974, 3.5000000074505806, 14.50000000745058 ], 
            "to": [ 11.80000002682209, 4.500000007450581, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 6.0, 14.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 2.0 ] },
                "south": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 2.0 ] },
                "west": { "texture": "#2", "uv": [ 7.0, 6.0, 9.0, 16.0 ] },
                "up": { "texture": "#2", "uv": [ 2.0, 7.0, 4.0000000014901165, 9.0 ] },
                "down": { "texture": "#2", "uv": [ 5.0, 2.0, 7.0000000014901165, 4.0 ] }
            }
        },
        {
            "name": "barc2",
            "from": [ 6.300000034272671, 4.499999992549419, 14.50000000745058 ], 
            "to": [ 7.500000037252903, 5.499999992549419, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 6.0, 14.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 2.0 ] },
                "south": { "texture": "#2", "uv": [ 6.0, 2.0, 8.0, 4.0 ] },
                "west": { "texture": "#2", "uv": [ 8.0, 12.0, 10.0, 14.0 ] },
                "up": { "texture": "#2", "uv": [ 2.0, 7.0, 4.0000000014901165, 9.0 ] },
                "down": { "texture": "#2", "uv": [ 7.0, 8.0, 9.000000001490116, 10.0 ] }
            }
        },
        {
            "name": "barc3",
            "from": [ 2.0000000447034836, 3.4999999925494194, 14.50000000745058 ], 
            "to": [ 3.200000047683716, 4.499999992549419, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 6.0, 14.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 2.0 ] },
                "south": { "texture": "#2", "uv": [ 12.0, 5.0, 14.0, 7.0 ] },
                "west": { "texture": "#2", "uv": [ 8.0, 12.0, 10.0, 14.0 ] },
                "up": { "texture": "#2", "uv": [ 2.0, 7.0, 4.0000000014901165, 9.0 ] },
                "down": { "texture": "#2", "uv": [ 7.0, 8.0, 9.000000001490116, 10.0 ] }
            }
        },
        {
            "name": "barc4",
            "from": [ 4.200000047683716, 7.999999985098839, 14.50000000745058 ], 
            "to": [ 5.300000049173832, 8.999999985098839, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 6.0, 14.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 2.0 ] },
                "south": { "texture": "#2", "uv": [ 12.0, 5.0, 14.0, 7.0 ] },
                "west": { "texture": "#2", "uv": [ 8.0, 12.0, 10.0, 14.0 ] },
                "up": { "texture": "#2", "uv": [ 2.0, 7.0, 4.0000000014901165, 9.0 ] },
                "down": { "texture": "#2", "uv": [ 7.0, 8.0, 9.000000001490116, 10.0 ] }
            }
        },
        {
            "name": "barc5",
            "from": [ 8.500000037252903, 6.999999985098839, 14.50000000745058 ], 
            "to": [ 9.700000040233135, 7.999999985098839, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 6.0, 14.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 5.0, 9.0, 7.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 7.0, 2.0, 9.0 ] },
                "west": { "texture": "#2", "uv": [ 7.0, 12.0, 9.0, 14.0 ] },
                "up": { "texture": "#2", "uv": [ 2.0, 7.0, 4.0000000014901165, 9.0 ] },
                "down": { "texture": "#2", "uv": [ 7.0, 8.0, 9.000000001490116, 10.0 ] }
            }
        },
        {
            "name": "barc6",
            "from": [ 12.80000002682209, 6.0, 14.50000000745058 ], 
            "to": [ 14.000000029802322, 7.0, 15.50000000745058 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 12.0, 6.0, 14.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 7.0, 0.0, 9.0, 2.0 ] },
                "south": { "texture": "#2", "uv": [ 13.0, 7.0, 15.0, 9.0 ] },
                "west": { "texture": "#2", "uv": [ 7.0, 6.0, 9.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 2.0, 7.0, 4.0000000014901165, 9.0 ] },
                "down": { "texture": "#2", "uv": [ 5.0, 2.0, 7.0000000014901165, 4.0 ] }
            }
        },
        {
            "name": "top1",
            "from": [ 2.0, 12.0, 2.0 ], 
            "to": [ 14.0, 14.0, 14.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 1.0, 14.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 3.0, 4.0, 15.0, 6.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 7.0, 14.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 1.0, 7.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 2.0, 14.0, 14.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 2.0, 14.0, 14.0 ] }
            }
        },
        {
            "name": "top2",
            "from": [ 4.0, 14.0, 4.0 ], 
            "to": [ 12.0, 16.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 1.0, 12.0, 9.0, 14.0 ] },
                "east": { "texture": "#0", "uv": [ 6.0, 1.0, 14.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 6.0, 11.0, 14.0, 13.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 7.0, 10.0, 9.0 ] },
                "up": { "texture": "#1", "uv": [ 5.0, 5.0, 11.000000000000004, 11.000000000000004 ] },
                "down": { "texture": "#0", "uv": [ 4.0, 4.0, 12.0, 12.0 ] }
            }
        }
    ]
}

 

model work fine on simple block...

"The cycle of life and death continues. We will live, they will die."

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...

×   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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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