Jump to content

Recommended Posts

Posted

So i try made my own building blocks, simple cube. But my problem is... a game dont see my block, mod info is correct, i have problem with en.json (all the time game see <a> open (wtf?)
i try everything that i read on vs wiki, what did i miss?

my json blocktype code:
 

{
  "code": "mossblock",
  "class": "BlockForestFloor",
  "creativeinventory": { "general": ["*"], "terrain": ["*"] },
  "shape": { "base": "block/basic/cube" },
  "drawtype": "Cube",
  "blockmaterial": "Soil",
  "textures": {
    "all": { "base": "morebuildingblocks:block/mossblock" },
    "snowed": { "base": "block/plant/grasscoverage/snow/normal" }
  },
  "sounds": {
    "place": "block/dirt",
    "break": "block/dirt",
    "hit": "block/dirt",
    "walk": "walk/grass"
  }
}



texture size must be 32x32? i have 16x16, is it a problem? Anyway game dont see block, i lost hope to solve this D:

Posted (edited)
2 hours ago, Lariien said:

So i try made my own building blocks, simple cube. But my problem is... a game dont see my block, mod info is correct, i have problem with en.json (all the time game see <a> open (wtf?)
i try everything that i read on vs wiki, what did i miss?

my json blocktype code:

{
  "code": "mossblock",
  "class": "BlockForestFloor",
  "creativeinventory": { "general": ["*"], "terrain": ["*"] },
  "shape": { "base": "block/basic/cube" },
  "drawtype": "Cube",
  "blockmaterial": "Soil",
  "textures": {
    "all": { "base": "morebuildingblocks:block/mossblock" },
    "snowed": { "base": "block/plant/grasscoverage/snow/normal" }
  },
  "sounds": {
    "place": "block/dirt",
    "break": "block/dirt",
    "hit": "block/dirt",
    "walk": "walk/grass"
  }
}


texture size must be 32x32? i have 16x16, is it a problem? Anyway game dont see block, i lost hope to solve this 😧

Couple of things. I assume you added this mossblock under your own mod domain (morebuildingblocks?). If that is the case, the shape doesn't load because the game is looking for "cube.json" in the folders "block/basic" in your mod, which presumably doesn't exist. If you want to use Vanilla assets, you have to tell the game to look in the right place. You do that, by prefixing the domain "game:" (this works for any folder in the games asset folder (creative, game, survival)) in front of any path that links to a default file.

Quote

{
  "code": "mossblock",
  "class": "BlockForestFloor",
  "creativeinventory": { "general": ["*"], "terrain": ["*"] },
  "shape": { "base": "game:block/basic/cube" },
  "drawtype": "Cube",
  "blockmaterial": "Soil",
  "textures": {
    "all": { "base": "morebuildingblocks:block/mossblock" },
    "snowed": { "base": "game:block/plant/grasscoverage/snow/normal" }
  },
  "sounds": {
    "place": "game:block/dirt",
    "break": "game:block/dirt",
    "hit": "game:block/dirt",
    "walk": "game:walk/grass"
  }
}

I am not sure about `"all": { "base": "morebuildingblocks:block/mossblock" },`. If that is your mod id and if that mossblock texture exists in "textures/block" within your mod folder structure, it would be okay, but if it doesn't and you would rather use the games default texture, you have to replace this domain with "game" as well.

Edited by Brady_The
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.