Jump to content

Help!


Bubbly

Recommended Posts

So I'm working on my mod and have a block called Fairysteel Block. I'm currently testing it, and whenever I walk over it, it pushes me far away. I even made a path of them in the air and walked over them and got pushed many blocks away in a second. Anyone know how to fix this?

 

Here's some code relating to it:

 

public class BlockInit {
    public static final List<Block> BLOCKS = new ArrayList<Block>();
    
    public static final Block FAIRYSTEEL_BLOCK = new FairysteelBlock("fairysteel_block", Material.IRON);


 

public class FairysteelBlock extends Block implements IHasModel {

    public FairysteelBlock(String name, Material material) {
        super(material);
        setUnlocalizedName(name);
        setRegistryName(name);
        setCreativeTab(CrimsonMatter.CRIMSONMATTERTAB);
        setHardness(60);
        setResistance(75);
        setLightLevel(10);
        setLightOpacity(1);
        setDefaultSlipperiness(0f);
        setHarvestLevel("pickaxe", 7);
        setSoundType(SoundType.METAL);
        
        BlockInit.BLOCKS.add(this);
        ItemInit.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
    }
    
    @Override
    public boolean isFullBlock(IBlockState state) {
        return true;
    }
    
    @Override
    public boolean isFullCube(IBlockState state) {
        return true;
    }
    
    @Override
    public void registerModels() {
        CrimsonMatter.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
    }

}

 

Code in .json files for the block:

{
   "parent": "crimson:block/fairysteel_block"
}
{
   "parent": "block/cube_all",
   "textures": {
       "all": "crimson:blocks/fairysteel_block"
   }
}   
{
    "variants": {
        "normal": { "model": "crimson:fairysteel_block" }
    }
}

 

 

I have one other block, but it doesn't have the same problem as this. Linked is a video demonstrating the problem. it happens even with one block, walking over or next to it. Anyone know how to fix this? Also, I plan on removing IHasModel soon, im following TurtyWurty's tutorial and that comes later in the series.

https://streamable.com/rx2p3a

Edited by Bubbly
Link to comment
Share on other sites

1.12 is no longer supported here. 

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 comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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