Posted August 6, 201510 yr How would I go about making it so that my log works like a normal log when being placed? I've looked in to it a bit and I got my textures to work correctly! But I have no clue how to change the block(or textures) around! I've looked at the default log texture files and I've basically copied them and edited it correctly to the correct file names. So, over all, I was just wondering how I would go about making the block change then.
August 6, 201510 yr BlockLog overrides onBlockPlaced to set the rotation of the log from the side of the other Block that the player clicked on. If you extend BlockLog , this will be done for you. The log models use block/cube_column and block/column_side as the parent models for the regular and side models, respectively. Look at the blockstates file for any log type to see how it selects the model to use. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 7, 201510 yr Author Okay, I'm a real noob at this - I'm really sorry. But It says implements excepted, I understand that this means there's like a method that needs writing but I have no clue what the method is. It doesn't want to write it for me too, package com.PSmithgamer.Alkia.blocks; import java.util.List; import com.PSmithgamer.Alkia.init.AlkiaBlocks; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; public class mango_wood extends Block extends BlockLog{ //error is here on the second extends public mango_wood(Material materialIn) { super(materialIn); this.setHardness(2); this.setHarvestLevel("axe", 0); this.setStepSound(soundTypeWood); Blocks.fire.setFireInfo(AlkiaBlocks.mango_wood, 8, 30); } @Override public int getRenderType() { return 3; } public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par1){ list.add(EnumChatFormatting.GREEN + "Mango sap makes this block unburnable"); } }
August 7, 201510 yr You should probably review the basics of Java before you try to mod. A class can only extend a single class. Just extend BlockLog instead of Block . You don't need to override Block#getRenderType unless you want to use a different renderer to the super class. Block uses 3 (JSON model) and BlockLog doesn't override it. Your addInformation method won't do anything unless you're calling it yourself. It doesn't override any super method. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.