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
import java.net.URI | |
import java.net.http.HttpClient | |
import java.net.http.HttpRequest | |
import java.net.http.HttpResponse | |
import java.time.Duration | |
val client = HttpClient.newBuilder() | |
// force http1.1 | |
.version(HttpClient.Version.HTTP_1_1) | |
.followRedirects(HttpClient.Redirect.NORMAL) |
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
/// <reference types="minecraft-scripting-types-server" /> | |
import NoTnt from './notnt'; | |
const system = server.registerSystem(0, 0); | |
NoTnt.init(system); |
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
import 'package:flutter/material.dart'; | |
extension on List { | |
Object lastOrNull() { | |
return this.isNotEmpty ? this.last : null; | |
} | |
} | |
typedef ItemWidgetBuilder = Widget Function(Object item); | |
typedef FutureItemsCallback = Future<List<Object>> Function(Object lastLoadedItem); |
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
//Super early preview of a parsing script for Minecraft Bedrock edition | |
//Just edit "const sources = [...]" to create a mod with no JavaScript knowledge required | |
//of course you need to know the syntax for sources (see the description for this gist) | |
//comments, questions, tweet me @tombailey64 on twitter | |
const clientSystem = client.registerSystem(0, 0); | |
class Controller { | |
constructor() { | |
this.eventNameToHandler = { |