Skip to content

Instantly share code, notes, and snippets.

@thebrightspark
Created April 15, 2019 20:12
Show Gist options
  • Save thebrightspark/bccba3168889aaf489aa5f2c77d7bc92 to your computer and use it in GitHub Desktop.
Save thebrightspark/bccba3168889aaf489aa5f2c77d7bc92 to your computer and use it in GitHub Desktop.
IntelliJ IDEA Minecraft File Templates
#set($lowerName = $PROJECT_NAME.toLowerCase())
{
"display": {
"icon": {
"item": "${lowerName}:ITEM"
},
"title": {
"translate": "${lowerName}.advancement.${NAME}.title"
},
"description": {
"translate": "${lowerName}.advancement.${NAME}.desc"
}#if (${NAME} == "root"),
"background": "minecraft:textures/blocks/stonebrick.png",
"show_toast": false,
"announce_to_chat": false
#end
},
#if (${NAME} != "root")"parent": "${lowerName}:root",#end
"criteria": {
"trigger": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "item": "minecraft:crafting_table" }
]
}
}
}
}
#set($lowerName = $PROJECT_NAME.toLowerCase())
{
"parent": "block/cube_all",
"textures": {
"all": "$lowerName:blocks/$NAME"
}
}
#set($lowerName = $PROJECT_NAME.toLowerCase())
{
"variants": {
"normal": { "model": "$lowerName:${NAME}" }
}
}
#set($lowerName = $PROJECT_NAME.toLowerCase())
{
"parent": "item/generated",
"textures": {
"layer0": "$lowerName:items/$NAME"
}
}
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import io.netty.buffer.ByteBuf;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
#parse("File Header.java")
public class ${NAME} implements IMessage {
public ${NAME}() {}
@Override
public void fromBytes(ByteBuf buf)
{
}
@Override
public void toBytes(ByteBuf buf)
{
}
public static class Handler implements IMessageHandler<${NAME}, IMessage>
{
@Override
public IMessage onMessage(${NAME} message, MessageContext ctx)
{
return null;
}
}
}
#set($lowerName = $PROJECT_NAME.toLowerCase())
{
"type": "forge:ore_shaped",
"pattern": [
"XXX",
"OOO",
"XXX"
],
"key": {
"X": {
"type": "forge:ore_dict",
"ore": "ingotIron"
},
"O": {
"item": "minecraft:coal",
"data": 0
}
},
"result": {
"item": "$lowerName:$NAME",
"data": 0
}
}
#set($lowerName = $PROJECT_NAME.toLowerCase())
{
"type": "forge:ore_shapeless",
"ingredients": [
{
"type": "forge:ore_dict",
"ore": "ingotIron"
},
{
"item": "minecraft:coal",
"data": 0
}
],
"result": {
"item": "$lowerName:$NAME",
"data": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment