I need help with a few things...

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

supremegamer76

New Member
Jul 29, 2019
51
0
0
Hi I had another post on one problem I had... now it's solved but I need more help... This thread is for any other help I need and I'll put my questions in here.

first of all, I'm trying to make a block similar to dispensers but instead of the block doing right click things, it will do left click things. the problem I'm having is making the block face the player when placed along with it being placed facing up and down... how do I do this?

Here is the link to the GitHub repository:

https://github.com/supremegamer76/MinecraftPlusMod
 

supremegamer76

New Member
Jul 29, 2019
51
0
0
here is proof that it didn't work...

Here is where I extended BlockRotatedPillar:
Code:
package com.supremegamer76.minecraftplusmod.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.BlockRotatedPillar;
import net.minecraft.block.material.Material;

public class BlockTest extends BlockRotatedPillar{

    public BlockTest(Material materialIn) {
        super(materialIn);
       
    }

}

And here is a video showing it didn't work:

 

SatanicSanta

New Member
Jul 29, 2019
4,849
-3
0
Are you sure it's not doing that because you haven't defined any textures? You have to define a texture for the top and side with BlockRotatedPillar.

Although, if you don't want it to be like a log, use Block and just define different textures based on the side using registerBlockIcons and getIcon. I can't remember exactly if its orientation will be handled automatically, but I'm pretty sure it is. Most methods that you will probably be using for what you want to do will probably have a parameter for the side.
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
Just extending a block isn't good enough anymore to do anything useful. You would still have to register block states for your new block at startup, set which block states to ignore for rendering if applicable, and set up the physical block state and model files related to that block's id. You'd also need code in your block class for dealing with block states, but you can borrow most of that from the dispenser.

Remember when I recommended 1.7.10? All of this kind of crap is why. Adding a block isn't simple anymore. But you'll get the hang of it eventually.