This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Vec3.h" | |
float Vec3::lengthSquared() const { | |
return x * x + y * y + z * z; | |
} | |
float Vec3::length() const { | |
return sqrtf(lengthSquared()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add all of these to build.gradle (the one in your app directory, NOT the root of the project) | |
// to see all files and be able to add your jni directory, you might need to change the view from 'Android' to 'Project' in the file browser | |
// this goes inside android > defaultConfig (probably after all the other fields eg. versionCode etc) | |
sourceSets.main { | |
jniLibs.srcDir 'src/main/libs' | |
jni.srcDirs = []; | |
} | |
// these two go at the end of the 'android' block (but still inside it) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// however you're adding blocks | |
initBlocks hook { | |
// create & register a MyBlock instance etc | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string> | |
class Level; | |
class Mob; | |
class TileSource; | |
class Vec3; | |
class Vec2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "TextureUVCoordinateSet.h" | |
class TickingTexture { | |
public: | |
// this is the complete struct | |
// void** vtable; | |
// this seems like it determines the area of the atlas to be animated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Recipes.h" | |
... | |
/* Any existing recipes function. Try hooking ToolRecipes::addRecipes(Recipes*), etc. */ | |
void addSomeRecipes(Recipes* recipes) { | |
... | |
std::vector<Recipes::Type> ingredients; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// this goes in minecraftpe/recipes/ !!! | |
#include <vector> | |
#include <string> | |
#include "minecraftpe/item/ItemInstance.h" | |
class Recipe; |