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

Im sorry for being a noob. but i still dont understand 1.8 one bit (1.7 was simple compared to 1.8 for me) i mean, i have my metadata block made, but it wont render the texture. please help me. :(

 

 

 

package com.stonemod.Main;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.Minecraft;

import net.minecraft.client.resources.model.ModelBakery;

import net.minecraft.client.resources.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.Mod;

import net.minecraftforge.fml.common.Mod.EventHandler;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

@Mod(modid = MainRegistry.MODID, version = MainRegistry.VERSION)

public class MainRegistry

{

    public static final String MODID = "stonemod";

    public static final String VERSION = "1.0";

   

   

    public static Block Andesite;

    public static Block Diorite;

    public static Block Granite;

   

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

Andesite = new BlockAndesite(Material.rock).setHardness(1.5F).setResistance(10.0F).setStepSound(Block.soundTypePiston).setUnlocalizedName("andesite");

GameRegistry.registerBlock(Andesite, "andesite");

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Andesite, 0, new ModelResourceLocation("stonemod:chiseled_andesite", "inventory"));

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Andesite, 1, new ModelResourceLocation("stonemod:andesite_column", "inventory"));

ModelBakery.addVariantName(Andesite, new String[]{"stonemod:chiseled_andesite", "stonemod:andesite_column"});

 

    }

}

 

First of all, if you run this on a server this will crash it.

Registering Renderer should ONLY happen on client side, thats why you should use proxies to do so.

Show your folder structure in assets with the files please

No need for proxies. Just check if the event is on the client side. Much easier.

 

That's wrong but is a common misunderstanding.

 

If any code you reference has a class or method that is @SideOnly then you MUST use a proxy to manage your code.

 

This is because an @SideOnly is not even loaded into Java on the other side and will therefore crash Java.

 

The world.isRemote check can be used when your code is running (or at least allowed to run) on both sides.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.