-
-
Notifications
You must be signed in to change notification settings - Fork 2
Resource types
Marc Hermans edited this page Jan 22, 2019
·
1 revision
This page will list all resources types that BlockOut offers and their default data. As such this page will only describe the data section of a resource definition. For more information about defining resources see: Styles, resources and static elements.
for custom resource types, refer to the author and creator of said resource type.
To create a simple image it suffices to specify the Resourcelocation
of the .png
file:
{
"id":"image:test_image", //Id of the resource
"data":"modid:test_image.png" //RL of the image. Now located under /assets/modid/test_image.png
}
If you use texture sheets, or only need a specific region of a image, you can define the resource as follows:
{
"id":"image:test_image", //Again the id of the resource
"data":{
"file":"modid:test_image.png", //Required. The RL of the image.
"offset":[1,2], //Optional. Offset in the image.
"size":[1,2] //Optional. Size in the image.
}
}
Templates are easily defined by their template file path in a ResourceLocation.
{
"id":"template:test_template", //Id of the resource
"data":"modid:test_template.json" //RL of the template. Now located under /assets/modid/test_template.json
}
ItemStacks are defined in the usual json to NBT format:
{
"id":"itemstack:test_stack", //Id of the resource
"data":{
"item":"minecraft:diamond_pickaxe",
"damage":50"
}
}