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
Camera renderInfo = Minecraft.getInstance().gameRenderer.getMainCamera(); | |
stack.pushPose(); | |
Vec3 pos = Vec3.atCenterOf(new BlockPos(0, 140, 0)); // Replace with position to render at | |
stack.translate(-renderInfo.getPosition().x + pos.x, | |
-renderInfo.getPosition().y + pos.y, | |
-renderInfo.getPosition().z + pos.z); | |
stack.mulPose(Minecraft.getInstance().getEntityRenderDispatcher().cameraOrientation()); | |
stack.mulPose(Vector3f.YP.rotationDegrees(180)); | |
// Should be held in a field somewhere instead of creating every render |
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
[19:26:36] [main/INFO]: ModLauncher running: args [--username, hammy275, --version, neoforge-20.2.86, --gameDir, C:\Users\hammy3502\AppData\Roaming\.minecraft\VRDev1.20.2NeoForge, --assetsDir, C:\Users\hammy3502\AppData\Roaming\.minecraft\assets, --assetIndex, 8, --uuid, 372b6c1f2aa84f06a886232445e51202, --accessToken, ????????, --clientId, ZGU4NDg4YTItMjdjMy00ODk2LTk0NGItMjQzY2NkMmE3OGU1, --xuid, 2535429026199994, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\hammy3502\AppData\Roaming\.minecraft\quickPlay\java\1705883194604.json, --fml.neoForgeVersion, 20.2.86, --fml.fmlVersion, 1.0.16, --fml.mcVersion, 1.20.2, --fml.neoFormVersion, 20231019.002635, --launchTarget, forgeclient] | |
[19:26:36] [main/INFO]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 11 arch amd64 version 10.0 | |
[19:26:36] [main/INFO]: Loading ImmediateWindowProvider fmlearlywindow | |
[19:26:36] [main/INFO]: Trying GL version 4.6 | |
[19:26:36] [main/INFO]: Requested GL version 4.6 got |
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
[20:10:08] [main/INFO]: ModLauncher running: args [--username, hammy275, --version, neoforge-20.2.86, --gameDir, C:\Users\hammy3502\AppData\Roaming\.minecraft\VRDev1.20.2NeoForge, --assetsDir, C:\Users\hammy3502\AppData\Roaming\.minecraft\assets, --assetIndex, 8, --uuid, 372b6c1f2aa84f06a886232445e51202, --accessToken, ????????, --clientId, ZGU4NDg4YTItMjdjMy00ODk2LTk0NGItMjQzY2NkMmE3OGU1, --xuid, 2535429026199994, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\hammy3502\AppData\Roaming\.minecraft\quickPlay\java\1705885806505.json, --fml.neoForgeVersion, 20.2.86, --fml.fmlVersion, 1.0.16, --fml.mcVersion, 1.20.2, --fml.neoFormVersion, 20231019.002635, --launchTarget, forgeclient] | |
[20:10:08] [main/INFO]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 11 arch amd64 version 10.0 | |
[20:10:08] [main/INFO]: Loading ImmediateWindowProvider fmlearlywindow | |
[20:10:08] [main/INFO]: Trying GL version 4.6 | |
[20:10:08] [main/INFO]: Requested GL version 4.6 got |
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
@ModifyVariable(method = "renderArmWithItem(Lnet/minecraft/client/player/AbstractClientPlayer;FFLnet/minecraft/world/InteractionHand;FLnet/minecraft/world/item/ItemStack;FLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V", | |
at = @At("HEAD"), index = 6, ordinal = 0, argsOnly = true) | |
private ItemStack overwriteItemStack(ItemStack stack, AbstractClientPlayer player, float f, float g, InteractionHand hand) { | |
// Your code here. You can check the hand to see what hand we're currently rendering, and the ItemStack returned from | |
// this function is what will be used in rendering (you can return the provided stack to just render the item that was | |
// going to be rendered anyways). | |
} |