Skip to content

Instantly share code, notes, and snippets.

Avatar

sba mossyblog

View GitHub Profile
@mossyblog
mossyblog / DLZMainMenu.c
Last active Mar 18, 2022
scripts/5_Mission/gui/DLZMainMenu.c
View DLZMainMenu.c
modded class MainMenu extends UIScriptedMenu
{
override Widget Init()
{
return super.Init();
}
}
// Note in my config.cpp i have this:
@mossyblog
mossyblog / app.py
Last active Jul 22, 2021
Sons First Code
View app.py
from flask import Flask, request, redirect, url_for, render_template, session, flash
import sqlite3
import hashlib
import dbMain
app = Flask(__name__)
app.config["SECRET_KEY"] = "my_secret_key"
db_locale = 'igdbaccounts.db'
#----------------------------------------------
View Bindable.cs
public abstract class Bindable : MonoBehaviour, INotifyPropertyChanged
{
private readonly Dictionary<string, object> _properties = new Dictionary<string, object>();
private static readonly StackTrace stackTrace = new StackTrace();
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Resolves a Property's name from a Lambda Expression passed in.
/// </summary>
View ThefuckDidIJustDo.java
package com.riagenic.BlockFarmer.core.asm.utils;
import com.google.common.collect.Maps;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.Charset;
@mossyblog
mossyblog / gist:bf5313c1e6596142edff
Created Feb 4, 2016
Render 3D Icon in Minecraft of a Item/Block - 1.8.9
View gist:bf5313c1e6596142edff
public static void RenderFloatingItemIcon(float x, float y, float z, Item item, float partialTickTime, boolean animate) {
BlockPos pos = new BlockPos(x,y,z);
// Create Empty EntityItem to help with Rendering Positionining.
EntityItem entity = new EntityItem(mc.theWorld,pos.getX(),pos.getY(), pos.getZ());
if (entity.ticksExisted == 0)
{
entity.lastTickPosX = entity.posX;
entity.lastTickPosY = entity.posY;
entity.lastTickPosZ = entity.posZ;