Skip to content

Instantly share code, notes, and snippets.

View dmillerw's full-sized avatar

Dylan Miller dmillerw

View GitHub Profile
import json
import os
import sys
path = ""
# Check to see if any arguments have been passed, then check to see if valid
if len(sys.argv) > 1:
path = sys.argv[1]
{
"modRef": [
"cpw.mod.test:ModA:1.7.10-0.0.2.B55:universal",
"dmillerw.mod:ModB:1.7.10-1.0.0.B1:universal"
],
"repositoryRoot": "C:/Users/Dylan/Programs/tmp/mmc-win32-artifacts/instances/OneSevenTen/minecraft/mods"
}
public static void drawLine2D (Vector2f p1, Vector2f p2)
{
glColor4f ( SPColor.x,SPColor.y,SPColor.z,SPColor.w );
glPushMatrix();
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawing(GL_LINE_STRIP);
tessellator.addVertex(SPLeft + p1.x, SPTop + p1.y, 0);
tessellator.addVertex(SPLeft + p2.x, SPTop + p2.y, 0);
tessellator.draw();
glPopMatrix();
public class ClientRegistry {
/* Other methods excluded */
public static enum ModelTemplate {
BLOCK_BASIC,
BLOCK_BASIC_FACING_2D,
BLOCK_BASIC_FACING_3D,
BLOCK_STAIR,
BLOCK_SLAB,
BLOCK_PLANT,
@Override
public boolean renderWorldBlock(IBlockState p_175018_1_, BlockPos blockPos, IBlockAccess p_175018_3_, WorldRenderer worldRenderer, int modelId)
{
Minecraft mc = Minecraft.getMinecraft();
BlockRendererDispatcher blockRenderDispatcher = mc.getBlockRendererDispatcher();
BlockModelRenderer blockModelRenderer = mc.getBlockRendererDispatcher().getBlockModelRenderer();
boolean flag = false;
IBakedModel baseModel = blockRenderDispatcher.getModelFromBlockState(p_175018_1_, p_175018_3_, blockPos);
{
"category": "bonusChest",
"force_reload": false,
"count_min": 10,
"count_max": 10,
"loot": [
{
"item": "minecraft:stick",
"damage": 0,
"nbt": {},
message:reply("Echoing...")
message:reply(message:get_message())
function split(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
function split(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
function onUserPart(channel, user)
channel.send("Goodbye " .. user.nickname)
end
register_callback(CALLBACK_USER_PART, onUserPart)