Jump to content

Recommended Posts

Posted

I make wires and i need connection 2 wires block.

I have BooleanPropertys registered, but in mod loading it show Unknown the property in assets/wuntare/blockState.

	public static final BooleanProperty CONNECTED_NORTH = BooleanProperty.create("connected_north");
    public static final BooleanProperty CONNECTED_SOUTH = BooleanProperty.create("connected_south");
    public static final BooleanProperty CONNECTED_WEST = BooleanProperty.create("connected_west");
    public static final BooleanProperty CONNECTED_EAST = BooleanProperty.create("connected_east");
    public static final BooleanProperty CONNECTED_UP = BooleanProperty.create("connected_up");
    public static final BooleanProperty CONNECTED_DOWN = BooleanProperty.create("connected_down");
    
    public CopperWireWithoutInsulation0(Properties properties) {
        super(properties);
        this.registerDefaultState(this.stateDefinition.any()
            .setValue(CONNECTED_NORTH, false)
            .setValue(CONNECTED_SOUTH, false)
            .setValue(CONNECTED_WEST, false)
            .setValue(CONNECTED_EAST, false)
            .setValue(CONNECTED_UP, false)
            .setValue(CONNECTED_DOWN, false));
    }
    
    @Override
    protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
        builder.add(CONNECTED_NORTH, CONNECTED_SOUTH, CONNECTED_WEST, CONNECTED_EAST, CONNECTED_UP, CONNECTED_DOWN);
    }

In this part blockState have problem

"multipart": [
    {
      "apply": {
        "model": "wuntare:block/copper_wire_without_insulation0"
      }
    },
    {
      "when": { "connected_north": true },
      "apply": {
        "model": "wuntare:block/copper_wire_without_insulation0_north"
      }
    },

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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