diff --git a/src/client/java/net/kelsoncraft/test/KelsonCraftTestClient.java b/src/client/java/net/kelsoncraft/test/KelsonCraftTestClient.java index c915a37..92c59eb 100644 --- a/src/client/java/net/kelsoncraft/test/KelsonCraftTestClient.java +++ b/src/client/java/net/kelsoncraft/test/KelsonCraftTestClient.java @@ -32,23 +32,25 @@ public class KelsonCraftTestClient implements ClientModInitializer { // Code below came from https://www.reddit.com/r/fabricmc/comments/qyt3jg/comment/hls4vep/ // This works, but it doesn't show the lightning strike. + // I forgot I set this up, I have disabled it for now. I would like to have a command /lightning with an alias to /smite. + // This runs whenever a player right clicks with the ruby, which is set in the if statement - UseItemCallback.EVENT.register((player, world, unused) ->{ - ItemStack mainHandItem = player.getMainHandStack(); // Get the item the player is holding in their main hand. - if(player.getMainHandStack().getName().equals(Text.translatable("item.kelsoncraft-test.ruby")) && !player.isSpectator()){ // Check if item is a ruby, and if the player is not in spectator mode. - LightningEntity lightning = new LightningEntity(EntityType.LIGHTNING_BOLT, world); // Create the lightning bolt. - world.spawnEntity(lightning); // Spawn the lightning entity - - //player.set - // This is how to get the player position - Vec3d playerPos = player.getPos(); - //player.sendMessage(Text.of("Your coords are X: " + playerPos.x + " Y: " + playerPos.y + " Z: " + playerPos.z)); - - // This might be a way to make the lightning render in, I'm not sure how to use the EntityRendererFactory.Context() - //LightningEntityRenderer lightning1 = new LightningEntityRenderer(new EntityRendererFactory.Context()); - } - return TypedActionResult.success(mainHandItem, true); // Return success and swing hand to show item use. - }); +// UseItemCallback.EVENT.register((player, world, unused) ->{ +// ItemStack mainHandItem = player.getMainHandStack(); // Get the item the player is holding in their main hand. +// if(player.getMainHandStack().getName().equals(Text.translatable("item.kelsoncraft-test.ruby")) && !player.isSpectator()){ // Check if item is a ruby, and if the player is not in spectator mode. +// LightningEntity lightning = new LightningEntity(EntityType.LIGHTNING_BOLT, world); // Create the lightning bolt. +// world.spawnEntity(lightning); // Spawn the lightning entity +// +// //player.set +// // This is how to get the player position +// Vec3d playerPos = player.getPos(); +// //player.sendMessage(Text.of("Your coords are X: " + playerPos.x + " Y: " + playerPos.y + " Z: " + playerPos.z)); +// +// // This might be a way to make the lightning render in, I'm not sure how to use the EntityRendererFactory.Context() +// //LightningEntityRenderer lightning1 = new LightningEntityRenderer(new EntityRendererFactory.Context()); +// } +// return TypedActionResult.success(mainHandItem, true); // Return success and swing hand to show item use. +// }); // This entrypoint is suitable for setting up client-specific logic, such as rendering. } } \ No newline at end of file diff --git a/src/main/java/net/kelsoncraft/test/KelsonCraftTest.java b/src/main/java/net/kelsoncraft/test/KelsonCraftTest.java index 71d4c4b..1c2696c 100644 --- a/src/main/java/net/kelsoncraft/test/KelsonCraftTest.java +++ b/src/main/java/net/kelsoncraft/test/KelsonCraftTest.java @@ -15,6 +15,14 @@ import static net.minecraft.server.command.CommandManager.*; // Todo Possibly hook into other mods and find some library mods to mess around with. // Link for library mods: https://github.com/Siphalor/awesome-fabric +// Todo Try to use Disguise Lib for disguises +// Link: https://github.com/NucleoidMC/DisguiseLib + +// Todo Look into Grand Economy once it updates to 1.20 +// https://www.curseforge.com/minecraft/mc-mods/grand-economy + +// Todo Try to setup /skull command that gives the players their head, idea from item/SkullItem + public class KelsonCraftTest implements ModInitializer { // Todo Change name of project to something else