Skip to content

Instantly share code, notes, and snippets.

:atom:
Powered by 5 Hour Energy

Daniel Ennis aikar

:atom:
Powered by 5 Hour Energy
Block or report user

Report or block aikar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SpongeCommandContexts.java
/*
* Copyright (c) 2016-2017 Daniel Ennis (Aikar) - MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
View prunegit
#!/bin/bash
pwd=`pwd`
for dir in $(find . -type d -name ".git" | sed 's/\/.git//g'); do
cd "$pwd/$dir"
git reflog expire --expire-unreachable=3d
git gc --prune=5d
git gc --aggressive
git prune
done
View checkout-pr
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "$0 <prID>"
exit 1;
fi
repo=$(git remote get-url origin | sed -E 's/(.*@)?github.com(:|\/)//g' | sed 's/.git$//g')
data=$(curl -q https://api.github.com/repos/$repo/pulls/$1 2>/dev/null)
url=$(echo -e "$data" | grep --color=none ssh_url | head -n 1 |awk '{print $2}' | sed 's/"//g' | sed 's/,//g')
ref=$(echo -e "$data" | grep --color=none '"head":' -A 3 | grep ref | head -n 1 |awk '{print $2}' | sed 's/"//g' | sed 's/,//g')
prevbranch=$(\git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
View diff.patch
commit a825b5c4138e5b3a048b045d6fe65400c1900ae7
Author: Aikar <aikar@aikar.co>
Date: Wed Oct 31 20:44:51 2018 -0400
x
diff --git a/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java b/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
index e589aa356c..a796af2921 100644
--- a/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
+++ b/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
View merge.diff
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b766e00d0b..1af92ed007 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -569,4 +569,10 @@ public class PaperWorldConfig {
private void preventMovingIntoUnloadedChunks() {
preventMovingIntoUnloadedChunks = getBoolean("settings.prevent-moving-into-unloaded-chunks", false);
}
+
+ public double mergeEntityMovement = 0.075D;
View move.patch
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b766e00d0b..2042b9bd71 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -569,4 +569,10 @@ public class PaperWorldConfig {
private void preventMovingIntoUnloadedChunks() {
preventMovingIntoUnloadedChunks = getBoolean("settings.prevent-moving-into-unloaded-chunks", false);
}
+
+ public double optimizeEntityMovement = 0.5D;
View move.patch
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b766e00d0b..2042b9bd71 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -569,4 +569,10 @@ public class PaperWorldConfig {
private void preventMovingIntoUnloadedChunks() {
preventMovingIntoUnloadedChunks = getBoolean("settings.prevent-moving-into-unloaded-chunks", false);
}
+
+ public double optimizeEntityMovement = 0.5D;
View ChunkMap.java
package net.minecraft.server;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
private static final Logger a = LogManager.getLogger();
View checkout-pr.sh
#!/bin/bash
if [ -z "$1" ]; then
echo "$0 <prID>"
exit 1;
fi
repo=$(git remote get-url origin | sed -E 's/github.com(:|\/)//g')
data=$(curl -q https://api.github.com/repos/$repo/pulls/$1 2>/dev/null)
url=$(echo -e "$data" | grep --color=none ssh_url | head -n 1 |awk '{print $2}' | sed 's/"//g' | sed 's/,//g')
ref=$(echo -e "$data" | grep --color=none '"head":' -A 3 | grep ref | head -n 1 |awk '{print $2}' | sed 's/"//g' | sed 's/,//g')
prevbranch=$(\git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
View MC-134115.patch
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 33f5aa721f..ca5cd62866 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -521,6 +521,26 @@ public class Chunk implements IChunkAccess {
return this.a(blockposition, iblockdata, flag, true);
}
+ // Paper start
+ public void setTypeDirect(BlockPosition blockposition, IBlockData iblockdata) {
You can’t perform that action at this time.