- 14
- 0
package com.integral.agob_researchlib.handlers;
import com.integral.agob_researchlib.blocks.BlockResearchTable;
import com.integral.agob_researchlib.items.ItemRune;
import com.integral.agob_researchlib.items.ItemScroll;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import java.util.ArrayList;
import java.util.List;
@Mod.EventBusSubscriber
public class Register
{
public static final List<Item> ITEMS = new ArrayList<>();
public static final List<Block> BLOCKS = new ArrayList<>();
//region BLOCKS
protected static Block researchTable = new BlockResearchTable("researchtable");
//endregion
//region ITEMS
protected static Item Scroll = new ItemScroll("scroll");
protected static Item Rune = new ItemRune("rune");
//endregion
public static void reg ()
{
for (Block block : BLOCKS)
{
ForgeRegistries.BLOCKS.register(block);
ForgeRegistries.ITEMS.register(new ItemBlock(block).setRegistryName(block.getRegistryName()));
}
for (Item item : ITEMS)
{
ForgeRegistries.ITEMS.registerAll(item);
}
}
public static void regMod()
{
for (Block block : BLOCKS)
{
Minecraft.getMinecraft().getRenderItem()
.getItemModelMesher().register
(Item.getItemFromBlock(block),
0, new ModelResourceLocation
(block.getRegistryName(),
"inventory"));
}
for (Item item : ITEMS)
{
Minecraft.getMinecraft().getRenderItem()
.getItemModelMesher().register(item, 0, new
ModelResourceLocation(item.getRegistryName(),
"inventory"));
}
}
}
{
"credit": "Made with Blockbench",
"ambientocclusion": false,
"texture_size": [16, 16],
"textures": {
"2": "agob_researchlib/models/texture/rune",
"particle": "image.psd"
},
"elements": [
{
"from": [1, 0, 0],
"to": [3, 2, 16],
"color": 3,
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#2"},
"east": {"uv": [0, 0, 8, 1], "texture": "#2"},
"south": {"uv": [0, 0, 1, 1], "texture": "#2"},
"west": {"uv": [0, 0, 8, 1], "texture": "#2"},
"up": {"uv": [0, 0, 1, 8], "texture": "#2"},
"down": {"uv": [0, 0, 1, 8], "texture": "#2"}
}
},
{
"from": [13, 0, 0],
"to": [15, 2, 16],
"color": 3,
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"east": {"uv": [0, 0, 8, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 8, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 8], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 8], "texture": "#missing"}
}
},
{
"from": [0, 14, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [8, 0, 16, 1], "texture": "#2"},
"east": {"uv": [8, 1, 16, 2], "texture": "#2"},
"south": {"uv": [8, 2, 16, 3], "texture": "#2"},
"west": {"uv": [8, 3, 16, 4], "texture": "#2"},
"up": {"uv": [8, 8, 0, 0], "texture": "#2"},
"down": {"uv": [8, 8, 0, 16], "texture": "#2"}
}
},
{
"from": [13, 2, 7],
"to": [15, 14, 9],
"color": 7,
"faces": {
"north": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"east": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
}
},
{
"from": [1, 2, 7],
"to": [3, 14, 9],
"color": 7,
"faces": {
"north": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"east": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
}
},
{
"from": [1, 2, 13],
"to": [3, 14, 15],
"color": 7,
"faces": {
"north": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"east": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
}
},
{
"from": [13, 2, 13],
"to": [15, 14, 15],
"color": 7,
"faces": {
"north": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"east": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 6], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 1], "texture": "#missing"}
}
},
{
"from": [1, 7, 9],
"to": [3, 9, 13],
"color": 6,
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"east": {"uv": [0, 0, 2, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 2, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 2], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 2], "texture": "#missing"}
}
},
{
"from": [13, 7, 9],
"to": [15, 9, 13],
"color": 6,
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"east": {"uv": [0, 0, 2, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 2, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 2], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 2], "texture": "#missing"}
}
},
{
"from": [3, 7, 13],
"to": [13, 9, 15],
"color": 6,
"faces": {
"north": {"uv": [0, 0, 5, 1], "texture": "#missing"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 5, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0, 0, 5, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 5, 1], "texture": "#missing"}
}
}
]
}
Должно быть так - agob_researchlib:models...agob_researchlib/models/texture/rune
Как раз модель камня в помощь.Например, камень