Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How do I make a custom Log?

Recommended Posts

Hi I'm trying to make a custom log but I'm having some troubles with the blockstates axis:


[16:36:42] [Worker-Main-13/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'nirvana:blockstates/bloody_log.json' in resourcepack: 'Mod Resources' for variant: 'axis=z': Unknown blockstate property: 'axis'
[16:36:42] [Worker-Main-13/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'nirvana:blockstates/bloody_log.json' in resourcepack: 'Mod Resources' for variant: 'axis=x': Unknown blockstate property: 'axis'
[16:36:42] [Worker-Main-13/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'nirvana:blockstates/bloody_log.json' in resourcepack: 'Mod Resources' for variant: 'axis=y': Unknown blockstate property: 'axis'


And the blockstates.json

  "variants": {
    "axis=x": {
      "model": "nirvana:block/bloody_log",
      "x": 90,
      "y": 90
    "axis=y": {
      "model": "nirvana:block/bloody_log_horizontal"
    "axis=z": {
      "model": "nirvana:block/bloody_log",
      "x": 90



IDE:IntelliJ IDEA Community

Link to post
Share on other sites
package fr.lithium.nirvana.init;

import fr.lithium.nirvana.NIRVANA;
import fr.lithium.nirvana.utils.ModItemGroups;
import net.minecraft.block.AbstractBlock;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import org.jline.utils.Log;

import java.util.function.Supplier;

public class ModBlocks {
    public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, NIRVANA.MODID);

    public static final RegistryObject<Block> BLOODY_LOG = CreateBlock("bloody_log", () -> new Block(AbstractBlock.Properties.of(Material.WOOD).strength(2f,2f).harvestTool(ToolType.AXE).sound(SoundType.WOOD)), new Item.Properties().tab(ModItemGroups.NIRVANA_TAB));

    public static RegistryObject<Block> CreateBlock(String name, Supplier<? extends Block> BlockSupplier, Item.Properties properties) {
        RegistryObject<Block> block = BLOCKS.register(name, BlockSupplier);
        ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), properties));
        return block;

Someone told me to use LogBlock but I don't know where and it seems like I don't have it 

Link to post
Share on other sites
3 hours ago, Yourou1000 said:

new Block(

See this part?

That's the generic "random block" called Block that all blocks inherit from.

LogBlock is a subclass of Block.

Edited by Draco18s

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.

Link to post
Share on other sites
2 minutes ago, Yourou1000 said:

So I'm suppose to write:  new LogBlock(AbstractBlock.Properties.of.......) or new Block.LogBlock(Absta...)?

I ask because both aren't working  like the class doesn't exist

there is no LogBlock minecraft uses the RotatedPillarBlock
look in the Blocks class how minecraft creates log blocks

  • Thanks 1
Link to post
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.

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.

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Link died while I was in the middle of following your tutorial
    • I think I've found the cause of the problem.  A recently updated Java installation installed just the JRE instead of the JDK, and was causing gradle to be unable to find tools.jar.  Installing the updated version of the JDK seems to have fixed the problem.  Thank you, and I apologize for wasting your time.
    • Send me examples with entities if u have ^^
    • Minecraft 1.16.5 Forge latest  This is my /data/forge/loot_modifiers/global_loot_modifiers.json  { "replace": false, "entries": [ "multimod:blaze_loot" ] }   This my /data/multimod/loot_modifiers/blaze_loot.json (serialized json) { "conditions": [ { "condition": "minecraft:killed_by_player" }, { "condition": "minecraft:entity_properties", "predicate": { "type": "minecraft:blaze" }, "entity": "this" } ] }   and now I want that the Entity Blaze can drop my custom item (custom_item) in this GlobalLotModifiers.java package com.squidxtv.multimod.core.init; import com.google.gson.JsonObject; import net.minecraft.item.ItemStack; import net.minecraft.loot.LootContext; import net.minecraft.loot.conditions.ILootCondition; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.common.loot.LootModifier; import javax.annotation.Nonnull; import java.util.List; public class GlobalLootModifiers extends LootModifier { /** * Constructs a LootModifier. * * @param conditionsIn the ILootConditions that need to be matched before the loot is modified. */ protected GlobalLootModifiers(ILootCondition[] conditionsIn) { super(conditionsIn); } @Nonnull @Override public List<ItemStack> doApply(List<ItemStack> generatedLoot, LootContext context) { return null; } private static class Serializer extends GlobalLootModifierSerializer<GlobalLootModifiers> { @Override public GlobalLootModifiers read(ResourceLocation location, JsonObject object, ILootCondition[] ailootcondition) { return null; } @Override public JsonObject write(GlobalLootModifiers instance) { return null; } } } but how can I do this?
    • I tried to found debug.log, but I can't found that, would you tell me about the location of the debug.log?
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.