This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClientsideItem extends ClientsideEntity { | |
private final ClientsideHologram hitbox; | |
private final List<PacketContainer> packets = new ArrayList<>(); | |
public ClientsideItem(Location location, ItemStack item) { | |
hitbox = new ClientsideHologram(location, "", true); | |
setup(item, location); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.illusion.test; | |
import com.comphenix.protocol.reflect.accessors.Accessors; | |
import com.comphenix.protocol.reflect.accessors.ConstructorAccessor; | |
import com.comphenix.protocol.utility.MinecraftReflection; | |
import com.comphenix.protocol.wrappers.WrappedBlockData; | |
import com.comphenix.protocol.wrappers.WrappedChatComponent; | |
import com.comphenix.protocol.wrappers.WrappedDataWatcher; | |
import com.comphenix.protocol.wrappers.WrappedWatchableObject; | |
import org.bukkit.inventory.ItemStack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ported from Exerosis' kotlin example | |
public class KnockbackUtil { | |
private static final double FRICTION = 1.0; | |
private static final double HORIZONTAL = 0.40; | |
private static final double VERTICAL = 0.36075; | |
private static final double EXTRA_VERTICAL = 0.1; | |
private static final double EXTRA_HORIZONTAL = 1.5; | |
public static Vector getKnockback(Location entityLoc, Entity attacker) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🌞 Morning 18 commits ██▊░░░░░░░░░░░░░░░░░░ 13.2% | |
🌆 Daytime 27 commits ████▏░░░░░░░░░░░░░░░░ 19.9% | |
🌃 Evening 49 commits ███████▌░░░░░░░░░░░░░ 36.0% | |
🌙 Night 42 commits ██████▍░░░░░░░░░░░░░░ 30.9% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.comphenix.protocol.reflect.accessors.Accessors; | |
import com.comphenix.protocol.reflect.accessors.ConstructorAccessor; | |
import com.comphenix.protocol.utility.MinecraftReflection; | |
import com.comphenix.protocol.wrappers.WrappedBlockData; | |
import com.comphenix.protocol.wrappers.WrappedChatComponent; | |
import com.comphenix.protocol.wrappers.WrappedDataWatcher; | |
import com.comphenix.protocol.wrappers.WrappedWatchableObject; | |
import org.bukkit.inventory.ItemStack; | |
import java.util.HashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum BodyPart { | |
RIGHT_LEG, | |
LEFT_LEG, | |
HEAD, | |
BODY; | |
public static BodyPart rayTrace(RayTraceResult result) { | |
Entity entity = result.getHitEntity(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EditSession but made to cache packets | |
public class CachedEditSession { | |
private final Location origin; | |
private final Location offset; | |
private final FakeBlockTracker tracker; | |
private final Map<Vector, BlockData> cachedData = new ConcurrentHashMap<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.util.Comparator; | |
/** | |
* The basic euclidean comparator is a simple comparator that compares two colors | |
* based on their euclidean distance. | |
* | |
* @author Illusion | |
*/ | |
public class BasicEuclideanComparator implements Comparator<Color> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Reflect { | |
private Reflect() { | |
} | |
public static <T> ReflectedClass<T> aClass(Class<T> clazz) { | |
return new ReflectedClass<>(clazz); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.UUID; | |
import java.util.concurrent.CompletableFuture; | |
public interface BlockStorage<T extends WorldBlock> extends Storage { | |
CompletableFuture<List<T>> fetchChunkData(UUID worldId, Long chunkId); | |
CompletableFuture<Void> insertData(UUID worldId, Long chunkId, T data); | |
CompletableFuture<Void> deleteChunkData(UUID worldId, Long chunkId); |
OlderNewer