Jump to content

Recommended Posts

Posted

I have a Problem with my crops, they have the missing-texture texture and i cant find my mistake.

 

Main:

package io.github.dommihd.blazecraft;

import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.items.BlazeItems;
import io.github.dommihd.blazecraft.proxy.CommonProxy;
import io.github.dommihd.blazecraft.recepies.BlazeCrafting;
import io.github.dommihd.blazecraft.recepies.BlazeSmelting;
import net.minecraft.init.Blocks;
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 = Blazecraft.MODID, version = Blazecraft.VERSION, name = Blazecraft.NAME)
public class Blazecraft
{
    public static final String MODID = "blazecraft";
    public static final String VERSION = "0.1";
    public static final String NAME = "Blazecraft";
  
    @Instance(MODID)
public static Blazecraft instance = new Blazecraft();
    
@SidedProxy(modId = MODID, serverSide = "io.github.dommihd.blazecraft.proxy.CommonProxy", clientSide = "io.github.dommihd.blazecraft.proxy.ClientProxy")
public static CommonProxy proxy = new CommonProxy();

public BlazeItems items;
public BlazeBlocks blocks;
public BlazeTab tab;
public BlazeCrafting craft;
public BlazeSmelting smelt;

@EventHandler
public void preInit(FMLPreInitializationEvent event){
	tab = new BlazeTab();

	items = new BlazeItems();
	items.init();
	items.register();

	blocks = new BlazeBlocks();
	blocks.init();
	blocks.register();
}
@EventHandler
public void load(FMLInitializationEvent event){
	craft = new BlazeCrafting();
	craft.register();

	smelt = new BlazeSmelting();
	smelt.register();
}
@EventHandler
public void postInit(FMLPostInitializationEvent event){
	proxy.registerModels();
}
}

 

Client Proxy:

package io.github.dommihd.blazecraft.proxy;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.items.BlazeItems;
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.ItemSeeds;

public class ClientProxy extends CommonProxy {


public void registerModels() {
	//items
	registerModel(BlazeItems.testitem, 0, new ModelResourceLocation(BlazeItems.testitem.getRegistryName(),"inventory"));
	registerModel(BlazeItems.emberorchidSeeds, 0, new ModelResourceLocation(BlazeItems.emberorchidSeeds.getRegistryName(),"inventory"));
	//blocks
	registerModel(BlazeBlocks.testblock, 0, new ModelResourceLocation(BlazeBlocks.testblock.getRegistryName(),"inventory"));
	registerModel(BlazeBlocks.emberorchid, 0, new ModelResourceLocation(BlazeBlocks.emberorchid.getRegistryName(),"inventory"));
}

private void registerModel(Object obj, int meta, ModelResourceLocation loc){
	Item item = null;
	if (obj instanceof Item){
		item = (Item) obj;
	}else if (obj instanceof ItemSeeds){
		item = (ItemSeeds) obj;

	} else if (obj instanceof Block){
		item = Item.getItemFromBlock((Block) obj);

	}else{
		throw new IllegalArgumentException();
	} 
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, loc);
}

}

Name Utils:

package io.github.dommihd.blazecraft;

import net.minecraft.block.Block;
import net.minecraft.item.Item;

public class NameUtils {

public static void setNames(Object obj,String name){
	if(obj instanceof Item){
		((Item)obj).setRegistryName(name).setUnlocalizedName(name);
	} else if(obj instanceof Block){
		((Block)obj).setRegistryName(name).setUnlocalizedName(name);
	}else{
		throw new IllegalArgumentException();
	}
}

}

Blocks Class:

package io.github.dommihd.blazecraft.blocks;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.NameUtils;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class BlazeBlocks {

public static Block testblock;
public static Block emberorchid;

public void init(){
	testblock = new BlockTest().setCreativeTab(Blazecraft.instance.tab);
	NameUtils.setNames(testblock, "testblock");
	emberorchid = new EmberOrchid();
	NameUtils.setNames(emberorchid, "emberorchid");
}

public void register(){
	registerBlock(testblock);
	registeremberBlock(emberorchid);
}

private void registerBlock(Block block){
	GameRegistry.register(block);
	ItemBlock itemblock = new ItemBlock(block);
	itemblock.setUnlocalizedName(block.getUnlocalizedName()).setRegistryName(block.getRegistryName());
	GameRegistry.register(itemblock);
}
private void registeremberBlock(Block block){
	GameRegistry.register(block);
}
}

Block Crops

package io.github.dommihd.blazecraft.blocks;

import io.github.dommihd.blazecraft.items.BlazeItems;
import net.minecraft.block.BlockCrops;
import net.minecraft.init.Items;
import net.minecraft.item.Item;

public class EmberOrchid extends BlockCrops{

@Override
protected Item getSeed(){

	return BlazeItems.emberorchidSeeds;

}

@Override
protected Item getCrop() {

	return Items.BLAZE_POWDER;
}

}

blockstates:

{
    "variants": {
        "age=0": { "model": "blazecraft:eo_stage0" },
        "age=1": { "model": "blazecraft:eo_stage1" },
        "age=2": { "model": "blazecraft:eo_stage2" },
        "age=3": { "model": "blazecraft:eo_stage3" },
        "age=4": { "model": "blazecraft:eo_stage4" },
        "age=5": { "model": "blazecraft:eo_stage5" },
        "age=6": { "model": "blazecraft:eo_stage6" },
        "age=7": { "model": "blazecraft:eo_stage7" }
    }
}

block models exaple:

{
    "parent": "block/crop",
    "textures": {
        "crop": "blazecraft:blocks/eo_stage0"
    }
}

texture names: eo_stage0.png, eo_stage1.png, ...

Posted

Your blockstate is wrong.  You're telling Minecraft to look for a model that doesn't exist.

You should instead override the texture, like so:

 

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/hardiron.json

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I have the same problem : No texture and no error for my item:

 

the main class:

 

@Mod (modid = References.MOD_ID, name = References.NAME, version = References.VERSION,
      acceptedMinecraftVersions = References.ACCEPTED_VERSIONS)

public class Tem {

@SidedProxy(serverSide= References.CLIENT_PROXY_CLASS, clientSide = References.SERVER_PROXY_CLASS)
public static CommonProxy proxy;


@Instance
public static Tem instance;

@EventHandler
public void preInit (FMLPreInitializationEvent event) {

	ModItems.init();
	ModItems.register();


}
@EventHandler
public void init (FMLInitializationEvent event){



}
@EventHandler
public void postInit(FMLPostInitializationEvent event){

	proxy.init();

}

}

 

 

the references class:

 

public class References {
public static final String MOD_ID = "tem";
public static final String NAME = "Tim's Expansion Mod";
public static final String VERSION = "1.0.0";
public static final String ACCEPTED_VERSIONS = "[1.10]";

public static final String CLIENT_PROXY_CLASS = "winnetrie.tem.proxy.ClientProxy";
public static final String SERVER_PROXY_CLASS = "winnetrie.tem.proxy.ServerProxy";

public static enum temItems {
	CHEESE("cheese", "ItemCheese");

	private String unlocalizedName;
	private String registryName;

	temItems(String unlocalizedName, String registryName){
		this.unlocalizedName = unlocalizedName;
		this.registryName = registryName;

	}
	public String getUnlocalizedName(){
		return unlocalizedName;
	}
	public String getRegistryName(){
		return registryName;
	}
}

}

 

 

the ModItems class:

 

 

public class ModItems {

public static Item cheese;

public static void init(){

	cheese = new ItemCheese();

}

public static void register(){
	GameRegistry.register(cheese);

}

public static void registerRenders(){
	registerRender(cheese);

}

private static void registerRender(Item item){
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));

}

}

 

 

the ItemCheese class:

 

public class ItemCheese extends Item {

public ItemCheese(){
	setUnlocalizedName(References.temItems.CHEESE.getUnlocalizedName());
	setRegistryName(References.temItems.CHEESE.getRegistryName());
}

}

 

the item model ItemCheese.json:

 

{
   "parent": "item/generated",
   "textures": {
      "layer0": "tem:items/ItemCheese"
   }
}

 

 

and the texture is called ItemCheese.png

Posted

When dealing with resources do not use capital letters.

 

I watched a video tutorial where the person use capital letters in his resources.

The example worked fine.

But hey i tried it out and changed everything lower case and guess what?

No errors and still no textures.

 

