Update
This commit is contained in:
parent
0d4b50dc98
commit
54a89aa757
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx1G
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.21.1
|
minecraft_version=1.21.3
|
||||||
yarn_mappings=1.21.1+build.3
|
yarn_mappings=1.21.3+build.2
|
||||||
loader_version=0.16.0
|
loader_version=0.16.9
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.1.1
|
mod_version=1.1.2
|
||||||
maven_group=systems.brn
|
maven_group=systems.brn
|
||||||
archives_base_name=Wise_Elytra
|
archives_base_name=Wise_Elytra
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -5,8 +5,8 @@ import net.minecraft.component.type.FireworksComponent;
|
|||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.FireworkRocketItem;
|
import net.minecraft.item.FireworkRocketItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.TypedActionResult;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@ -17,13 +17,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
public class FireworkUseMixin {
|
public class FireworkUseMixin {
|
||||||
|
|
||||||
@Inject(method = "use", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "use", at = @At("HEAD"), cancellable = true)
|
||||||
private void onUse(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<TypedActionResult<ItemStack>> cir) {
|
private void onUse(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<ActionResult> cir) {
|
||||||
ItemStack stack = user.getStackInHand(hand);
|
ItemStack stack = user.getStackInHand(hand);
|
||||||
|
|
||||||
// Check if the firework rocket contains a firework star and if
|
// Check if the firework rocket contains a firework star and if
|
||||||
FireworksComponent fireworksComponent = stack.get(DataComponentTypes.FIREWORKS);
|
FireworksComponent fireworksComponent = stack.get(DataComponentTypes.FIREWORKS);
|
||||||
if (fireworksComponent != null && (fireworksComponent.explosions().isEmpty() != user.isFallFlying())) {
|
if (fireworksComponent != null && (fireworksComponent.explosions().isEmpty() != user.isGliding())) {
|
||||||
cir.setReturnValue(TypedActionResult.fail(stack));
|
cir.setReturnValue(ActionResult.FAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user