Skip to content

Instantly share code, notes, and snippets.

View astei's full-sized avatar

Andrew Steinborn astei

View GitHub Profile
@astei
astei / message.md
Last active November 12, 2021 09:39
Regarding my recent absence/disinterest in Minecraft

Here for the Velocity 3.0.1 release announcement? It's over here.

What's going on?

This year has been a wild ride for me. In February, I got a job with Branch. To say that the pressure has never been higher than ever is quite the understatement. To put it bluntly, this is not for the faint of heart. With the increase in workload at work, it has left me with ever less time to focus on Minecraft.

In addition, most of my projects have been one-man shows, with me being the principal driving force. Velocity alone as of this writing has 25,441 lines of code, with much of it written by me. But with increasing time pressure on me, along with not being adequately compensated for the free time I am able to put into Velocity, I have been forced to re-evaluate my priorities.

Where does that leave Velocity?

/*
* Configurate
* Copyright (C) zml and Configurate contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
From 06233f3598074f1287db92610b96bb5b88b21c4c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Mar 2019 21:58:55 -0400
Subject: [PATCH] Backport Server Tick Events
Fires event at start and end of a server tick
---
.../event/server/ServerTickEndEvent.java | 56 +++++++++++++++++++
.../event/server/ServerTickStartEvent.java | 29 ++++++++++
2 files changed, 85 insertions(+)
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 11/25/19 7:04 PM
Description: keyPressed event handler
java.lang.StringIndexOutOfBoundsException: String index out of range: 10
at java.lang.String.substring(String.java:1963)
at com.mojang.brigadier.suggestion.Suggestion.apply(Suggestion.java:44)
at dbl$a.b(SourceFile:581)
package us.myles.ViaVersion.bukkit.handlers;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.bukkit.util.NMSUtil;
import us.myles.ViaVersion.exception.CancelException;
package com.velocitypowered.proxy.protocol.util;
import com.google.common.io.ByteArrayDataInput;
import io.netty.buffer.ByteBuf;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.IOException;
/**
* A wrapper around {@link io.netty.buffer.ByteBuf} that implements the exception-free
Creeper
Good man
Then we go back to the mine
Turn our cockroaches aside
On the other hand
This task is exhausting
I hope to find some diamonds tonight.
Diamond tonight
func getFlags(desiredHeap int64) string {
asKb := desiredHeap / units.KiB
// the following is specific to OpenJ9 and is based on Aikar's flags:
// https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
// The equivalent of -XX:G1NewSizePercent/-XX:G1MaxNewSizePercent in OpenJ9's gencon policy is -Xmns/-Xmnx.
// We have to manually compute these values ourselves. By default, the gencon policy assumes 25% of Xms, which is
// simply not sufficient for Minecraft (and Aikar can tell you).
xmns := asKb / 2
/**
* A linked list implementation.
*
* Iteration is done by deferencing the head (or tail) of the list.
* Insertions at the front or back of the list will be O(1) (which
* is the only insertion operation supported), iteration is O(n),
* and removal is O(n) (unless the node being removed is the head or
* tail, which is O(1)).
*
* This implementation is a doubly-linked list. It is not thread safe.
@astei
astei / velocity.toml
Created July 27, 2018 15:50
Proposed Velocity configuration
# This is Velocity's default configuration.
# What port should the proxy be bound to? By default, we'll bind to all addresses on port 25577.
bind = "0.0.0.0:25577"
# What should be the MOTD? Legacy color codes and JSON are accepted.
motd = "&3A Velocity Server"
# What should we display for the maximum number of players? (Velocity does not support a cap
# on the number of players online.)