Skip to content

Instantly share code, notes, and snippets.

View MWHunter's full-sized avatar

DefineOutside MWHunter

View GitHub Profile
package me.rrs.headdrop.listener;
import me.rrs.lib.boostedyaml.*;
import me.rrs.headdrop.*;
import org.bukkit.event.entity.*;
import me.rrs.headdrop.hook.*;
import java.util.concurrent.*;
import me.clip.placeholderapi.*;
import org.bukkit.enchantments.*;
import me.rrs.headdrop.util.*;
protected void executeRidersJump(float p_251967_, Vec3 p_275627_) {
double d0 = this.getAttributeValue(Attributes.JUMP_STRENGTH) * (double)this.getBlockJumpFactor() + (double)this.getJumpBoostPower();
this.addDeltaMovement(this.getLookAngle().multiply(1.0D, 0.0D, 1.0D).normalize().scale((double)(22.2222F * p_251967_) * this.getAttributeValue(Attributes.MOVEMENT_SPEED) * (double)this.getBlockSpeedFactor()).add(0.0D, (double)(1.4285F * p_251967_) * d0, 0.0D));
this.dashCooldown = 55;
this.setDashing(true);
this.hasImpulse = true;
}
private double wrappingPositiveModulo(double value, double min, double max) {
double moduloBy = max - min;
boolean isEven = ((int) Math.floor(value / moduloBy) & 1) == 0;
double modulo = value % moduloBy;
if (modulo < 0) modulo += moduloBy;
if (!isEven) {
modulo = moduloBy - modulo;
[21:52:23 ERROR]: [org.bukkit.craftbukkit.v1_18_R2.CraftServer] Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "ac.grim.grimac.shaded.io.github.retrooper.packetevents.injector.PaperChannelInjector.HAS_LISTENER_METHOD" is null initializing GrimAC v2.2.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "ac.grim.grimac.shaded.io.github.retrooper.packetevents.injector.PaperChannelInjector.HAS_LISTENER_METHOD" is null
at ac.grim.grimac.shaded.io.github.retrooper.packetevents.injector.PaperChannelInjector.isServerBound(PaperChannelInjector.java:57) ~[grim.jar:?]
at ac.grim.grimac.shaded.io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder$1.load(SpigotPacketEventsBuilder.java:108) ~[grim.jar:?]
at ac.grim.grimac.manager.init.load.PacketEventsInit.start(PacketEventsInit.java:16) ~[grim.jar:?]
at ac.grim.grimac.manager.InitManager.load(InitManager.java:38) ~[grim
[22:33:52 WARN]: [ViaBackwards] You have min/max set to -64/384
[22:33:59 WARN]: java.lang.reflect.InvocationTargetException
[22:33:59 WARN]: at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
[22:33:59 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:33:59 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:33:59 WARN]: at grimac-2.1.2-all.jar//ac.grim.grimac.shaded.io.github.retrooper.packetevents.util.viaversion.CustomPipelineUtil.callDecode(CustomPipelineUtil.java:79)
[22:33:59 WARN]: at grimac-2.1.2-all.jar//ac.grim.grimac.shaded.io.github.retrooper.packetevents.injector.latest.handlers.PacketDecoderLatest.decode(PacketDecoderLatest.java:118)
[22:33:59 WARN]: at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
[22:33:59 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
[22:29:57 WARN]: java.lang.reflect.InvocationTargetException
[22:29:57 WARN]: at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
[22:29:57 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:29:57 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:29:57 WARN]: at grimac-2.1.2-all.jar//ac.grim.grimac.shaded.io.github.retrooper.packetevents.util.viaversion.CustomPipelineUtil.callDecode(CustomPipelineUtil.java:79)
[22:29:57 WARN]: at grimac-2.1.2-all.jar//ac.grim.grimac.shaded.io.github.retrooper.packetevents.injector.latest.handlers.PacketDecoderLatest.decode(PacketDecoderLatest.java:118)
[22:29:57 WARN]: at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
[22:29:57 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:29:57 WARN]: at java.base/java.lang.reflect.Me
[22:25:10 WARN]: [ViaBackwards] You have min/max set to -64/384
[22:25:18 WARN]: java.lang.reflect.InvocationTargetException
[22:25:18 WARN]: at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
[22:25:18 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:25:18 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:25:18 WARN]: at grimac-2.1.2-all.jar//ac.grim.grimac.shaded.io.github.retrooper.packetevents.util.viaversion.CustomPipelineUtil.callDecode(CustomPipelineUtil.java:79)
[22:25:18 WARN]: at grimac-2.1.2-all.jar//ac.grim.grimac.shaded.io.github.retrooper.packetevents.injector.latest.handlers.PacketDecoderLatest.decode(PacketDecoderLatest.java:118)
[22:25:18 WARN]: at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
[22:25:18 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
package me.defineoutside.tntspleef;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
Patch 1 to 38: Airplane/Puffer patches
Patch 39: Commands, no performance changes
Patch 40: Reduces ticking of passive mob AI, skips mob AI if the server is lagging.
Patch 41: Reduces ticking of collisions
Patch 42: Stolen without credit from an old and unstable airplane patch
@MWHunter
MWHunter / gist:431886bcb09f73d1768e10f491d7cf2c
Created December 31, 2021 17:50
PacketEvents ItemTypes rewrite with the help of Python
f = open("code")
lines = f.readlines();
computed = ""
for l in lines:
index = l.index(" = ");
preDefine = l[33: index];
postDefine = l[index : ];
postDefine = postDefine.replace("\n", "");