We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on https://github.com/MedicalJewel105/bedrock-render-offsets-generator/blob/main/main.py work. We can improve RenderOffsetsComponent that is not accurate with vanilla actually.
<?php declare(strict_types=1); namespace customiesdevs\customies\item\component; final class RenderOffsetsComponent implements ItemComponent { //thanks to https://github.com/MedicalJewel105/bedrock-render-offsets-generator/blob/main/main.py private int $textureSize; public function __construct(int $textureSize) { $this->textureSize = $textureSize; } public function getName(): string { return "minecraft:render_offsets"; } public function getValue(): array { $textureSize = $this->textureSize; $mainHand_fp = round(0.039 * 16 / $textureSize, 8); $offhand_fp = round(0.065 * 16 / $textureSize, 8); $mainHand_tp = $offhand_tp = round(0.0965 * 16 / $textureSize, 8); return [ "main_hand" => [ "first_person" => [ "scale" => [$mainHand_fp, $mainHand_fp, $mainHand_fp], ], "third_person" => [ "scale" => [$mainHand_tp, $mainHand_tp, $mainHand_tp] ] ], "off_hand" => [ "first_person" => [ "scale" => [$offhand_fp, $offhand_fp, $offhand_fp], ], "third_person" => [ "scale" => [$offhand_tp, $offhand_tp, $offhand_tp] ] ] ]; } public function isProperty(): bool { return false; } }
The text was updated successfully, but these errors were encountered:
The final values should be divided by 2
$perspectives = [ "first_person" => [ "scale" => [$horizontal / 2, $vertical / 2, $horizontal / 2] ], "third_person" => [ "scale" => [$horizontal , $vertical , $horizontal] ] ]
Sorry, something went wrong.
The final values should be divided by 2 $perspectives = [ "first_person" => [ "scale" => [$horizontal / 2, $vertical / 2, $horizontal / 2] ], "third_person" => [ "scale" => [$horizontal , $vertical , $horizontal] ] ]
Why ? based on ?
Successfully merging a pull request may close this issue.
Based on https://github.com/MedicalJewel105/bedrock-render-offsets-generator/blob/main/main.py work. We can improve RenderOffsetsComponent that is not accurate with vanilla actually.
The text was updated successfully, but these errors were encountered: