重做夕雾花动画
This commit is contained in:
parent
7094e0d832
commit
4f86e8b84c
6 changed files with 499 additions and 389 deletions
|
@ -14,7 +14,7 @@ def getGitCommitHash() {
|
|||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
version = '0.1.0-SNAPSHOT-' + getGitCommitHash()
|
||||
version = '0.1.1-SNAPSHOT-' + getGitCommitHash()
|
||||
group = 'com.Atsushio.target'
|
||||
archivesBaseName = 'target'
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import net.mcreator.target.item.gun.Trachelium;
|
|||
import net.mcreator.target.network.TargetModVariables;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
|
@ -53,11 +54,11 @@ public class TracheliumItemModel extends GeoModel<Trachelium> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
shen.setPosX(-0.4f * (float) (fp + 2 * fr));
|
||||
shen.setPosY(0.4f * (float) (fp + 2 * fr));
|
||||
shen.setPosX(-0.4f * (float) (fp + 0.2 * fr));
|
||||
shen.setPosY(0.6f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(4.2f * (float) (1.3 * fp + 0.54f * fr));
|
||||
shen.setRotX(0.125f * (float) (1.28f * fp + fr));
|
||||
shen.setRotY(0.15f * (float) fr);
|
||||
shen.setRotX(0.18f * (float) (1.28f * fp + fr));
|
||||
shen.setRotY(0.12f * (float) fr);
|
||||
shen.setRotZ(-0.1f * (float) (fp + 1.3 * fr));
|
||||
|
||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||
|
@ -118,5 +119,12 @@ public class TracheliumItemModel extends GeoModel<Trachelium> {
|
|||
|
||||
move.setRotY(1.9f * (float) yaw - 1.7f * (float) m);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_y", Mth.RAD_TO_DEG * camera.getRotY());
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_z", Mth.RAD_TO_DEG * camera.getRotZ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
|||
itemTag.putDouble("reload_time", 0);
|
||||
}
|
||||
if (itemTag.getBoolean("reloading")) {
|
||||
if (itemTag.getDouble("reload_time") == 57) {
|
||||
if (itemTag.getDouble("reload_time") == 62) {
|
||||
entity.getPersistentData().putDouble("id", id);
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, TargetModSounds.TRACHELIUM_RELOAD.get(), 100, 1);
|
||||
|
|
|
@ -35,7 +35,7 @@ public class PlayerReloadProcedure {
|
|||
tag.putBoolean("reloading", true);
|
||||
tag.putDouble("empty_reload", 1);
|
||||
tag.putDouble("id", (Mth.nextDouble(RandomSource.create(), 1, 1919810)));
|
||||
tag.putDouble("reload_time", 57);
|
||||
tag.putDouble("reload_time", 62);
|
||||
}
|
||||
if (player.getMainHandItem().getItem() == TargetModItems.HUNTING_RIFLE.get()
|
||||
&& !(player.getCooldowns().isOnCooldown(player.getMainHandItem().getItem()))
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,6 +11,10 @@
|
|||
"visible_bounds_offset": [0, 0, 0]
|
||||
},
|
||||
"bones": [
|
||||
{
|
||||
"name": "camera",
|
||||
"pivot": [2.57141, 4.76276, 12.27702]
|
||||
},
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0, 0, 0]
|
||||
|
|
Loading…
Add table
Reference in a new issue