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 DataConverters.java
package net.minecraft.server;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Iterator;
View FairNaturalSpawns.java
package co.aikar.fairnaturalspawns;
import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
View diff.diff
commit d2742ea527a35a1969de2613764dfcff7738f210
Author: Aikar <aikar@aikar.co>
Date: Mon Mar 18 01:37:42 2019 -0400
Update Lombok and add delombok to javadocs
diff --git a/Empire/pom.xml b/Empire/pom.xml
index 22e65e883..e0c2ad827 100644
--- a/Empire/pom.xml
+++ b/Empire/pom.xml
View OpenedPackage.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.systems.packages;
import co.aikar.idb.DbRow;
View pom.xml
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.4.0</version>
<executions>
<execution>
<id>delombok</id>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
View pom.xml
<!--
~ Copyright (c) 2016. Starlis LLC / dba Empire Minecraft
~
~ This source code is proprietary software and must not be redistributed without Starlis LLC's approval
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
View ShapelessRecipes.java
// Paper start
java.util.List<ItemStack> providedItems = new java.util.ArrayList<>();
co.aikar.util.Counter<ItemStack> matchedProvided = new co.aikar.util.Counter<>();
co.aikar.util.Counter<RecipeItemStack> matchedIngredients = new co.aikar.util.Counter<>();
// Paper end
for (int j = 0; j < iinventory.n(); ++j) {
for (int k = 0; k < iinventory.U_(); ++k) {
ItemStack itemstack = iinventory.getItem(k + j * iinventory.U_());
if (!itemstack.isEmpty()) {
View timings.patch
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
index a7f1f44d..7b0325d2 100644
--- a/src/main/java/co/aikar/timings/TimingIdentifier.java
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
@@ -24,12 +24,13 @@
package co.aikar.timings;
import co.aikar.util.LoadingMap;
-import co.aikar.util.MRUMapCache;
View SomePlugin.java
package co.aikar.someplugin;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
@aikar
aikar / ChunkStateFix.patch
Last active Feb 16, 2019
Fixes the dupe exploit caused by chunks being oversized more than the RegionFile format can support. Patch is licensed under MIT or Public Domain. Anyone (hopefully Mojang) is free to use it.
View ChunkStateFix.patch
commit ba4afed44f76c2d0b8ba63439ecc28b6c2212d05
Author: Aikar <aikar@aikar.co>
Date: Fri Feb 15 01:08:19 2019 -0500
Allow Saving of Oversized Chunks
The Minecraft World Region File format has a hard cap of 1MB per chunk.
This is due to the fact that the header of the file format only allocates
a single byte for sector count, meaning a maximum of 256 sectors, at 4k per sector.
You can’t perform that action at this time.