I also saw a little mistake done by me.

I did put proxy.init(); in the postinit instead of the init method.

That didn't fixed it either, so must be something else...

Posted

i found out that all the textures and sounds works if i place the itemblock of the emberorchid , but i i try to place the seeds thers no sound and the missing-texture texture. This makes no sense ;D

Posted

@_Dommi_

Show your ItemSeed class. If the crop-block is placed just fine, then something is likely wrong with your seed.

I have a working ItemSeed implementation here that you can take a look at.

 

 

@winnetrie

1) Mojang will be enforcing lowercase soon for resources, I've heard. It's good practice to follow what will come, and not having to redo all work when updating etc.

2) (Depending on your OS (Windows falls under here)) The dev-environment will ignore lower/uppercase mismatches, and show you the resource for supermod:SuPeRbLoCk == supermod:superblock. This means that if your resources are typed with different cases, they will still show as expected. However, when compiled into a .jar (really just a .zip file with different name) it cannot do this anymore, leading to SuPeRbLoCk =! superblock. It's a pain in the proverbial behind to find all these issues with the naked eye.

3) I don't see you calling ModItems.registerRenders. This has to be done in preInit, in the clientproxy.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Posted

i changed it, but still no textures and no error:

@Mod (modid = References.MOD_ID, name = References.NAME, version = References.VERSION,
      acceptedMinecraftVersions = References.ACCEPTED_VERSIONS)

public class Tem {

@SidedProxy(serverSide= References.CLIENT_PROXY_CLASS, clientSide = References.SERVER_PROXY_CLASS)
public static CommonProxy proxy;


@Instance
public static Tem instance;

@EventHandler
public void preInit (FMLPreInitializationEvent event) {
	proxy.init();
	ModItems.init();
	ModItems.register();



}
@EventHandler
public void init (FMLInitializationEvent event){




}
@EventHandler
public void postInit(FMLPostInitializationEvent event){



}

}

 

I also did it exactly as in the tutorial. In the tutorial they do it in the Init and not preInit

Posted

My seed class:

public class EmberOrchidSeeds extends ItemSeeds{

public EmberOrchidSeeds(){
	super(BlazeBlocks.eo, Blocks.DIRT);
	this.setCreativeTab(Blazecraft.instance.tab);
	this.soilBlockID = Blocks.DIRT;
}
}

 

Posted

@_Dommi_

You need to override

onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)

in your seed class.

You can see how my itemseeds do so in my previous post.

 

 

@Winnetrie

You... What are.... how...

What?

You are calling your proxy's init, from preInit... That is not what I told you to do.

In your main's preInit, call proxy.preInit().

In your clientProxy's preInit, call ModItems.registerRenders

 

i changed it, but still no textures and no error:

 

I also did it exactly as in the tutorial. In the tutorial they do it in the Init and not preInit

ModelLoader HAS to be registered in preInit. If you use Minecraft::getItemModelMesher, then yes, you register in init, but that is buggy as heck, which is why Forge had to add ModelLoader as a better alternative.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Posted

What is it with this trend to put everything inside the proxy classes? That defeats their purpose...

 

Not to mention that your client proxy then calls ModItems, which is common code, further defeating the purpose of proxies.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

now the game crashed ^^ : http://pastebin.com/yE0Nw1jB

 

Seeds:

package io.github.dommihd.blazecraft.items;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.blocks.EmberOrchid;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class EmberOrchidSeeds extends ItemSeeds{

    private static EmberOrchid crops;
    private static Block soilBlockID;

public EmberOrchidSeeds(){
	super(BlazeBlocks.eo, Blocks.DIRT);
	this.setCreativeTab(Blazecraft.instance.tab);
	this.soilBlockID = Blocks.DIRT;
}


@Override
    public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
    {
        net.minecraft.block.state.IBlockState state = worldIn.getBlockState(pos);
        if (facing == EnumFacing.UP && playerIn.canPlayerEdit(pos.offset(facing), facing, stack) && worldIn.isAirBlock(pos.up()) && this.crops.canSustainBush(state))
        {
            worldIn.setBlockState(pos.up(), this.crops.getDefaultState());
            --stack.stackSize;
            return EnumActionResult.SUCCESS;
        }
        else
        {
            return EnumActionResult.FAIL;
        }
}

}

 

package io.github.dommihd.blazecraft.blocks;

import java.util.Random;

import io.github.dommihd.blazecraft.items.BlazeItems;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class EmberOrchid extends BlockCrops{




@Override
protected Item getSeed(){

	return BlazeItems.emberorchidSeeds;

}

@Override
protected Item getCrop() {

	return Items.BLAZE_POWDER;
}	
  @Override
    public boolean canSustainBush(IBlockState state){
    	if(state.getBlock() == Blocks.DIRT ||state.getBlock() == Blocks.GRASS || state.getBlock() == Blocks.SAND)
    		return true;
    	
        return false;
}
}

Posted

@Winnetrie

You... What are.... how...

What?

You are calling your proxy's init, from preInit... That is not what I told you to do.

In your main's preInit, call proxy.preInit().

In your clientProxy's preInit, call ModItems.registerRenders

 

I'm really confused now. I don't understand what you mean!

Maybe take a look at this tutorial:

 

I did exactly like this and it works for him, why not for me?

Posted

net.minecraft.block.state.IBlockState state

?  Really?

Couldn't be arsed to import that?

 

As for the crash...

Caused by: java.lang.NullPointerException
    at io.github.dommihd.blazecraft.items.EmberOrchidSeeds.onItemUse(EmberOrchidSeeds.java:33) ~[EmberOrchidSeeds.class:?]

 

Go to EmberOrchidSeeds line 33.  Find the thing that is null, it is very easy.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I checked something and it appears that this is never been called:

 

public class ClientProxy implements CommonProxy{

@Override
public void init() {

	ModItems.registerRenders();
	System.out.println("renders have been registered");

}	

}

I added the System.out.println("renders have been registered"); to check, but i can't see the message.

So i guess it isn't called but why?

 

Also if i name the method init or preInit or whatever name you can imagine, it's just a name. Does it really matter how i name it?

Like i said before i watch the tutorial video (wich is a working example) and checked every step again and again.

Posted

So i guess it isn't called but why?

Because you never call the method...

 

Also if i name the method init or preInit or whatever name you can imagine, it's just a name. Does it really matter how i name it?

Like i said before i watch the tutorial video (wich is a working example) and checked every step again and again.

You can name your methods whatever you want, just be sure to name them something logical.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

@_Dommi_

I didn't mean for you to copy/paste directly from my github.

 

Your crop creates blaze-powder, no? Then I assume you want it to only grow on soulsand. Use that instead of grass|dirt|sand.

 

The nullpointer occurs here:

if (facing == EnumFacing.UP && playerIn.canPlayerEdit(pos.offset(facing), facing, stack) && worldIn.isAirBlock(pos.up()) && this.crops.canSustainBush(state))

Something here, is called, when it does not exist.

You could just simply have if-checks before hand and check if they are null, System.out.print(variable + " is null") and return the method. Then you know what is wrong.

 

net.minecraft.block.state.IBlockState state

?  Really?

Couldn't be arsed to import that?

=_= That's on me, actually. Copied from the github. Lesson learnt: don't code stuff when sick.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Posted

Because you never call the method...

 

Am i not doing that here?:

 

@Mod (modid = References.MOD_ID, name = References.NAME, version = References.VERSION,
      acceptedMinecraftVersions = References.ACCEPTED_VERSIONS)

public class Tem {

@SidedProxy(serverSide= References.CLIENT_PROXY_CLASS, clientSide = References.SERVER_PROXY_CLASS)
public static CommonProxy proxy;


@Instance
public static Tem instance;

@EventHandler
public void preInit (FMLPreInitializationEvent event) {
	proxy.init();
	ModItems.init();
	ModItems.register();



}
@EventHandler
public void init (FMLInitializationEvent event){




}
@EventHandler
public void postInit(FMLPostInitializationEvent event){



}

}

 

 

the proxy.init() ?

 

Posted

ok private static EmberOrchid crops; was null and i fixed it and the seeds can now only placed on soul sand, but theres no sound and no texture  :-\ :'(

 

package io.github.dommihd.blazecraft.items;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.blocks.EmberOrchid;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class EmberOrchidSeeds extends ItemSeeds{

    private static EmberOrchid crops= new EmberOrchid();
    private static Block soilBlockID;

public EmberOrchidSeeds(){
	super(BlazeBlocks.eo, Blocks.SOUL_SAND);
	this.setCreativeTab(Blazecraft.instance.tab);
	this.soilBlockID = Blocks.SOUL_SAND;
}


@Override
    public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
    {
        net.minecraft.block.state.IBlockState state = worldIn.getBlockState(pos);
        if(state!=null&&facing!=null&&pos!=null&&stack!=null&&worldIn!=null&&playerIn!=null&&crops!=null){
        	System.out.println("hi");
        if (facing == EnumFacing.UP && playerIn.canPlayerEdit(pos.offset(facing), facing, stack) && worldIn.isAirBlock(pos.up())&& this.crops.canSustainBush(state))
        {
        	System.out.println("hi2");
            worldIn.setBlockState(pos.up(),this.crops.getDefaultState());
            --stack.stackSize;
            return EnumActionResult.SUCCESS;
        }
        else
        {
            return EnumActionResult.FAIL;
        }
        }else  return EnumActionResult.FAIL;
}

}

Posted

Itemseeds class:

package io.github.dommihd.blazecraft.items;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.blocks.EmberOrchid;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class EmberOrchidSeeds extends ItemSeeds{

    private static EmberOrchid crops= new EmberOrchid();
    private static Block soilBlockID;

public EmberOrchidSeeds(){
	super(BlazeBlocks.eo, Blocks.SOUL_SAND);
	this.setCreativeTab(Blazecraft.instance.tab);
	this.soilBlockID = Blocks.SOUL_SAND;
}


@Override
    public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
    {
        net.minecraft.block.state.IBlockState state = worldIn.getBlockState(pos);
        if(state!=null&&facing!=null&&pos!=null&&stack!=null&&worldIn!=null&&playerIn!=null&&crops!=null){
        if (facing == EnumFacing.UP && playerIn.canPlayerEdit(pos.offset(facing), facing, stack) && worldIn.isAirBlock(pos.up())&& this.crops.canSustainBush(state))
        {
            worldIn.setBlockState(pos.up(),this.crops.getDefaultState());
            --stack.stackSize;
            return EnumActionResult.SUCCESS;
        }
        else
        {
            return EnumActionResult.FAIL;
        }
        }else  return EnumActionResult.FAIL;
}

}

Block crops:

package io.github.dommihd.blazecraft.blocks;

import java.util.Random;

import io.github.dommihd.blazecraft.items.BlazeItems;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class EmberOrchid extends BlockCrops{




@Override
protected Item getSeed(){

	return BlazeItems.emberorchidSeeds;

}

@Override
protected Item getCrop() {

	return Items.BLAZE_POWDER;
}	
  @Override
    public boolean canSustainBush(IBlockState state){
    	if(state.getBlock() == Blocks.SOUL_SAND){
    		return true;
    	}else{
        return false;
    	}
}
}

 

package io.github.dommihd.blazecraft.items;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.NameUtils;
import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.blocks.EmberOrchid;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemSeeds;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class BlazeItems {

public static Item testitem;
public static EmberOrchidSeeds emberorchidSeeds =new EmberOrchidSeeds();

public void init(){
	testitem = new ItemTest().setCreativeTab(Blazecraft.instance.tab);
	NameUtils.setNames(testitem, "testitem");
	emberorchidSeeds = new EmberOrchidSeeds();
	NameUtils.setNames(emberorchidSeeds, "emberorchidSeeds");
}

public void register(){
	registerItem(testitem);
	registerItemSeeds(emberorchidSeeds);
}

private void registerItem(Item item){
	GameRegistry.register(item);
}

private void registerItemSeeds(ItemSeeds item){
	GameRegistry.register(item);
}
}

package io.github.dommihd.blazecraft.blocks;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.NameUtils;
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 BlazeBlocks {

public static Block testblock;
public static EmberOrchid eo = new EmberOrchid();

public void init(){
	testblock = new BlockTest().setCreativeTab(Blazecraft.instance.tab);
	NameUtils.setNames(testblock, "testblock");
	eo = new EmberOrchid();
	NameUtils.setNames(eo, "eo");
}

public void register(){
	registerBlock(testblock);
	registerBlock(eo);
}

private void registerBlock(Block block){
	GameRegistry.register(block);
	ItemBlock itemblock = new ItemBlock(block);
	itemblock.setUnlocalizedName(block.getUnlocalizedName()).setRegistryName(block.getRegistryName());
	GameRegistry.register(itemblock);
}
private void registeremberBlock(Block block){
	GameRegistry.register(block);
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block),0, new ModelResourceLocation("blazecraft:eo","inventory"));
}
}

