Skip to content

Instantly share code, notes, and snippets.

View Frontrider's full-sized avatar

Frontrider

  • Deutsche Telekom AG@telekom
  • Somewhere, far away
View GitHub Profile
@Frontrider
Frontrider / body.gd
Created March 18, 2023 01:13
Godot 4 FPS controller
extends RigidBody3D
@export var speed:float = 10.0
@export var jump_force = 5.0
@onready var camera:Camera3D = $Camera3D
@onready var ground_sensor:RayCast3D = $GroundSensor
func _ready():
pass
@Frontrider
Frontrider / autotiler.gd
Created June 28, 2021 15:23 — forked from jules-goose/autotiler.gd
a proof of concept (and limited in functionality) gridmap autotiler for godot
tool
extends GridMap
#based on https://gamedevelopment.tutsplus.com/tutorials/how-to-use-tile-bitmasking-to-auto-tile-your-level-layouts--cms-25673 tutorial
# and using a 47 tile meshlibrary like this one : https://imgur.com/yuprM0n
var tilebitmask = { "254": 45, "90": 22, "22": 7, "0": 47, "10": 3, "2": 1, "94": 24, "120": 29, "11": 4, "208": 34, "107": 28, "82": 19, "216": 37, "86": 20, "223": 41, "214": 36, "104": 26, "222": 40, "74": 16, "18": 6, "8": 2, "248": 42, "255": 46, "127": 33, "123": 31, "66": 14, "16": 5, "219": 39, "75": 17, "80": 18, "122": 30, "30": 11, "126": 32, "31": 12, "250": 43, "88": 21, "64": 13, "95": 25, "251": 44, "91": 23, "24": 8, "27": 10, "218": 38, "72": 15, "106": 27, "26": 9, "210": 35 }
var bitmask = [
[1,2,4],
use gdnative::*;
use gdnative::Node;
use NativeClass;
/// The HelloWorld "class"
#[derive(NativeClass)]
#[inherit(Node)]
pub struct Test;
// __One__ `impl` block can have the `#[methods]` attribute, which will generate
[11:09:53] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[11:09:54] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[11:09:54] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[11:09:55] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[11:09:55] [Server-Worker-2/INFO]: Preparing spawn area: 1%
[11:09:56] [Server-Worker-2/INFO]: Preparing spawn area: 1%
[11:09:56] [Server-Worker-1/INFO]: Preparing spawn area: 2%
[11:09:57] [Server-Worker-3/INFO]: Preparing spawn area: 2%
[11:09:57] [Server-Worker-3/INFO]: Preparing spawn area: 3%
[11:09:58] [Server-Worker-3/INFO]: Preparing spawn area: 3%
Function api registration command reference:
blockplacement all all all <name> <value>
blockplacement all all left <name> <value>
blockplacement all all lower <name> <value>
blockplacement all all right <name> <value>
blockplacement all all upper <name> <value>
blockplacement all down all <name> <value>
blockplacement all down left <name> <value>
blockplacement all down lower <name> <value>
blockplacement all down right <name> <value>
@Frontrider
Frontrider / Git.java
Created December 2, 2019 16:27 — forked from Crydust/Git.java
run git commands from java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
[20:25:31] [main/INFO]: Loading for game Minecraft 1.14.4
[20:25:31] [main/INFO]: Fabric is preparing JARs on first launch, this may take a few seconds...
[20:25:41] [main/WARN]: Warnings were found!
- Conflicting versions found for fabric-resource-loader-v0: used 0.1.3+591e97ae42, also found 0.1.3+b02deb0042
[20:25:41] [main/INFO]: [FabricLoader] Loading 35 mods: minecraft@1.14.4, fabric-renderer-api-v1@0.1.1+591e97ae42, fabric-networking-blockentity-v0@0.2.0+c877038942, fabric-keybindings-v0@0.1.1+591e97ae42, modmenu@1.7.14.1.14.4+build.126, fabricloader@0.7.1+build.173, fabric-renderer-indigo@0.1.13+591e97ae42, fabric-containers-v0@0.1.2+591e97ae42, fabric-dimensions-v1@0.1.0+369ab22e42, fabric-biomes-v1@0.1.0+591e97ae42, fabric-crash-report-info-v1@0.1.1+591e97ae42, fabric-events-interaction-v0@0.1.1+591e97ae42, fabric-api-base@0.1.1+2ac73e7242, functionapi_common_scripting@1.0.0-SNAPSHOT, fabric-rendering-v0@0.1.1+591e97ae42, fabric-rendering-data-attachment-v1@0.1.1+c877038942, fabric-resource-loader-
@Frontrider
Frontrider / command.java
Last active October 28, 2019 18:39
crash-report.txt
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.command.arguments.*;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.text.LiteralText;
public class InventoryCommand {
---- Minecraft Crash Report ----
// Quite honestly, I wouldn't worry myself about that.
Time: 9/22/19 9:55 AM
Description: Loading entity NBT
java.lang.AbstractMethodError: net.minecraft.server.network.ServerPlayerEntity.getServer()Lnet/minecraft/server/MinecraftServer;
at net.minecraft.server.network.ServerPlayerEntity.readCustomDataFromTag(ServerPlayerEntity.java:228)
at net.minecraft.entity.Entity.fromTag(Entity.java:1583)
at net.minecraft.server.PlayerManager.loadPlayerData(PlayerManager.java:296)
/**
* Allows for any block to be farmland, if it's tagged correctly.
*/
@Mixin(CropBlock.class)
public abstract class CropBlockMixin {
@Inject(method = "Lnet/minecraft/block/CropBlock;canPlantOnTop(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z",
at = @At("HEAD"))