generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
118 additions
and
40 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
### Changes since previous: | ||
|
||
**[]** | ||
- [text here] | ||
|
||
|
||
**Known issues**No | ||
### Known issues |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# Done to increase the memory available to gradle. | ||
org.gradle.jvmargs=-Xmx1G | ||
org.gradle.jvmargs=-Xmx2G | ||
|
||
# Fabric Properties | ||
# check these on https://fabricmc.net/versions.html | ||
minecraft_version = 1.20.1 | ||
yarn_mappings = 1.20.1+build.10 | ||
loader_version = 0.15.3 | ||
minecraft_version = 1.20.4 | ||
yarn_mappings = 1.20.4+build.3 | ||
loader_version = 0.15.6 | ||
|
||
# Fabric api | ||
fabric_version = 0.91.0+1.20.1 | ||
fabric_version = 0.95.1+1.20.4 | ||
|
||
# Mod Properties | ||
mod_version = 4.4.0+1.20.1 | ||
mod_version = 4.5.0+1.20.4 | ||
maven_group = me.av306 | ||
archives_base_name = xenon | ||
|
||
# Complete Config | ||
complete_config_version = 2.5.1 | ||
complete_config_version = 2.5.3 | ||
|
||
# SLF4J | ||
slf4j_version = 2.0.7 | ||
|
||
# GSON version | ||
gson_version = 2.10.1 | ||
#gson_version = 2.10.1 | ||
|
||
mixin.debug.export = true |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package me.av306.xenon.mixin; | ||
|
||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
import me.av306.xenon.Xenon; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.item.BowItem; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.Hand; | ||
import net.minecraft.util.TypedActionResult; | ||
import net.minecraft.world.World; | ||
|
||
@Mixin( BowItem.class ) | ||
public class BowItemMixin | ||
{ | ||
@Inject( | ||
at = @At( "HEAD" ), | ||
method = "use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;", | ||
cancellable = true | ||
) | ||
private void onUse( World world, PlayerEntity plater, Hand hand, CallbackInfoReturnable<TypedActionResult> cir ) | ||
{ | ||
Xenon.INSTANCE.sendInfoMessage( "Bow use" ); | ||
} | ||
|
||
@Inject( | ||
at = @At( "HEAD" ), | ||
method = "onStoppedUsing(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V", | ||
cancellable = true | ||
) | ||
private void onStoppedUsing( ItemStack stack, World world, LivingEntity entity, int remainingUseTicks, CallbackInfo ci ) | ||
{ | ||
Xenon.INSTANCE.sendInfoMessage( "Bow stop use" ); | ||
} | ||
} |