Client Proxy:

package io.github.dommihd.blazecraft.proxy;

import io.github.dommihd.blazecraft.Blazecraft;
import io.github.dommihd.blazecraft.blocks.BlazeBlocks;
import io.github.dommihd.blazecraft.items.BlazeItems;
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.ItemSeeds;

public class ClientProxy extends CommonProxy {


public void registerModels() {
	//items
	registerModel(BlazeItems.testitem, 0, new ModelResourceLocation(BlazeItems.testitem.getRegistryName(),"inventory"));
	registerModel(BlazeItems.emberorchidSeeds, 0, new ModelResourceLocation(BlazeItems.emberorchidSeeds.getRegistryName(),"inventory"));
	//blocks
	registerModel(BlazeBlocks.testblock, 0, new ModelResourceLocation(BlazeBlocks.testblock.getRegistryName(),"inventory"));
	registerModel(BlazeBlocks.eo, 0, new ModelResourceLocation(BlazeBlocks.eo.getRegistryName(),"inventory"));
}

private void registerModel(Object obj, int meta, ModelResourceLocation loc){
	Item item = null;
	System.out.println(obj);
	if (obj instanceof Item){
		item = (Item) obj;
		System.out.println(item);
	}else if (obj instanceof ItemSeeds){
		item = (ItemSeeds) obj;
		System.out.println(item);
	} else if (obj instanceof Block){
		item = Item.getItemFromBlock((Block) obj);
		System.out.println(item);
	}else{
		throw new IllegalArgumentException();

	} 
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, loc);
}

}

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

    • Okay so I went to a different version of that mod and it booted right up, thank you
    • C:\Users\bruiser\curseforge\minecraft\Instances\Fazbear Remnants\essential\loader\stage1\launchwrapper\stage2.forge_1.12.2.jar: The process cannot access the file because it is being used by another process. Restart your system and test it again If there is no change, delete the mentioned essential folder or remove the mod essential
    • Does it work with newer versions? For 1.16.5 also make a test with Embeddium + Oculus as Optifine replacement
    • Looking for the best Temu coupon code $100 off? You’re in the right place! We’ve got the ultimate deal that helps you save big on your favorite items. Our exclusive ACS670886 Temu coupon code is perfect for shoppers in the USA, Canada, and Europe. Whether you're a new or existing customer, this code ensures you get maximum benefits. By using the Temu coupon $100 off, you can unlock exciting savings on Temu’s vast collection. Don’t miss this chance to claim your Temu 100 off coupon code today! What Is The Coupon Code For Temu $100 Off? Both new and existing customers can enjoy incredible benefits with our Temu coupon $100 off on the Temu app and website. This $100 off Temu coupon ensures huge savings for everyone! ACS670886 – Get a flat $100 off on selected purchases. ACS670886 – Unlock a $100 coupon pack for multiple uses. ACS670886 – Enjoy a $100 flat discount if you're a new customer. ACS670886 – Existing customers can claim an extra $100 promo code. ACS670886 – This $100 coupon is valid for shoppers in the USA and Canada. Temu Coupon Code $100 Off For New Users In 2025 New users can maximize their savings by applying our Temu coupon $100 off on the Temu app. This Temu coupon code $100 off unlocks amazing deals for first-time shoppers. ACS670886 – Get a flat $100 discount for new users. ACS670886 – Receive a $100 coupon bundle as a welcome offer. ACS670886 – Unlock up to $100 in coupons for multiple uses. ACS670886 – Enjoy free shipping to 68 countries. ACS670886 – Get an extra 30% off on any purchase as a first-time user. How To Redeem The Temu Coupon $100 Off For New Customers? Using the Temu $100 coupon is easy! Follow these steps to redeem your Temu $100 off coupon code for new users: Sign up on the Temu app or website. Browse and add your favorite items to the cart. Enter ACS670886 at checkout. See the $100 discount applied instantly. Complete your purchase and enjoy your savings! Temu Coupon $100 Off For Existing Customers Existing customers can also benefit from our exclusive Temu $100 coupon codes for existing users. Use this Temu coupon $100 off for existing customers free shipping deal and save more! ACS670886 – Get an extra $100 discount for existing users. ACS670886 – Enjoy a $100 coupon bundle for multiple purchases. ACS670886 – Receive a free gift with express shipping across the USA/Canada. ACS670886 – Grab an extra 30% off on top of existing discounts. ACS670886 – Avail free shipping to 68 countries. How To Use The Temu Coupon Code $100 Off For Existing Customers? Redeeming your Temu coupon code $100 off as an existing user is simple. Just follow these steps: Log in to your Temu account. Select your desired products and add them to your cart. Apply ACS670886 at checkout. Your Temu coupon $100 off code will be applied automatically. Confirm your order and enjoy massive savings! Latest Temu Coupon $100 Off First Order First-time buyers get the best deals with our Temu coupon code $100 off first order. This Temu coupon code first order ensures maximum savings. ACS670886 – Flat $100 discount for the first order. ACS670886 – Special $100 Temu coupon code for new customers. ACS670886 – Get up to $100 in coupons for multiple uses. ACS670886 – Free shipping to 68 countries. ACS670886 – Extra 30% off on any first-time purchase. How To Find The Temu Coupon Code $100 Off? Finding a Temu coupon $100 off is easy! Check out the Temu coupon $100 off Reddit section or follow these tips: Subscribe to the Temu newsletter for exclusive deals. Follow Temu’s official social media pages for the latest updates. Visit trusted coupon sites for verified and working codes. Is Temu $100 Off Coupon Legit? Yes, our Temu $100 Off Coupon Legit and verified! Wondering if the Temu 100 off coupon legit? Here’s why: The ACS670886 code is officially tested and confirmed. Valid for all customers in the USA, Canada, and Europe. No expiration date—use it anytime! How Does Temu $100 Off Coupon Work? The Temu coupon code $100 off first-time user works instantly upon applying at checkout. Simply enter the Temu coupon codes 100 off, and the discount is automatically deducted. How To Earn Temu $100 Coupons As A New Customer? To earn a Temu coupon code $100 off, sign up on Temu, make your first purchase, and refer friends. This 100 off Temu coupon code can be unlocked through special promotions. What Are The Advantages Of Using The Temu Coupon $100 Off? $100 discount on the first order $100 coupon bundle for multiple uses 70% discount on popular items Extra 30% off for existing customers Up to 90% off on selected products Free gifts for new users Free delivery to 68 countries Temu $100 Discount Code And Free Gift For New And Existing Customers Enjoy the Temu $100 off coupon code and get amazing benefits! Our $100 off Temu coupon code ensures huge savings. ACS670886 – $100 discount for the first order. ACS670886 – Extra 30% off on any item. ACS670886 – Free gift for new Temu users. ACS670886 – Up to 70% discount on all Temu items. ACS670886 – Free shipping in 68 countries including the USA and UK. Final Note: Use The Latest Temu Coupon Code $100 Off Using the Temu coupon code $100 off is the smartest way to save on Temu! Don’t wait—grab your discount now. Our Temu coupon $100 off is available for all customers, ensuring maximum savings. Get yours today! FAQs Of Temu $100 Off Coupon Q: How can I get the Temu $100 off coupon? A: Use code ACS670886 at checkout to claim your $100 discount. Q: Is the Temu $100 coupon valid for existing customers? A: Yes! Existing users can also apply ACS670886 and enjoy savings. Q: Does the Temu $100 off coupon have an expiration date? A: No, ACS670886 is valid indefinitely. Q: Can I use the Temu coupon on multiple orders? A: Yes! ACS670886 allows multiple redemptions. Q: Is the Temu $100 coupon applicable worldwide? A: Yes, it’s valid in the USA, Canada, Europe, and 68 other countries.
    • I tried both Vanilla and Optfine like you said, and both gave the same result. So I believe the issue is most likely with Minecraft in general and not Forge
  • Topics

×
×
  • Create New...

Important Information

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