Skip to content

Instantly share code, notes, and snippets.

View leonardosnt's full-sized avatar
:shipit:
I may be slow to respond.

Leonardo Santos leonardosnt

:shipit:
I may be slow to respond.
View GitHub Profile
searge,name,side,desc
func_100011_g,getIsPotionDurationMax,0,
func_100012_b,setPotionDurationMax,0,Toggle the isPotionDurationMax field.
func_100015_a,isKeyDown,0,Returns whether the specified key binding is currently being pressed.
func_104002_bU,isNoDespawnRequired,2,
func_104055_i,setForceGamemode,1,
func_104056_am,getForceGamemode,2,
func_104112_b,saveExtraData,2,"Save extra data not associated with any Chunk. Not saved during autosave, only during world unload. Currently unimplemented."
func_104140_m,saveChunkData,2,saves chunk data - currently only called during execution of the Save All command
func_110121_a,isNullOrEmpty,0,
~r~ = Red
~b~ = Blue
~g~ = Green
~y~ = Yellow
~p~ = Purple
~o~ = Orange
~c~ = Grey?
~m~ = Darker Grey
~u~ = Black
~n~ = New Line
prop_a4_pile_01
prop_a4_sheet_01
prop_a4_sheet_02
prop_a4_sheet_03
prop_a4_sheet_04
prop_a4_sheet_05
prop_abat_roller_static
prop_abat_slide
prop_acc_guitar_01
prop_acc_guitar_01_d1
// imports ...
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder;
import net.minecraft.server.v1_8_R3.WorldBorder;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
CraftPlayer cp = (CraftPlayer) p;
WorldBorder w = new WorldBorder();
w.setSize(1);
/**
* MIT License
*
* Copyright (c) 2018 leonardosnt <leonrdsnt@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@leonardosnt
leonardosnt / marshal_list.go
Created January 11, 2018 22:19
Marshal container/list golang
func MarshalList(list *list.List) ([]byte, error) {
buffer := bytes.NewBufferString("[")
for el := list.Front(); el != nil; el = el.Next() {
marshalled, err := json.Marshal(el.Value)
if err != nil {
return nil, err
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
// Gambiarra feita pra bloquear o botão do meu mouse que estava bugado...
// Alguns creditos para: https://github.com/rvknth043/Global-Low-Level-Key-Board-And-Mouse-Hook/blob/master/GlobalLowLevelHooks/MouseHook.cs
namespace MouseHook {
internal class Program {
using System;
using System.Linq;
using System.Text;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
using Mono.Collections.Generic;
// 23/07/2016 leonardosnt
namespace ConsoleApplication2 {
ItemStack dummy = new ItemStack(Material.AIR);
Iterable<String> split = Splitter.on(',').trimResults().omitEmptyStrings().split("276:2, 10, §3Sei la, DAMAGE_ALL:5, FIRE_ASPECT:2");
Spliterator<String> it = split.spliterator();
/* Id e data */
it.tryAdvance(raw -> {
String[] rawSpl = raw.split(":"); // 0 = id, 1 = data
dummy.setTypeId(Integer.parseInt(rawSpl[0]));
dummy.getData().setData(Byte.parseByte(rawSpl[1]));
var fs = require('fs');
var http = require('http');
/*
// get file names
var names = [];
$('.table > tbody > tr').each((idx, el) => {
var tdtxt = $(el).find('td')[0].innerText;
if (tdtxt.indexOf("api") > -1 || tdtxt.indexOf("src") > -1 || tdtxt.indexOf("latest") > -1) return;