添加第三人称Pose
This commit is contained in:
parent
026f5d7a9e
commit
9e1523d6be
33 changed files with 141 additions and 82 deletions
|
@ -141,7 +141,7 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
float numR = (float) (1 - 0.9 * data.getDouble("zoom_time"));
|
float numR = (float) (1 - 0.9 * data.getDouble("zoom_time"));
|
||||||
float numP = (float) (1 - 0.98 * data.getDouble("zoom_time"));
|
float numP = (float) (1 - 0.98 * data.getDouble("zoom_time"));
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0 || stack.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
||||||
main.setRotX(numR * main.getRotX());
|
main.setRotX(numR * main.getRotX());
|
||||||
main.setRotY(numR * main.getRotY());
|
main.setRotY(numR * main.getRotY());
|
||||||
main.setRotZ(numR * main.getRotZ());
|
main.setRotZ(numR * main.getRotZ());
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -66,8 +67,8 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,9 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.RarityTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -65,8 +67,8 @@ public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -67,8 +68,8 @@ public class Abekiri extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -61,8 +62,8 @@ public class Devotion extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -61,8 +62,8 @@ public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -66,8 +67,8 @@ public class HuntingRifle extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -61,8 +62,8 @@ public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -61,8 +62,8 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,8 @@ public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,8 +63,8 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,8 +62,8 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,8 +63,8 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,11 +85,10 @@ public class Minigun extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
|
||||||
private static final HumanoidModel.ArmPose MinigunPose = HumanoidModel.ArmPose.create("Minigun", false, (model, entity, arm) -> {
|
private static final HumanoidModel.ArmPose MinigunPose = HumanoidModel.ArmPose.create("Minigun", false, (model, entity, arm) -> {
|
||||||
if (arm != HumanoidArm.LEFT) {
|
if (arm != HumanoidArm.LEFT) {
|
||||||
model.rightArm.xRot = -0.2F + model.head.xRot;
|
model.rightArm.xRot = -22.5f * Mth.DEG_TO_RAD + model.head.xRot;
|
||||||
model.rightArm.yRot = -0.2F;
|
model.rightArm.yRot = -10f * Mth.DEG_TO_RAD;
|
||||||
model.leftArm.xRot = -1F + model.head.xRot;
|
model.leftArm.xRot = -45f * Mth.DEG_TO_RAD + model.head.xRot;
|
||||||
model.leftArm.yRot = 1F;
|
model.leftArm.yRot = 40f * Mth.DEG_TO_RAD;
|
||||||
model.leftArm.zRot = -0.5F;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -17,7 +18,6 @@ import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffect;
|
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
@ -62,8 +62,8 @@ public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,8 @@ public class Ntw20 extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@ public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -61,8 +62,8 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,8 +110,8 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.reload_normal"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.reload_normal"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("sentinel_charge_time") < 127 && stack.getOrCreateTag().getDouble("sentinel_charge_time") > 0 && stack.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
if (stack.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.charge"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.charge"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -66,8 +67,8 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -61,8 +62,8 @@ public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,10 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.EnchantmentCategoryTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.ItemNBTTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.client.player.LocalPlayer;
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
@ -89,8 +92,8 @@ public class Taser extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,9 @@ import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||||
import net.mcreator.superbwarfare.tools.*;
|
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.RarityTool;
|
||||||
|
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.model.HumanoidModel;
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
|
@ -72,8 +74,8 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,8 +62,8 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
return GunsTool.pose(entityLiving, hand, stack);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package net.mcreator.superbwarfare.network.message;
|
||||||
import net.mcreator.superbwarfare.init.ModItems;
|
import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModSounds;
|
import net.mcreator.superbwarfare.init.ModSounds;
|
||||||
import net.mcreator.superbwarfare.init.ModTags;
|
import net.mcreator.superbwarfare.init.ModTags;
|
||||||
import net.mcreator.superbwarfare.network.ModVariables;
|
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
|
@ -97,11 +96,9 @@ public class FireModeMessage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var capability = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables());
|
|
||||||
|
|
||||||
if (mainHandItem.getItem() == ModItems.SENTINEL.get()
|
if (mainHandItem.getItem() == ModItems.SENTINEL.get()
|
||||||
&& !player.isSpectator()
|
&& !player.isSpectator()
|
||||||
&& !capability.zooming
|
|
||||||
&& !(player.getCooldowns().isOnCooldown(mainHandItem.getItem()))
|
&& !(player.getCooldowns().isOnCooldown(mainHandItem.getItem()))
|
||||||
&& mainHandItem.getOrCreateTag().getInt("gun_reloading_time") == 0
|
&& mainHandItem.getOrCreateTag().getInt("gun_reloading_time") == 0
|
||||||
&& !mainHandItem.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
&& !mainHandItem.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class ReloadMessage {
|
||||||
|
|
||||||
if (!player.isSpectator()
|
if (!player.isSpectator()
|
||||||
&& stack.is(ModTags.Items.GUN)
|
&& stack.is(ModTags.Items.GUN)
|
||||||
// && !capability.zooming
|
&& !stack.getOrCreateTag().getBoolean("sentinel_is_charging")
|
||||||
&& !stack.getOrCreateTag().getBoolean("charging")
|
|
||||||
&& !(player.getCooldowns().isOnCooldown(stack.getItem()))
|
&& !(player.getCooldowns().isOnCooldown(stack.getItem()))
|
||||||
&& stack.getOrCreateTag().getInt("gun_reloading_time") == 0
|
&& stack.getOrCreateTag().getInt("gun_reloading_time") == 0
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -4,10 +4,15 @@ import com.google.gson.stream.JsonReader;
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.network.ModVariables;
|
import net.mcreator.superbwarfare.network.ModVariables;
|
||||||
import net.mcreator.superbwarfare.network.message.GunsDataMessage;
|
import net.mcreator.superbwarfare.network.message.GunsDataMessage;
|
||||||
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.server.packs.resources.ResourceManager;
|
import net.minecraft.server.packs.resources.ResourceManager;
|
||||||
|
import net.minecraft.util.Mth;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.HumanoidArm;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -137,4 +142,46 @@ public class GunsTool {
|
||||||
tag.putBoolean("is_normal_reloading", false);
|
tag.putBoolean("is_normal_reloading", false);
|
||||||
tag.putBoolean("is_empty_reloading", false);
|
tag.putBoolean("is_empty_reloading", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HumanoidModel.ArmPose pose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
|
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")
|
||||||
|
|| stack.getOrCreateTag().getBoolean("is_normal_reloading")
|
||||||
|
|| stack.getOrCreateTag().getBoolean("reloading")
|
||||||
|
|| stack.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
||||||
|
return ReloadPose;
|
||||||
|
} else if (entityLiving.isSprinting() && entityLiving.onGround() && entityLiving.getPersistentData().getDouble("noRun") == 0) {
|
||||||
|
if (entityLiving.hasEffect(MobEffects.MOVEMENT_SPEED)) {
|
||||||
|
return TacticalSprintPose;
|
||||||
|
} else {
|
||||||
|
return SprintPose;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return HumanoidModel.ArmPose.BOW_AND_ARROW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final HumanoidModel.ArmPose ReloadPose = HumanoidModel.ArmPose.create("ReloadPose", false, (model, entity, arm) -> {
|
||||||
|
if (arm == HumanoidArm.RIGHT) {
|
||||||
|
model.rightArm.xRot = -45F * Mth.DEG_TO_RAD;
|
||||||
|
model.rightArm.yRot = model.head.yRot - 22.5F * Mth.DEG_TO_RAD;
|
||||||
|
model.leftArm.xRot = -60F * Mth.DEG_TO_RAD;
|
||||||
|
model.leftArm.yRot = model.head.yRot + 22.5F * Mth.DEG_TO_RAD;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
private static final HumanoidModel.ArmPose SprintPose = HumanoidModel.ArmPose.create("SprintPose", false, (model, entity, arm) -> {
|
||||||
|
if (arm == HumanoidArm.RIGHT) {
|
||||||
|
model.rightArm.xRot = -45F * Mth.DEG_TO_RAD;
|
||||||
|
model.rightArm.yRot = model.head.yRot - 50F * Mth.DEG_TO_RAD;
|
||||||
|
model.leftArm.xRot = -45F * Mth.DEG_TO_RAD;
|
||||||
|
model.leftArm.yRot = model.head.yRot + 22.5F * Mth.DEG_TO_RAD;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
private static final HumanoidModel.ArmPose TacticalSprintPose = HumanoidModel.ArmPose.create("TacticalSprintPose", false, (model, entity, arm) -> {
|
||||||
|
if (arm == HumanoidArm.RIGHT) {
|
||||||
|
model.rightArm.xRot = 0.2f * model.rightArm.xRot -155F * Mth.DEG_TO_RAD;
|
||||||
|
model.rightArm.zRot = -5F * Mth.DEG_TO_RAD;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -674,7 +674,7 @@
|
||||||
"gui_light": "front",
|
"gui_light": "front",
|
||||||
"display": {
|
"display": {
|
||||||
"thirdperson_righthand": {
|
"thirdperson_righthand": {
|
||||||
"rotation": [75, -9, 0],
|
"rotation": [67.5, -10, 0],
|
||||||
"translation": [0.25, 3.5, -0.25],
|
"translation": [0.25, 3.5, -0.25],
|
||||||
"scale": [0.7, 0.7, 0.7]
|
"scale": [0.7, 0.7, 0.7]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue