This file contains 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
/// Call the given lua function in the prelude table with the given arguments. | |
pub fn call_fn(interpreter: &mut Lua, | |
fn_to_call: &str, | |
args: Vec<AnyLuaValue>) | |
-> Result<Option<AnyLuaValue>, LuaError> { | |
let mut prelude_table: LuaTable<_> = interpreter | |
.get("prelude") | |
.expect("The prelude_table wasn't found. Was \ | |
the prelude properly loaded?"); | |
prelude_table.set("fn_to_call", fn_to_call); |
This file contains 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
//! Example of graph-based neural network thing. | |
use std::collections::HashMap; | |
use std::ops::Deref; | |
use std::rc::Rc; | |
struct NodeNeuralNetwork { | |
// The nodes and connections are a Vec so that you can access them randomly during the mutation phase. | |
nodes: Vec<Box<Node>>, | |
connections: Vec<Connection>, |
This file contains 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
var mf = require('mineflayer'); | |
var rp = require('mineflayer-radar')(mf); | |
var c = require('./config.js'); | |
var d = require('discord.js'); | |
var h = require('humanize'); | |
b = mf.createBot({ | |
host: c.host, | |
port: c.port, | |
username: c.username, |
This file contains 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
dungeons: | |
testdungeon: | |
type: DecayDungeon | |
spawnX: 2 | |
spawnY: 2 | |
spawnZ: 2 | |
exitX: 0 | |
exitY: 128 | |
exitZ: 0 | |
maxX: 100 |
This file contains 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
portals: | |
testdungeon1: | |
type: BlockInteract | |
entryOrExit: entry | |
rightclick: true | |
leftclick: false | |
cancelEvent: true | |
material: LEVER | |
x1: 0 | |
y1: 32 |
This file contains 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
dungeons: | |
exampledungeon: | |
spawnX: 10 | |
spawnY: 16 | |
spawnZ: 43 | |
# Other options omitted |
This file contains 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
dungeons: | |
reallyquitebigdungeon: | |
# You probably shouldn't have this large of a dungeon, since it will take a long time to generate the first time around. | |
# Also if it's a DecayDungeon it'll take even longer, since each time the server starts every single block has to be | |
# copied over from the template, which tends to be slow for large dungeons. | |
maxX: 150 | |
maxY: 200 | |
maxZ: 59 |