Instantly share code, notes, and snippets.

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 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) {
View PotionOfDragonsBreath.java
/*
* Copyright (c) 2018. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.items.boss;
import com.empireminecraft.features.items.CustomLingeringSplashPotionItem;
View EntityEvents.java
/*
* Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package com.empireminecraft.util;
import com.empireminecraft.EmpirePlugin;