based on mineflayer's api right now (0.0.19), and the existence of mineflayer-navigate, helper bot should be able to resurrect:
- chat commands
- navigator 3d
- task manager
- aliases
- chat printer
- connection notice
- console
- death notice
based on mineflayer's api right now (0.0.19), and the existence of mineflayer-navigate, helper bot should be able to resurrect:
commands = { | |
'dig': { | |
handlers: [ | |
{ | |
handler: someFunction, | |
minArgs: 0, | |
maxArgs: Infinity, | |
}, | |
{ | |
handler: anotherFunction, |
def flip_y(y): | |
"""Small hack to convert normal coordinates to pygame coordinates""" | |
return -y+GAME_WINDOW_HEIGHT |
git tag -a Tag_Name 0123456 -m 'MessageHere' |
find [Path] | grep -i <file name> | |
# Path defaults to the current directory. | |
# Using -i for case-insensitive searching. | |
# Using -E will do regex parsing. |
import os, sys | |
with open("classes_and_grades.txt") as classes_and_grades: | |
for line in classes_and_grades: | |
data = line.split("\t") | |
fixed = [] | |
for item in data: | |
stripped = item.strip() | |
if stripped: | |
fixed.append(stripped) |
// - DiffuseColor - Returns the Diffuse color for the specified material and light | |
Vector DiffuseColor(Vector materialDiffuse, SceneLight light, Vector normal, Vector lightv) | |
{ | |
float distance = lightv.Magnitude(); | |
float distanceTerm = 1.0f / (light.attenuationConstant + light.attenuationLinear * distance + light.attenuationQuadratic * distance * distance); | |
return materialDiffuse * light.color * (normal.Dot(lightv)) * distanceTerm; | |
} |
Camera camera = m_Scene.m_Camera; | |
Vector cameraPosition = camera.GetPosition(); | |
// Camera Coordinates directions | |
Vector negZ = (camera.GetTarget() - cameraPosition).Normalize(); | |
Vector posY = camera.GetUp().Normalize(); | |
Vector posX = negZ.Cross(posY).Normalize(); | |
float FOV = camera.GetFOV(); | |
float nearZ = camera.GetNearClip(); |
void printType(string type) { | |
if (typeOf[type].length()) { | |
return; | |
} | |
vector<string> matches; | |
for (int i = 0; i < symbols.size(); i++) { | |
string base = getBaseType(symbols[i]); | |
if (base.compare(type) == 0 && symbols[i].compare(type)) { // symbols[i]'s base is type, but isn't actually type |