Skip to content

Instantly share code, notes, and snippets.

View Controller.ts
interface ControllerArgs {
contextName?: string;
storeListening: boolean;
eventBusEnabled: false | "methods";
const defaultControllerArgs: ControllerArgs = {
View logs.lua
logs = {}
function logs.mutePlayer(id,name,usgn,steam,duration,toggle)
-- open save file
local fileUSGN ="users/"..usgn..".txt")
local fileSTEAM ="users/"..steam..".txt")
-- read save file contents (deserialize) and parse its contents into a table
local tbl_saved_data = {}
if fileUSGN then
public class TestScreen extends BaseContainerScreen<TestContainer> {
public TestScreen(Text name, TestContainer linkedContainer, PlayerEntity player) {
super(name, linkedContainer, player);
WInterface screen = getInterface().setTheme("spinnery:dark");
// *** PANEL ***
WPanel mainPanel = screen.createChild(WPanel.class, WPosition.of(screen, 0, 32), WSize.of(170, 170))
View default.theme.json5
id: "spinnery:default",
name: "Default Theme",
description: "Default Spinnery theme for a Vanilla-like experience",
vars: {
bevel_dark: 0xff373737,
bevel_light: 0xffffffff,
bg_panel: 0xffc6c6c6,
bg_interactable: 0xff8b8b8b
public class BackpackInventory extends BasicInventory implements INbtSerializable<CompoundTag> {
private final ItemStack backpackStack;
private final PlayerInventory playerInventory;
private final int stackSlot;
public BackpackInventory(ItemStack backpackStack, int size, PlayerInventory playerInventory, int stackSlot) {
this.backpackStack = backpackStack;
this.playerInventory = playerInventory;
this.stackSlot = stackSlot;
Eng1N33R / shmem-ffi.lua
Created Jan 13, 2020
lua-shmem implementation using LuaJIT FFI
View shmem-ffi.lua
local ffi = require("ffi")
typedef size_t off_t;
void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
int munmap(void *addr, size_t length);
local MAP_SHARED = 1
local MAP_ANONYMOUS = 32
You can’t perform that action at this time.