remove firework boosting
This commit is contained in:
parent
6c4802b899
commit
54d4d203b3
4 changed files with 28 additions and 16 deletions
|
@ -3,7 +3,7 @@
|
||||||
"package": "eu.e99.boringsmp.mixin",
|
"package": "eu.e99.boringsmp.mixin",
|
||||||
"compatibilityLevel": "JAVA_21",
|
"compatibilityLevel": "JAVA_21",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"ExampleMixin"
|
"FireworkRocketItemMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|
|
@ -2,6 +2,7 @@ package eu.e99.boringsmp;
|
||||||
|
|
||||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||||
|
|
||||||
|
import net.minecraft.item.FireworkRocketItem;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package eu.e99.boringsmp.mixin;
|
|
||||||
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
@Mixin(MinecraftServer.class)
|
|
||||||
public class ExampleMixin {
|
|
||||||
@Inject(at = @At("HEAD"), method = "loadWorld")
|
|
||||||
private void init(CallbackInfo info) {
|
|
||||||
// This code is injected into the start of MinecraftServer.loadWorld()V
|
|
||||||
}
|
|
||||||
}
|
|
26
src/eu/e99/boringsmp/mixin/FireworkRocketItemMixin.java
Normal file
26
src/eu/e99/boringsmp/mixin/FireworkRocketItemMixin.java
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
package eu.e99.boringsmp.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.FireworkRocketItem;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Overwrite;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(FireworkRocketItem.class)
|
||||||
|
public class FireworkRocketItemMixin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 1e99
|
||||||
|
* @reason To remove firework elytra boosting
|
||||||
|
*/
|
||||||
|
@Overwrite
|
||||||
|
public ActionResult use(World world, PlayerEntity user, Hand hand) {
|
||||||
|
return ActionResult.PASS;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue