Jump to content

Awesome_Spider

Forge Modder
  • Posts

    892
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Awesome_Spider

  1. And instead of defining blockstates like this:

      ...
    "variants": { 
    	"normal": { 
    		"model": "orientable" 
    	}, 
    	"inventory": { 
    		"model": "orientable" 
    	}, 
    	"facing=north": { 
    		"model": "orientable" 
    	}, 
    	"facing=east": { 
    		"model": "orientable", 
    		"y": 90 
    	}, "facing=south": { 
    		"model": "orientable", 
    		"y": 180 
    	}, 
    	"facing=west": { 
    		"model": "orientable", 
    		"y": 270 
    	}
      ...

     

    Define them like this:

    https://github.com/WiseOwl5/RobotiCraft/blob/master/1.11/src/main/resources/assets/roboticraft/blockstates/steam_engine.json#L11-L35

    • Like 1
  2. Ok, you're close. You need to override both hasCapability and getCapability. Also, who'll need to have an ItemStackHandler field in your class and write and read it to and from NBT by overriding writeToNBT and readFromNBT. I'll check my code to make sure it's correct though.

  3. Create a block class the overrides hasTileEntity and getTileEntity and make the getTileEntity method return a new instance of your tile entity class (create one if you haven't already). In your tile entity expose a capability for an ItemStackHandler (read this).

     

    Then if you want a gui, they are basically the same as 1.8.

     

    Edit: I hope that was easy to understand. If it wasn't, I can explain a little more.

  4. Well, there is shadow facts, but if you want GUIs I don't think there is any. Basically there is no IInventory anymore, you use a ItemStackHandler field in your tile entity class a use capabilities to save it.

  5. I make a block that has a partially transparent texture and I want it be clear like glass is. I copied the glass code and now my block sees right through the ground. How would I fix this?

     

    Here is pictures of this and my code:

     

    http://image.prntscr.com/image/a8f16eeef55a43c6bbf48f06e431de65.png

     

    http://image.prntscr.com/image/c12682e8b9a34e24aadc3829689e1884.png

     

    The block code:

    
    public class BlockMachineFrame extends BlockBase {
        public BlockMachineFrame() {
            super(Material.IRON, "machine_frame");
    
            setHardness(3f);
            setResistance(5f);
            setHarvestLevel("pickaxe", 0);
        }
    
        @Override
        public BlockMachineFrame setCreativeTab(CreativeTabs tab) {
            super.setCreativeTab(tab);
            return this;
        }
    
        @SideOnly(Side.CLIENT)
        public BlockRenderLayer getBlockLayer()
        {
            return BlockRenderLayer.CUTOUT;
        }
    
        public boolean isFullCube(IBlockState state)
        {
            return false;
        }
    }

     

    The blockstate file:

    
    {
      "forge_marker": 1,
      "defaults": {
        "textures": {
          "all": "roboticraft:blocks/machine_frame"
        }
      },
      "variants": {
        "normal": {
          "model": "cube_all"
        },
        "inventory": {
          "model": "cube_all"
        }
      }
    }
×
×
  • Create New...

Important Information

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