优化瞄准流程,简化伤害类型(移除箭类伤害类型)
This commit is contained in:
parent
a826f45ab8
commit
6745d17a44
76 changed files with 237 additions and 414 deletions
|
@ -100,7 +100,7 @@ public class JumpPadBlock extends Block {
|
|||
// 禁止套娃
|
||||
if (entity instanceof TargetEntity || entity instanceof ICannonEntity) return;
|
||||
|
||||
boolean zooming = entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).map(c -> c.zooming).orElse(false);
|
||||
boolean zooming = entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).map(c -> c.zoom).orElse(false);
|
||||
|
||||
if (entity.isShiftKeyDown()) {
|
||||
if (entity.onGround()) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.mcreator.superbwarfare.init.ModItems;
|
|||
import net.mcreator.superbwarfare.init.ModMobEffects;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.network.message.*;
|
||||
import net.mcreator.superbwarfare.tools.TraceTool;
|
||||
|
@ -78,7 +79,7 @@ public class ClickHandler {
|
|||
event.setCanceled(true);
|
||||
ModUtils.PACKET_HANDLER.sendToServer(new DroneFireMessage(0));
|
||||
}
|
||||
if (player.getVehicle() != null && player.getVehicle() instanceof ICannonEntity) {
|
||||
if (player.getVehicle() != null && player.getVehicle() instanceof ICannonEntity && player.getMainHandItem().getItem() instanceof CannonShellItem) {
|
||||
event.setCanceled(true);
|
||||
ModUtils.PACKET_HANDLER.sendToServer(new VehicleFireMessage(0));
|
||||
return;
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -60,7 +61,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
|||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -52,7 +53,7 @@ public class Aa12ItemModel extends GeoModel<Aa12Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.02f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(1.3f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -3,12 +3,12 @@ package net.mcreator.superbwarfare.client.model.item;
|
|||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.gun.special.BocekItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
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 org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -32,7 +32,6 @@ public class BocekItemModel extends GeoModel<BocekItem> {
|
|||
@Override
|
||||
public void setCustomAnimations(BocekItem animatable, long instanceId, AnimationState animationState) {
|
||||
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
|
||||
CoreGeoBone jian = getAnimationProcessor().getBone("jian");
|
||||
CoreGeoBone arrow = getAnimationProcessor().getBone("arrow");
|
||||
CoreGeoBone rh = getAnimationProcessor().getBone("ys");
|
||||
CoreGeoBone lun = getAnimationProcessor().getBone("hualun1");
|
||||
|
@ -89,13 +88,13 @@ public class BocekItemModel extends GeoModel<BocekItem> {
|
|||
r.setScaleZ(1f - (0.31f * (float) p));
|
||||
shen.setRotZ(60 * Mth.DEG_TO_RAD * (float) p + (float) (0.05f * zp) - 0.2f);
|
||||
|
||||
stack.getOrCreateTag().putBoolean("HoloHidden", !((shen_pos.getPosX() < -0.7 && gun.getPosZ() < -2.5)));
|
||||
stack.getOrCreateTag().putBoolean("HoloHidden", !((shen_pos.getPosX() < -0.7 && gun.getPosZ() < -2.6)));
|
||||
|
||||
|
||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
fire.setPosY(-0.01f * (float) (fp + 2 * fr));
|
||||
fire.setPosZ(3f * (float) (fp + 0.54f * fr));
|
||||
fire.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -78,7 +79,7 @@ public class DevotionItemModel extends GeoModel<DevotionItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.05f * (float) (fp + 2 * fr));
|
||||
holo.setPosY(-0.03f * (float) (fp + 2.3 * fr));
|
||||
shen.setPosZ(1.1f * (float) (fp + 0.54f * fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -57,7 +58,7 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.03f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(2.6f * (float) (fp + 0.84f * fr));
|
||||
shen.setRotY(0.05f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -65,7 +66,7 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.03f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(2.6f * (float) (fp + 0.84f * fr));
|
||||
shen.setRotY(0.05f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -55,7 +56,7 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -55,17 +55,10 @@ public class JavelinItemModel extends GeoModel<JavelinItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
shen.setPosY(0.07f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.02f * (float) (fp + fr));
|
||||
shen.setRotZ(0f);
|
||||
} else {
|
||||
shen.setPosY(0.28f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.8f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.17f * (float) (0.18f * fp + fr));
|
||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||
}
|
||||
shen.setPosY(0.28f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.8f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.17f * (float) (0.18f * fp + fr));
|
||||
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
|
||||
shen.setPosX((float)(0.75f * fr * (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||
|
||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -63,7 +64,7 @@ public class K98ItemModel extends GeoModel<K98Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.1f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(5.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.03f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -55,7 +56,7 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.03f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(2.6f * (float) (fp + 0.84f * fr));
|
||||
shen.setRotY(0.05f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -55,7 +56,7 @@ public class M4ItemModel extends GeoModel<M4Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.02f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -97,7 +98,7 @@ public class M60ItemModel extends GeoModel<M60Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -53,7 +54,7 @@ public class M79ItemModel extends GeoModel<M79Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.4f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.1f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -55,7 +56,7 @@ public class M870ItemModel extends GeoModel<M870Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.2f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(2.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.28f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -43,7 +44,7 @@ public class M98bItemModel extends GeoModel<M98bItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.4f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.18f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -71,7 +72,7 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.06f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(0.9f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.005f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -72,7 +73,7 @@ public class MosinNagantItemModel extends GeoModel<MosinNagantItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.07f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.02f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -50,7 +51,7 @@ public class Ntw20Model extends GeoModel<Ntw20Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.4f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.1f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -54,7 +55,7 @@ public class Qbz95ItemModel extends GeoModel<Qbz95Item> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -47,7 +48,7 @@ public class RpgItemModel extends GeoModel<RpgItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.02f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -70,7 +71,7 @@ public class RpkItemModel extends GeoModel<RpkItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(0.7f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -72,7 +73,7 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.4f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.12f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -66,7 +67,7 @@ public class SksItemModel extends GeoModel<SksItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.04f * (float) (fp + 2 * fr));
|
||||
holo.setPosY(-0.43f * (float) (fp + 2.3 * fr));
|
||||
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -75,7 +76,7 @@ public class SvdItemModel extends GeoModel<SvdItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.02f * (float) (fp + 2 * fr));
|
||||
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
|
||||
shen.setRotX(0.003f * (float) (fp + fr));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -71,7 +72,7 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
|||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
shen.setPosY(0.05f * (float) (fp + 2 * fr));
|
||||
holo.setPosY(-0.43f * (float) (fp + 2.3 * fr));
|
||||
shen.setPosZ(0.9f * (float) (fp + 0.54f * fr));
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.AK47Layer;
|
||||
import net.mcreator.superbwarfare.client.model.item.AK47ItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.rifle.AK47Item;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -101,7 +101,7 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.BocekLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.BocekItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.special.BocekItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -86,7 +86,7 @@ public class BocekItemRenderer extends GeoItemRenderer<BocekItem> {
|
|||
|
||||
if (name.equals("holo")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.DevotionLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.DevotionItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.machinegun.DevotionItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -101,7 +101,7 @@ public class DevotionItemRenderer extends GeoItemRenderer<DevotionItem> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.Hk416Layer;
|
||||
import net.mcreator.superbwarfare.client.model.item.Hk416ItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.rifle.Hk416Item;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -101,7 +101,7 @@ public class Hk416ItemRenderer extends GeoItemRenderer<Hk416Item> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.M98bLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.M98bItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.sniper.M98bItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -100,7 +100,7 @@ public class M98bItemRenderer extends GeoItemRenderer<M98bItem> {
|
|||
if (player != null) {
|
||||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
bone.setHidden((itemStack != null && itemStack.getOrCreateTag().getBoolean("HoloHidden")) || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden((itemStack != null && itemStack.getOrCreateTag().getBoolean("HoloHidden")) || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
|
||||
if (name.equals("qiang")) {
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.Mk14Layer;
|
||||
import net.mcreator.superbwarfare.client.model.item.Mk14ItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.rifle.Mk14Item;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -98,13 +98,13 @@ public class Mk14ItemRenderer extends GeoItemRenderer<Mk14Item> {
|
|||
|
||||
if (name.equals("rex")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (name.equals("jing") || name.equals("qiangguan")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.MosinNagantLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.MosinNagantItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.sniper.MosinNagantItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -97,7 +97,7 @@ public class MosinNagantItemRenderer extends GeoItemRenderer<MosinNagantItem> {
|
|||
|
||||
if (name.equals("rex")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.Ntw20Layer;
|
||||
import net.mcreator.superbwarfare.client.model.item.Ntw20Model;
|
||||
import net.mcreator.superbwarfare.item.gun.sniper.Ntw20Item;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -98,13 +98,13 @@ public class Ntw20Renderer extends GeoItemRenderer<Ntw20Item> {
|
|||
|
||||
if (name.equals("rex")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (name.equals("jing") || name.equals("action") || name.equals("body") || name.equals("base")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.Qbz95Layer;
|
||||
import net.mcreator.superbwarfare.client.model.item.Qbz95ItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.rifle.Qbz95Item;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -101,7 +101,7 @@ public class Qbz95ItemRenderer extends GeoItemRenderer<Qbz95Item> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.RpkLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.RpkItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.machinegun.RpkItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -101,7 +101,7 @@ public class RpkItemRenderer extends GeoItemRenderer<RpkItem> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.SentinelLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.SentinelItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.sniper.SentinelItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -19,6 +18,7 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -99,7 +99,7 @@ public class SentinelItemRenderer extends GeoItemRenderer<SentinelItem> {
|
|||
|
||||
if (name.equals("holo")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.SksLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.SksItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.rifle.SksItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -101,7 +101,7 @@ public class SksItemRenderer extends GeoItemRenderer<SksItem> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.SvdLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.SvdItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.sniper.SvdItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -98,23 +98,17 @@ public class SvdItemRenderer extends GeoItemRenderer<SvdItem> {
|
|||
|
||||
if (name.equals("holo")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
// if (name.equals("glass")) {
|
||||
// if (player_ != null) {
|
||||
// bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (name.equals("glass")) {
|
||||
bone.setHidden(true);
|
||||
}
|
||||
|
||||
if (name.equals("handguard")) {
|
||||
if (player_ != null) {
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && player_.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
|||
import net.mcreator.superbwarfare.client.layer.VectorLayer;
|
||||
import net.mcreator.superbwarfare.client.model.item.VectorItemModel;
|
||||
import net.mcreator.superbwarfare.item.gun.smg.VectorItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.AnimUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.PlayerModel;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemDisplayContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.cache.object.GeoBone;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
@ -85,7 +85,7 @@ public class VectorItemRenderer extends GeoItemRenderer<VectorItem> {
|
|||
itemStack = player.getMainHandItem();
|
||||
}
|
||||
if (player != null) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming);
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.minecraft.client.CameraType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Font;
|
||||
|
@ -20,6 +19,7 @@ import net.minecraftforge.event.TickEvent;
|
|||
import net.minecraftforge.eventbus.api.EventPriority;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import static net.mcreator.superbwarfare.tools.RenderTool.preciseBlit;
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class CrossHairOverlay {
|
|||
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
|
||||
if (shouldRenderCrossHair(player) || stack.is(ModItems.MINIGUN.get())) {
|
||||
if (shouldRenderCrossHair(player) || stack.is(ModItems.MINIGUN.get()) || (stack.is(ModItems.BOCEK.get()) && stack.getOrCreateTag().getBoolean("HoloHidden"))) {
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/point.png"), w / 2f - 7.5f, h / 2f - 8, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/rexheng.png"), w / 2f - 9.5f - 2.8f * (float) spread, h / 2f - 8, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/rexheng.png"), w / 2f - 6.5f + 2.8f * (float) spread, h / 2f - 8, 0, 0, 16, 16, 16, 16);
|
||||
|
@ -95,10 +95,10 @@ public class CrossHairOverlay {
|
|||
if (player == null) return false;
|
||||
|
||||
if (player.isSpectator()) return false;
|
||||
if (!player.getMainHandItem().is(ModTags.Items.GUN) || (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming)
|
||||
if (!player.getMainHandItem().is(ModTags.Items.GUN) || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS)
|
||||
return false;
|
||||
|
||||
return !(player.getMainHandItem().getItem() == ModItems.M_79.get())
|
||||
return !(player.getMainHandItem().getItem() == ModItems.M_79.get() || player.getMainHandItem().getItem() == ModItems.BOCEK.get())
|
||||
&& Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.mojang.blaze3d.platform.GlStateManager;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
|
@ -17,6 +16,7 @@ import net.minecraftforge.client.event.RenderGuiEvent;
|
|||
import net.minecraftforge.eventbus.api.EventPriority;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class JavelinHudOverlay {
|
||||
|
@ -31,7 +31,7 @@ public class JavelinHudOverlay {
|
|||
if (player != null) {
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
|
||||
if ((stack.getItem() == ModItems.JAVELIN.get() && !stack.getOrCreateTag().getBoolean("HoloHidden")) && Minecraft.getInstance().options.getCameraType().isFirstPerson() && (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if ((stack.getItem() == ModItems.JAVELIN.get() && !stack.getOrCreateTag().getBoolean("HoloHidden")) && Minecraft.getInstance().options.getCameraType().isFirstPerson() && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
RenderSystem.disableDepthTest();
|
||||
RenderSystem.depthMask(false);
|
||||
RenderSystem.enableBlend();
|
||||
|
|
|
@ -246,7 +246,7 @@ public class KillMessageOverlay {
|
|||
if (record.headshot) {
|
||||
icon = HEADSHOT;
|
||||
} else {
|
||||
if (DamageTypeTool.isArrowDamage(record.damageType) || DamageTypeTool.isGunDamage(record.damageType)) {
|
||||
if (DamageTypeTool.isGunDamage(record.damageType)) {
|
||||
icon = null;
|
||||
} else {
|
||||
// 如果是其他伤害,则渲染对应图标
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.entity.ICannonEntity;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.item.gun.GunItem;
|
||||
import net.minecraft.client.CameraType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
|
@ -16,6 +16,7 @@ import net.minecraftforge.client.event.RenderGuiEvent;
|
|||
import net.minecraftforge.eventbus.api.EventPriority;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class M79UIOverlay {
|
||||
|
@ -46,13 +47,15 @@ public class M79UIOverlay {
|
|||
return !player.isSpectator()
|
||||
&& player.getMainHandItem().getItem() == ModItems.M_79.get()
|
||||
&& (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON || (player.isPassenger() && player.getVehicle() instanceof ICannonEntity))
|
||||
&& !player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).map(c -> c.zooming).orElse(false);
|
||||
&& GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS;
|
||||
}
|
||||
|
||||
private static boolean shouldRenderCrossHair2(Player player) {
|
||||
if (player == null) return false;
|
||||
return !player.isSpectator()
|
||||
&& !(player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom
|
||||
&& player.isPassenger() && player.getVehicle() instanceof ICannonEntity;
|
||||
&& GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
||||
&& player.isPassenger()
|
||||
&& player.getVehicle() instanceof ICannonEntity
|
||||
&& !(player.getMainHandItem().getItem() instanceof GunItem);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.entity.ICannonEntity;
|
||||
import net.mcreator.superbwarfare.item.gun.GunItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.RenderTool;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
|
@ -16,6 +15,7 @@ import net.minecraftforge.client.event.RenderGuiEvent;
|
|||
import net.minecraftforge.eventbus.api.EventPriority;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class Mk42UIOverlay {
|
||||
|
@ -51,6 +51,6 @@ public class Mk42UIOverlay {
|
|||
return !player.isSpectator()
|
||||
&& !(player.getMainHandItem().getItem() instanceof GunItem)
|
||||
&& (player.getVehicle() != null && (player.getVehicle() instanceof ICannonEntity))
|
||||
&& (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom;
|
||||
&& GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package net.mcreator.superbwarfare.entity;
|
||||
|
||||
import net.mcreator.superbwarfare.entity.projectile.CannonShellEntity;
|
||||
import net.mcreator.superbwarfare.init.ModDamageTypes;
|
||||
import net.mcreator.superbwarfare.init.ModEntities;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.*;
|
||||
import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.CustomExplosion;
|
||||
|
@ -37,6 +34,7 @@ import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
|||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
import net.minecraftforge.network.PlayMessages;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import software.bernie.geckolib.animatable.GeoEntity;
|
||||
import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache;
|
||||
import software.bernie.geckolib.core.animation.AnimatableManager;
|
||||
|
@ -305,9 +303,13 @@ public class Mk42Entity extends PathfinderMob implements GeoEntity, ICannonEntit
|
|||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 dir) {
|
||||
Entity entity = this.getPassengers().isEmpty() ? null : this.getPassengers().get(0);
|
||||
if (this.isVehicle() && entity != null) {
|
||||
public void travel(@NotNull Vec3 dir) {
|
||||
Player entity = this.getPassengers().isEmpty() ? null : (Player) this.getPassengers().get(0);
|
||||
ItemStack stack = null;
|
||||
if (entity != null) {
|
||||
stack = entity.getMainHandItem();
|
||||
}
|
||||
if (stack != null && this.isVehicle() && !stack.is(ModTags.Items.GUN)) {
|
||||
float diffY = entity.getYHeadRot() - this.getYRot();
|
||||
float diffX = entity.getXRot() - this.getXRot();
|
||||
if (diffY > 180.0f) {
|
||||
|
@ -318,23 +320,18 @@ public class Mk42Entity extends PathfinderMob implements GeoEntity, ICannonEntit
|
|||
diffY = diffY * 0.15f;
|
||||
diffX = diffX * 0.15f;
|
||||
if (Math.abs(diffY) < 60f && Math.abs(diffX) < 60f) {
|
||||
this.setYRot(this.getYRot() + Mth.clamp(diffY,-1.75f,1.75f));
|
||||
this.setYRot(this.getYRot() + Mth.clamp(diffY, -1.75f, 1.75f));
|
||||
this.yRotO = this.getYRot();
|
||||
this.setXRot(Mth.clamp(this.getXRot() - 0.11f + Mth.clamp(diffX,-3f,3f), -85, 15));
|
||||
this.setXRot(Mth.clamp(this.getXRot() - 0.11f + Mth.clamp(diffX, -3f, 3f), -85, 15));
|
||||
this.setRot(this.getYRot(), this.getXRot());
|
||||
this.yBodyRot = this.getYRot() + Mth.clamp(diffY,-1.75f,1.75f);
|
||||
this.yHeadRot = this.getYRot() + Mth.clamp(diffY,-1.75f,1.75f);
|
||||
this.yBodyRot = this.getYRot() + Mth.clamp(diffY, -1.75f, 1.75f);
|
||||
this.yHeadRot = this.getYRot() + Mth.clamp(diffY, -1.75f, 1.75f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
super.travel(dir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityDimensions getDimensions(Pose p_33597_) {
|
||||
return super.getDimensions(p_33597_).scale((float) 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void aiStep() {
|
||||
super.aiStep();
|
||||
|
@ -345,11 +342,19 @@ public class Mk42Entity extends PathfinderMob implements GeoEntity, ICannonEntit
|
|||
}
|
||||
|
||||
protected void clampRotation(Entity entity) {
|
||||
float f = Mth.wrapDegrees(entity.getXRot());
|
||||
float f1 = Mth.clamp(f, -85.0F, 15.0F);
|
||||
entity.xRotO += f1 - f;
|
||||
entity.setXRot(entity.getXRot() + f1 - f);
|
||||
ItemStack stack = null;
|
||||
if (entity instanceof Player player) {
|
||||
stack = player.getMainHandItem();
|
||||
}
|
||||
|
||||
if (!stack.is(ModTags.Items.GUN)) {
|
||||
float f = Mth.wrapDegrees(entity.getXRot());
|
||||
float f1 = Mth.clamp(f, -85.0F, 15.0F);
|
||||
entity.xRotO += f1 - f;
|
||||
entity.setXRot(entity.getXRot() + f1 - f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPassengerTurned(Entity entity) {
|
||||
this.clampRotation(entity);
|
||||
|
|
|
@ -2,10 +2,7 @@ package net.mcreator.superbwarfare.entity;
|
|||
|
||||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.entity.projectile.CannonShellEntity;
|
||||
import net.mcreator.superbwarfare.init.ModDamageTypes;
|
||||
import net.mcreator.superbwarfare.init.ModEntities;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.*;
|
||||
import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.tools.CustomExplosion;
|
||||
|
@ -336,8 +333,12 @@ public class Mle1934Entity extends PathfinderMob implements GeoEntity, ICannonEn
|
|||
|
||||
@Override
|
||||
public void travel(Vec3 dir) {
|
||||
Entity entity = this.getPassengers().isEmpty() ? null : this.getPassengers().get(0);
|
||||
if (this.isVehicle() && entity != null) {
|
||||
Player entity = this.getPassengers().isEmpty() ? null : (Player) this.getPassengers().get(0);
|
||||
ItemStack stack = null;
|
||||
if (entity != null) {
|
||||
stack = entity.getMainHandItem();
|
||||
}
|
||||
if (stack != null && this.isVehicle() && !stack.is(ModTags.Items.GUN)) {
|
||||
float diffY = entity.getYHeadRot() - this.getYRot();
|
||||
float diffX = entity.getXRot() - this.getXRot();
|
||||
if (diffY > 180.0f) {
|
||||
|
@ -374,10 +375,17 @@ public class Mle1934Entity extends PathfinderMob implements GeoEntity, ICannonEn
|
|||
public static void init() {
|
||||
}
|
||||
protected void clampRotation(Entity entity) {
|
||||
float f = Mth.wrapDegrees(entity.getXRot());
|
||||
float f1 = Mth.clamp(f, -30.0F, 4.0F);
|
||||
entity.xRotO += f1 - f;
|
||||
entity.setXRot(entity.getXRot() + f1 - f);
|
||||
ItemStack stack = null;
|
||||
if (entity instanceof Player player) {
|
||||
stack = player.getMainHandItem();
|
||||
}
|
||||
|
||||
if (!stack.is(ModTags.Items.GUN)) {
|
||||
float f = Mth.wrapDegrees(entity.getXRot());
|
||||
float f1 = Mth.clamp(f, -30.0F, 4.0F);
|
||||
entity.xRotO += f1 - f;
|
||||
entity.setXRot(entity.getXRot() + f1 - f);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onPassengerTurned(Entity entity) {
|
||||
|
|
|
@ -26,7 +26,6 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.entity.projectile.ThrownPotion;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
@ -161,7 +160,7 @@ public class TargetEntity extends LivingEntity implements GeoEntity, AnimatedEnt
|
|||
player.addItem(new ItemStack(ModItems.TARGET_DEPLOYER.get()));
|
||||
}
|
||||
} else {
|
||||
if (!(player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (!(player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
this.lookAt(EntityAnchorArgument.Anchor.EYES, new Vec3((player.getX()), this.getY(), (player.getZ())));
|
||||
|
||||
this.setYRot(this.getYRot());
|
||||
|
@ -214,14 +213,14 @@ public class TargetEntity extends LivingEntity implements GeoEntity, AnimatedEnt
|
|||
protected void pushEntities() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AABB makeBoundingBox() {
|
||||
if (this.entityData.get(DOWN_TIME) > 0) {
|
||||
return super.makeBoundingBox().inflate(0, -0.85, 0).move(0, -0.85, 0);
|
||||
}
|
||||
|
||||
return super.makeBoundingBox();
|
||||
}
|
||||
// @Override
|
||||
// protected AABB makeBoundingBox() {
|
||||
// if (this.entityData.get(DOWN_TIME) > 0) {
|
||||
// return super.makeBoundingBox().inflate(0, -0.85, 0).move(0, -0.85, 0);
|
||||
// }
|
||||
//
|
||||
// return super.makeBoundingBox();
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setNoGravity(boolean ignored) {
|
||||
|
|
|
@ -3,10 +3,10 @@ package net.mcreator.superbwarfare.entity.model;
|
|||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.entity.projectile.ProjectileEntity;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||
import software.bernie.geckolib.core.animation.AnimationState;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
@ -24,7 +24,7 @@ public class ProjectileEntityModel extends GeoModel<ProjectileEntity> {
|
|||
return new ResourceLocation(ModUtils.MODID, "geo/projectile_entity2.geo.json");
|
||||
}
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS
|
||||
|| player.getMainHandItem().is(ModItems.GLOCK_17.get())
|
||||
|| player.getMainHandItem().is(ModItems.GLOCK_18.get())
|
||||
|| player.getMainHandItem().is(ModItems.BOCEK.get())) {
|
||||
|
|
|
@ -1,22 +1,11 @@
|
|||
package net.mcreator.superbwarfare.entity.projectile;
|
||||
|
||||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.headshot.BoundingBoxManager;
|
||||
import net.mcreator.superbwarfare.headshot.IHeadshotBox;
|
||||
import net.mcreator.superbwarfare.init.ModDamageTypes;
|
||||
import net.mcreator.superbwarfare.init.ModEntities;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.network.message.ClientIndicatorMessage;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.MobType;
|
||||
import net.minecraft.world.entity.monster.Monster;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.entity.projectile.ItemSupplier;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -24,26 +13,17 @@ import net.minecraft.world.item.Items;
|
|||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.BellBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.EntityHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
import net.minecraftforge.network.PacketDistributor;
|
||||
import net.minecraftforge.network.PlayMessages;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@OnlyIn(value = Dist.CLIENT, _interface = ItemSupplier.class)
|
||||
public class BocekArrowEntity extends AbstractArrow implements ItemSupplier {
|
||||
public static final ItemStack PROJECTILE_ITEM = new ItemStack(Items.ARROW);
|
||||
|
||||
private float monsterMultiplier = 0.0f;
|
||||
private float bypassArmorRate = 0.0f;
|
||||
private float undeadMultiplier = 1.0f;
|
||||
|
||||
public BocekArrowEntity(EntityType<? extends BocekArrowEntity> type, Level world) {
|
||||
super(type, world);
|
||||
}
|
||||
|
@ -56,19 +36,6 @@ public class BocekArrowEntity extends AbstractArrow implements ItemSupplier {
|
|||
super(ModEntities.BOCEK_ARROW.get(), world);
|
||||
}
|
||||
|
||||
public BocekArrowEntity bypassArmorRate(float bypassArmorRate) {
|
||||
this.bypassArmorRate = bypassArmorRate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setUndeadMultiplier(float undeadMultiplier) {
|
||||
this.undeadMultiplier = undeadMultiplier;
|
||||
}
|
||||
|
||||
public void setMonsterMultiplier(float monsterMultiplier) {
|
||||
this.monsterMultiplier = monsterMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet<ClientGamePacketListener> getAddEntityPacket() {
|
||||
return NetworkHooks.getEntitySpawningPacket(this);
|
||||
|
@ -103,83 +70,7 @@ public class BocekArrowEntity extends AbstractArrow implements ItemSupplier {
|
|||
|
||||
@Override
|
||||
protected void onHitEntity(EntityHitResult result) {
|
||||
float damageMultiplier = 1 + 0.4f * this.monsterMultiplier;
|
||||
|
||||
Entity entity = result.getEntity();
|
||||
if (this.getOwner() instanceof LivingEntity living) {
|
||||
if (!living.level().isClientSide() && living instanceof ServerPlayer player) {
|
||||
living.playSound(ModSounds.INDICATION.get());
|
||||
|
||||
ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> player), new ClientIndicatorMessage(0, 5));
|
||||
}
|
||||
}
|
||||
|
||||
float f = (float) this.getDeltaMovement().length();
|
||||
int i = Mth.ceil(Mth.clamp((double) f * this.getBaseDamage(), 0.0D, Integer.MAX_VALUE));
|
||||
|
||||
if (this.isCritArrow()) {
|
||||
long j = this.random.nextInt(i / 2 + 2);
|
||||
i = (int) Math.min(j + (long) i, 2147483647L);
|
||||
}
|
||||
|
||||
boolean headshot = false;
|
||||
|
||||
if (entity instanceof LivingEntity livingEntity) {
|
||||
livingEntity.invulnerableTime = 0;
|
||||
|
||||
AABB boundingBox = entity.getBoundingBox();
|
||||
Vec3 startVec = this.position();
|
||||
Vec3 endVec = startVec.add(this.getDeltaMovement());
|
||||
Vec3 hitPos = boundingBox.clip(startVec, endVec).orElse(null);
|
||||
|
||||
/* Check for headshot */
|
||||
IHeadshotBox<LivingEntity> headshotBox = (IHeadshotBox<LivingEntity>) BoundingBoxManager.getHeadshotBoxes(entity.getType());
|
||||
if (headshotBox != null) {
|
||||
AABB box = headshotBox.getHeadshotBox((LivingEntity) entity);
|
||||
if (box != null) {
|
||||
box = box.move(boundingBox.getCenter().x, boundingBox.minY, boundingBox.getCenter().z);
|
||||
Optional<Vec3> headshotHitPos = box.clip(startVec, endVec);
|
||||
if (headshotHitPos.isEmpty()) {
|
||||
box = box.inflate(0.2, 0.2, 0.2);
|
||||
headshotHitPos = box.clip(startVec, endVec);
|
||||
}
|
||||
if (headshotHitPos.isPresent() && (hitPos == null || headshotHitPos.get().distanceTo(hitPos) < 0.55)) {
|
||||
headshot = true;
|
||||
}
|
||||
if (headshot) {
|
||||
if (this.getOwner() instanceof LivingEntity living) {
|
||||
if (!living.level().isClientSide() && living instanceof ServerPlayer player) {
|
||||
living.playSound(ModSounds.HEADSHOT.get());
|
||||
|
||||
ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> player), new ClientIndicatorMessage(1, 5));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean hurt;
|
||||
if (entity instanceof Monster monster) {
|
||||
hurt = performHurt(entity, i * (1 + damageMultiplier) * (monster.getMobType() == MobType.UNDEAD ? this.undeadMultiplier : 1), headshot);
|
||||
} else {
|
||||
hurt = performHurt(entity, i * (entity instanceof LivingEntity living && living.getMobType() == MobType.UNDEAD ? this.undeadMultiplier : 1), headshot);
|
||||
}
|
||||
|
||||
if (!hurt) {
|
||||
int k = entity.getRemainingFireTicks();
|
||||
entity.setRemainingFireTicks(k);
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(-0.1D));
|
||||
this.setYRot(this.getYRot() + 180.0F);
|
||||
this.yRotO += 180.0F;
|
||||
if (!this.level().isClientSide && this.getDeltaMovement().lengthSqr() < 1.0E-7D) {
|
||||
if (this.pickup == AbstractArrow.Pickup.ALLOWED) {
|
||||
this.spawnAtLocation(this.getPickupItem(), 0.1F);
|
||||
}
|
||||
|
||||
this.discard();
|
||||
}
|
||||
}
|
||||
|
||||
this.discard();
|
||||
}
|
||||
|
@ -191,21 +82,4 @@ public class BocekArrowEntity extends AbstractArrow implements ItemSupplier {
|
|||
this.discard();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean performHurt(Entity entity, float damage, boolean headshot) {
|
||||
float normalDamage = damage * Mth.clamp(1 - bypassArmorRate, 0, 1);
|
||||
float absoluteDamage = damage * Mth.clamp(bypassArmorRate, 0, 1);
|
||||
|
||||
entity.invulnerableTime = 0;
|
||||
if (headshot) {
|
||||
entity.hurt(ModDamageTypes.causeArrowInBrainDamage(this.level().registryAccess(), this, this.getOwner()), normalDamage * 2);
|
||||
entity.invulnerableTime = 0;
|
||||
return entity.hurt(ModDamageTypes.causeArrowInBrainAbsoluteDamage(this.level().registryAccess(), this, this.getOwner()), absoluteDamage * 2);
|
||||
} else {
|
||||
entity.hurt(ModDamageTypes.causeArrowInKneeDamage(this.level().registryAccess(), this, this.getOwner()), normalDamage);
|
||||
entity.invulnerableTime = 0;
|
||||
return entity.hurt(ModDamageTypes.causeArrowInKneeAbsoluteDamage(this.level().registryAccess(), this, this.getOwner()), absoluteDamage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,6 +66,8 @@ import java.util.function.Function;
|
|||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static net.mcreator.superbwarfare.entity.TargetEntity.DOWN_TIME;
|
||||
|
||||
@SuppressWarnings({"unused", "UnusedReturnValue", "SuspiciousNameCombination"})
|
||||
public class ProjectileEntity extends Entity implements IEntityAdditionalSpawnData, GeoEntity, AnimatedEntity {
|
||||
public static final EntityDataAccessor<Float> COLOR_R = SynchedEntityData.defineId(ProjectileEntity.class, EntityDataSerializers.FLOAT);
|
||||
|
@ -127,6 +129,10 @@ public class ProjectileEntity extends Entity implements IEntityAdditionalSpawnDa
|
|||
for (Entity entity : entities) {
|
||||
if (entity.equals(this.shooter)) continue;
|
||||
|
||||
if (entity.equals(this.shooter.getVehicle())) continue;
|
||||
|
||||
if (entity instanceof TargetEntity && entity.getEntityData().get(DOWN_TIME) > 0) continue;
|
||||
|
||||
EntityResult result = this.getHitResult(entity, startVec, endVec);
|
||||
if (result == null) continue;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.minecraftforge.client.event.ViewportEvent;
|
|||
import net.minecraftforge.client.gui.overlay.VanillaGuiOverlay;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import static net.mcreator.superbwarfare.entity.DroneEntity.ROT_X;
|
||||
import static net.mcreator.superbwarfare.entity.DroneEntity.ROT_Z;
|
||||
|
@ -150,7 +151,8 @@ public class ClientEventHandler {
|
|||
var data = entity.getPersistentData();
|
||||
ItemStack stack = entity.getMainHandItem();
|
||||
|
||||
boolean zoom = entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming;
|
||||
boolean zoom = GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS;
|
||||
|
||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
||||
|
||||
|
@ -306,7 +308,7 @@ public class ClientEventHandler {
|
|||
float times = 110f / fps;
|
||||
var data = entity.getPersistentData();
|
||||
|
||||
if ((entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
data.putDouble("zoom_time", Mth.clamp(data.getDouble("zoom_time") + 0.03 * times,0,1));
|
||||
} else {
|
||||
data.putDouble("zoom_time", Mth.clamp(data.getDouble("zoom_time") - 0.04 * times,0,1));
|
||||
|
@ -474,7 +476,7 @@ public class ClientEventHandler {
|
|||
return;
|
||||
}
|
||||
if (player.isPassenger() && player.getVehicle() instanceof ICannonEntity) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
event.setFOV(event.getFOV() / 5);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ public class GunEventHandler {
|
|||
|
||||
int zoomAddCooldown = 0;
|
||||
if (stack.getItem() == ModItems.MARLIN.get()) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
zoomAddCooldown = 5;
|
||||
stack.getOrCreateTag().putDouble("marlin_animation_time", 15);
|
||||
stack.getOrCreateTag().putBoolean("fastfiring", false);
|
||||
|
@ -356,7 +356,7 @@ public class GunEventHandler {
|
|||
float headshot = (float) heldItem.getOrCreateTag().getDouble("headshot");
|
||||
float damage = (float) (heldItem.getOrCreateTag().getDouble("damage") + heldItem.getOrCreateTag().getDouble("sentinelChargeDamage")) * (float) heldItem.getOrCreateTag().getDouble("levelDamageMultiple");
|
||||
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming;
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||
double spread = heldItem.getOrCreateTag().getDouble("spread");
|
||||
double zoomSpread = heldItem.getOrCreateTag().getDouble("zoomSpread");
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package net.mcreator.superbwarfare.event;
|
||||
|
||||
import net.mcreator.superbwarfare.ModUtils;
|
||||
import net.mcreator.superbwarfare.entity.projectile.ProjectileEntity;
|
||||
import net.mcreator.superbwarfare.entity.TargetEntity;
|
||||
import net.mcreator.superbwarfare.entity.projectile.ProjectileEntity;
|
||||
import net.mcreator.superbwarfare.init.*;
|
||||
import net.mcreator.superbwarfare.item.gun.GunItem;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
|
@ -63,9 +63,6 @@ public class LivingEventHandler {
|
|||
|
||||
double damage = amount;
|
||||
ItemStack stack = sourceentity instanceof LivingEntity living ? living.getMainHandItem() : ItemStack.EMPTY;
|
||||
if (DamageTypeTool.isArrowDamage(damageSource) && stack.getItem() == ModItems.BOCEK.get()) {
|
||||
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
|
||||
}
|
||||
|
||||
if ((damageSource.is(ModDamageTypes.PROJECTILE_BOOM)
|
||||
|| damageSource.is(ModDamageTypes.CANNON_FIRE))
|
||||
|
@ -78,7 +75,7 @@ public class LivingEventHandler {
|
|||
if (DamageTypeTool.isGunDamage(damageSource)) {
|
||||
double distance = entity.position().distanceTo(sourceentity.position());
|
||||
|
||||
if (stack.is(ModTags.Items.USE_SHOTGUN_AMMO) || stack.getItem() == ModItems.BOCEK.get()) {
|
||||
if (stack.is(ModTags.Items.USE_SHOTGUN_AMMO)) {
|
||||
damage = reduceDamageByDistance(amount, distance, 0.03, 25);
|
||||
} else if (stack.is(ModTags.Items.USE_SNIPER_AMMO)) {
|
||||
damage = reduceDamageByDistance(amount, distance, 0.001, 200);
|
||||
|
@ -86,7 +83,7 @@ public class LivingEventHandler {
|
|||
damage = reduceDamageByDistance(amount, distance, 0.03, 50);
|
||||
} else if (stack.is(ModTags.Items.SMG)) {
|
||||
damage = reduceDamageByDistance(amount, distance, 0.03, 50);
|
||||
} else if (stack.is(ModTags.Items.USE_RIFLE_AMMO)) {
|
||||
} else if (stack.is(ModTags.Items.USE_RIFLE_AMMO) || stack.getItem() == ModItems.BOCEK.get()) {
|
||||
damage = reduceDamageByDistance(amount, distance, 0.0025, 150);
|
||||
}
|
||||
event.setAmount((float) damage);
|
||||
|
|
|
@ -64,7 +64,6 @@ public class PlayerEventHandler {
|
|||
|
||||
player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
capability.zoom = false;
|
||||
capability.zooming = false;
|
||||
capability.tacticalSprintExhaustion = false;
|
||||
capability.tacticalSprintTime = 600;
|
||||
capability.syncPlayerVariables(player);
|
||||
|
@ -118,7 +117,7 @@ public class PlayerEventHandler {
|
|||
}
|
||||
|
||||
if (!player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).breath &&
|
||||
player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming) {
|
||||
player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom) {
|
||||
float newPitch = (float) (player.getXRot() - 0.03f * Mth.sin((float) (0.08 * player.tickCount)) * pose * Mth.nextDouble(RandomSource.create(), 0.1, 1));
|
||||
player.setXRot(newPitch);
|
||||
player.xRotO = player.getXRot();
|
||||
|
@ -274,7 +273,7 @@ public class PlayerEventHandler {
|
|||
player.getPersistentData().putDouble("noRun", 20);
|
||||
}
|
||||
|
||||
if (player.isShiftKeyDown() || player.isPassenger() || player.isInWater() || (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (player.isShiftKeyDown() || player.isPassenger() || player.isInWater() || (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
player.getPersistentData().putDouble("noRun", 1);
|
||||
}
|
||||
|
||||
|
@ -282,7 +281,7 @@ public class PlayerEventHandler {
|
|||
player.getPersistentData().putDouble("noRun", (player.getPersistentData().getDouble("noRun") - 1));
|
||||
}
|
||||
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
player.setSprinting(false);
|
||||
}
|
||||
}
|
||||
|
@ -340,19 +339,19 @@ public class PlayerEventHandler {
|
|||
}
|
||||
|
||||
private static void handlePrepareZoom(Player player) {
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
|
||||
if (stack.is(ModTags.Items.GUN) && !player.isSpectator()) {
|
||||
if (player.getMainHandItem().getItem() != ModItems.MINIGUN.get()) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
player.setSprinting(false);
|
||||
player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
capability.zooming = true;
|
||||
capability.syncPlayerVariables(player);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// ItemStack stack = player.getMainHandItem();
|
||||
//
|
||||
// if (stack.is(ModTags.Items.GUN) && !player.isSpectator()) {
|
||||
// if (player.getMainHandItem().getItem() != ModItems.MINIGUN.get()) {
|
||||
// if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
// player.setSprinting(false);
|
||||
// player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
// capability.zooming = true;
|
||||
// capability.syncPlayerVariables(player);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private static void handleSpecialWeaponAmmo(Player player) {
|
||||
|
|
|
@ -20,10 +20,6 @@ public class ModDamageTypes {
|
|||
public static final ResourceKey<DamageType> GUN_FIRE_ABSOLUTE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "gunfire_absolute"));
|
||||
public static final ResourceKey<DamageType> GUN_FIRE_HEADSHOT = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "gunfire_headshot"));
|
||||
public static final ResourceKey<DamageType> GUN_FIRE_HEADSHOT_ABSOLUTE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "gunfire_headshot_absolute"));
|
||||
public static final ResourceKey<DamageType> ARROW_IN_KNEE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "arrow_in_knee"));
|
||||
public static final ResourceKey<DamageType> ARROW_IN_KNEE_ABSOLUTE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "arrow_in_knee_absolute"));
|
||||
public static final ResourceKey<DamageType> ARROW_IN_BRAIN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "arrow_in_brain"));
|
||||
public static final ResourceKey<DamageType> ARROW_IN_BRAIN_ABSOLUTE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "arrow_in_brain_absolute"));
|
||||
public static final ResourceKey<DamageType> MINE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "mine"));
|
||||
public static final ResourceKey<DamageType> BEAST = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "beast"));
|
||||
public static final ResourceKey<DamageType> SHOCK = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "shock"));
|
||||
|
@ -38,14 +34,6 @@ public class ModDamageTypes {
|
|||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(GUN_FIRE_HEADSHOT), directEntity, attacker);
|
||||
}
|
||||
|
||||
public static DamageSource causeArrowInKneeDamage(RegistryAccess registryAccess, @Nullable Entity directEntity, @Nullable Entity attacker) {
|
||||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(ARROW_IN_KNEE), directEntity, attacker);
|
||||
}
|
||||
|
||||
public static DamageSource causeArrowInBrainDamage(RegistryAccess registryAccess, @Nullable Entity directEntity, @Nullable Entity attacker) {
|
||||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(ARROW_IN_BRAIN), directEntity, attacker);
|
||||
}
|
||||
|
||||
public static DamageSource causeMineDamage(RegistryAccess registryAccess, @Nullable Entity entity) {
|
||||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(MINE), entity);
|
||||
}
|
||||
|
@ -70,14 +58,6 @@ public class ModDamageTypes {
|
|||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(GUN_FIRE_HEADSHOT_ABSOLUTE), directEntity, attacker);
|
||||
}
|
||||
|
||||
public static DamageSource causeArrowInKneeAbsoluteDamage(RegistryAccess registryAccess, @Nullable Entity directEntity, @Nullable Entity attacker) {
|
||||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(ARROW_IN_KNEE_ABSOLUTE), directEntity, attacker);
|
||||
}
|
||||
|
||||
public static DamageSource causeArrowInBrainAbsoluteDamage(RegistryAccess registryAccess, @Nullable Entity directEntity, @Nullable Entity attacker) {
|
||||
return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(ARROW_IN_BRAIN_ABSOLUTE), directEntity, attacker);
|
||||
}
|
||||
|
||||
private static class DamageMessages extends DamageSource {
|
||||
public DamageMessages(Holder.Reference<DamageType> typeReference) {
|
||||
super(typeReference);
|
||||
|
|
|
@ -4,7 +4,6 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.mcreator.superbwarfare.perk.Perk;
|
||||
import net.mcreator.superbwarfare.perk.PerkHelper;
|
||||
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||
|
@ -59,10 +58,6 @@ public abstract class GunItem extends Item {
|
|||
if (itemstack.getOrCreateTag().getBoolean("draw")) {
|
||||
itemstack.getOrCreateTag().putBoolean("draw", false);
|
||||
itemstack.getOrCreateTag().putInt("draw_time", 0);
|
||||
entity.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
capability.zooming = false;
|
||||
capability.syncPlayerVariables(entity);
|
||||
});
|
||||
|
||||
if (itemstack.getItem() == ModItems.RPG.get() && itemstack.getOrCreateTag().getInt("ammo") == 0) {
|
||||
itemstack.getOrCreateTag().putDouble("empty", 1);
|
||||
|
|
|
@ -23,10 +23,8 @@ public class LivingEntityMixin {
|
|||
@ModifyArg(method = "hurt", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;knockback(DDD)V"), index = 0)
|
||||
private double modifyApplyKnockbackArgs(double original) {
|
||||
if (this.target$source.is(ModDamageTypes.GUN_FIRE) || this.target$source.is(ModDamageTypes.GUN_FIRE_HEADSHOT)
|
||||
|| this.target$source.is(ModDamageTypes.ARROW_IN_KNEE) || this.target$source.is(ModDamageTypes.ARROW_IN_BRAIN)
|
||||
|| this.target$source.is(ModDamageTypes.SHOCK) || this.target$source.is(ModDamageTypes.GUN_FIRE_ABSOLUTE)
|
||||
|| this.target$source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE) || this.target$source.is(ModDamageTypes.ARROW_IN_BRAIN_ABSOLUTE)
|
||||
|| this.target$source.is(ModDamageTypes.ARROW_IN_KNEE_ABSOLUTE)) {
|
||||
|| this.target$source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE)) {
|
||||
return 0.05 * original;
|
||||
}
|
||||
return original;
|
||||
|
|
|
@ -3,13 +3,13 @@ package net.mcreator.superbwarfare.mixins;
|
|||
import net.mcreator.superbwarfare.entity.ICannonEntity;
|
||||
import net.mcreator.superbwarfare.init.ModMobEffects;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.network.ModVariables;
|
||||
import net.minecraft.client.CameraType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.MouseHandler;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -37,8 +37,8 @@ public class MouseHandlerMixin {
|
|||
|
||||
ItemStack stack = mc.player.getMainHandItem();
|
||||
|
||||
if (player.getVehicle() != null && player.getVehicle() instanceof ICannonEntity) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
if (player.getVehicle() != null && player.getVehicle() instanceof ICannonEntity && !stack.is(ModTags.Items.GUN)) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
return 0.15;
|
||||
} else {
|
||||
return 0.3;
|
||||
|
@ -57,7 +57,7 @@ public class MouseHandlerMixin {
|
|||
float originalFov = mc.options.fov().get();
|
||||
|
||||
if (!player.getMainHandItem().isEmpty() && mc.options.getCameraType() == CameraType.FIRST_PERSON) {
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
|
||||
additionalAdsSensitivity = (float) Mth.clamp((1 + 0.1f * customSens) * (1.25F * fov / originalFov) * (1 + 0.2f * Math.pow((originalFov / fov), 1.25)), 0.125F, 2F);
|
||||
} else {
|
||||
additionalAdsSensitivity = Mth.clamp((1 + 0.1f * customSens) * 1.25F, 0.125F, 2F);
|
||||
|
|
|
@ -70,7 +70,6 @@ public class ModVariables {
|
|||
PlayerVariables original = event.getOriginal().getCapability(PLAYER_VARIABLES_CAPABILITY, null).orElse(new PlayerVariables());
|
||||
PlayerVariables clone = event.getEntity().getCapability(PLAYER_VARIABLES_CAPABILITY, null).orElse(new PlayerVariables());
|
||||
clone.zoom = original.zoom;
|
||||
clone.zooming = original.zooming;
|
||||
clone.recoil = original.recoil;
|
||||
clone.recoilHorizon = original.recoilHorizon;
|
||||
clone.firing = original.firing;
|
||||
|
@ -262,7 +261,6 @@ public class ModVariables {
|
|||
|
||||
public static class PlayerVariables {
|
||||
public boolean zoom = false;
|
||||
public boolean zooming = false;
|
||||
public double recoil = 0;
|
||||
public double recoilHorizon = 0;
|
||||
public double firing = 0;
|
||||
|
@ -292,7 +290,6 @@ public class ModVariables {
|
|||
public Tag writeNBT() {
|
||||
CompoundTag nbt = new CompoundTag();
|
||||
nbt.putBoolean("zoom", zoom);
|
||||
nbt.putBoolean("zooming", zooming);
|
||||
nbt.putDouble("recoil", recoil);
|
||||
nbt.putDouble("recoil_horizon", recoilHorizon);
|
||||
nbt.putDouble("firing", firing);
|
||||
|
@ -318,7 +315,6 @@ public class ModVariables {
|
|||
public void readNBT(Tag Tag) {
|
||||
CompoundTag nbt = (CompoundTag) Tag;
|
||||
zoom = nbt.getBoolean("zoom");
|
||||
zooming = nbt.getBoolean("zooming");
|
||||
recoil = nbt.getDouble("recoil");
|
||||
recoilHorizon = nbt.getDouble("recoil_horizon");
|
||||
firing = nbt.getDouble("firing");
|
||||
|
@ -375,7 +371,6 @@ public class ModVariables {
|
|||
|
||||
PlayerVariables variables = entity.getCapability(PLAYER_VARIABLES_CAPABILITY, null).orElse(new PlayerVariables());
|
||||
variables.zoom = message.data.zoom;
|
||||
variables.zooming = message.data.zooming;
|
||||
variables.recoil = message.data.recoil;
|
||||
variables.recoilHorizon = message.data.recoilHorizon;
|
||||
variables.firing = message.data.firing;
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BreathMessage {
|
|||
|
||||
var cap = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null);
|
||||
|
||||
if (message.type && !cap.orElse(new ModVariables.PlayerVariables()).breathExhaustion && cap.orElse(new ModVariables.PlayerVariables()).zooming &&
|
||||
if (message.type && !cap.orElse(new ModVariables.PlayerVariables()).breathExhaustion && cap.orElse(new ModVariables.PlayerVariables()).zoom &&
|
||||
player.getPersistentData().getDouble("NoBreath") == 0) {
|
||||
cap.ifPresent(capability -> {
|
||||
capability.breath = true;
|
||||
|
|
|
@ -119,7 +119,7 @@ public class FireMessage {
|
|||
handleRpgFire(player);
|
||||
}
|
||||
|
||||
if (handItem.getItem() == ModItems.JAVELIN.get() && player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming && tag.getInt("ammo") > 0) {
|
||||
if (handItem.getItem() == ModItems.JAVELIN.get() && player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom && tag.getInt("ammo") > 0) {
|
||||
Entity seekingEntity = SeekTool.seekEntity(player, player.level(), 384, 8);
|
||||
if (seekingEntity != null) {
|
||||
tag.putString("TargetEntity", seekingEntity.getStringUUID());
|
||||
|
@ -182,65 +182,70 @@ public class FireMessage {
|
|||
|
||||
if (stack.getOrCreateTag().getDouble("power") >= 6) {
|
||||
stack.getOrCreateTag().putDouble("speed", stack.getOrCreateTag().getDouble("power"));
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||
Level level = player.level();
|
||||
if (!level.isClientSide()) {
|
||||
float damage = (float) (0.04 * stack.getOrCreateTag().getDouble("damage") * (1 + 0.05 * stack.getOrCreateTag().getInt("level")));
|
||||
float bypassArmorRate = (float) stack.getOrCreateTag().getDouble("BypassArmor");
|
||||
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
|
||||
Level plevel = player.level();
|
||||
if (!plevel.isClientSide()) {
|
||||
ItemStack heldItem = player.getMainHandItem();
|
||||
|
||||
BocekArrowEntity arrow = new BocekArrowEntity(player, level);
|
||||
if (player.level().isClientSide()) return;
|
||||
|
||||
CompoundTag tag = heldItem.getOrCreateTag();
|
||||
double damage;
|
||||
float headshot = (float) tag.getDouble("headshot");
|
||||
float velocity = 2 * (float) tag.getDouble("speed");
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||
float bypassArmorRate = (float) heldItem.getOrCreateTag().getDouble("BypassesArmor");
|
||||
|
||||
ProjectileEntity projectile = new ProjectileEntity(player.level())
|
||||
.shooter(player)
|
||||
.headShot(1)
|
||||
.zoom(true);
|
||||
.headShot(headshot)
|
||||
.zoom(zoom);
|
||||
|
||||
var perk = PerkHelper.getPerkByType(stack, Perk.Type.AMMO);
|
||||
var perk = PerkHelper.getPerkByType(heldItem, Perk.Type.AMMO);
|
||||
if (perk instanceof AmmoPerk ammoPerk) {
|
||||
int pLevel = PerkHelper.getItemPerkLevel(perk, stack);
|
||||
int level = PerkHelper.getItemPerkLevel(perk, heldItem);
|
||||
|
||||
bypassArmorRate += ammoPerk.bypassArmorRate + (perk == ModPerks.AP_BULLET.get() ? 0.05f * (pLevel - 1) : 0);
|
||||
bypassArmorRate += ammoPerk.bypassArmorRate + (perk == ModPerks.AP_BULLET.get() ? 0.05f * (level - 1) : 0);
|
||||
projectile.setRGB(ammoPerk.rgb);
|
||||
|
||||
if (ammoPerk.mobEffect.get() != null) {
|
||||
projectile.effect(() -> new MobEffectInstance(ammoPerk.mobEffect.get(), 70 + 30 * pLevel, pLevel - 1));
|
||||
projectile.effect(() -> new MobEffectInstance(ammoPerk.mobEffect.get(), 70 + 30 * level, level - 1));
|
||||
}
|
||||
}
|
||||
|
||||
float undeadMultiple = 1;
|
||||
bypassArmorRate = Math.max(bypassArmorRate, 0);
|
||||
projectile.bypassArmorRate(bypassArmorRate);
|
||||
|
||||
if (perk == ModPerks.SILVER_BULLET.get()) {
|
||||
int perkLevel = PerkHelper.getItemPerkLevel(perk, stack);
|
||||
undeadMultiple = 1.0f + 0.5f * perkLevel;
|
||||
int level = PerkHelper.getItemPerkLevel(perk, heldItem);
|
||||
projectile.undeadMultiple(1.0f + 0.5f * level);
|
||||
} else if (perk == ModPerks.BEAST_BULLET.get()) {
|
||||
projectile.beast();
|
||||
}
|
||||
|
||||
var dmgPerk = PerkHelper.getPerkByType(stack, Perk.Type.DAMAGE);
|
||||
var dmgPerk = PerkHelper.getPerkByType(heldItem, Perk.Type.DAMAGE);
|
||||
if (dmgPerk == ModPerks.MONSTER_HUNTER.get()) {
|
||||
int perkLevel = PerkHelper.getItemPerkLevel(dmgPerk, stack);
|
||||
int perkLevel = PerkHelper.getItemPerkLevel(dmgPerk, heldItem);
|
||||
projectile.monsterMultiple(0.1f + 0.1f * perkLevel);
|
||||
arrow.setMonsterMultiplier(0.1f + 0.1f * perkLevel);
|
||||
}
|
||||
|
||||
projectile.bypassArmorRate(0);
|
||||
projectile.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
||||
projectile.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) (2 * power), 0);
|
||||
projectile.damage(0);
|
||||
projectile.setPos(player.getX() - 0.1 * player.getLookAngle().x, player.getEyeY() - 0.1 - 0.1 * player.getLookAngle().y, player.getZ() + -0.1 * player.getLookAngle().z);
|
||||
|
||||
damage = 0.08333333 * tag.getDouble("damage") * tag.getDouble("speed") * tag.getDouble("levelDamageMultiple");
|
||||
projectile.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, velocity, 0);
|
||||
projectile.damage((float) damage);
|
||||
player.level().addFreshEntity(projectile);
|
||||
|
||||
bypassArmorRate = Math.max(bypassArmorRate, 0);
|
||||
|
||||
arrow.bypassArmorRate(bypassArmorRate).setUndeadMultiplier(undeadMultiple);
|
||||
arrow.setBaseDamage(damage);
|
||||
BocekArrowEntity arrow = new BocekArrowEntity(player, plevel);
|
||||
arrow.setBaseDamage(0);
|
||||
arrow.setKnockback(0);
|
||||
arrow.setSilent(true);
|
||||
arrow.setPierceLevel((byte) 2);
|
||||
arrow.pickup = AbstractArrow.Pickup.ALLOWED;
|
||||
arrow.pickup = AbstractArrow.Pickup.DISALLOWED;
|
||||
|
||||
arrow.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
||||
arrow.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) (2 * power), 0);
|
||||
level.addFreshEntity(arrow);
|
||||
plevel.addFreshEntity(arrow);
|
||||
}
|
||||
|
||||
if (!player.level().isClientSide()) {
|
||||
|
@ -334,7 +339,7 @@ public class FireMessage {
|
|||
|
||||
projectile.setPos(player.getX() - 0.1 * player.getLookAngle().x, player.getEyeY() - 0.1 - 0.1 * player.getLookAngle().y, player.getZ() + -0.1 * player.getLookAngle().z);
|
||||
|
||||
damage = 2 * 0.008333333 * tag.getDouble("damage") * tag.getDouble("speed") * tag.getDouble("levelDamageMultiple");
|
||||
damage = 0.008333333 * tag.getDouble("damage") * tag.getDouble("speed") * tag.getDouble("levelDamageMultiple");
|
||||
projectile.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, velocity, 2.5f);
|
||||
projectile.damage((float) damage);
|
||||
player.level().addFreshEntity(projectile);
|
||||
|
@ -364,7 +369,7 @@ public class FireMessage {
|
|||
int volt = PerkHelper.getItemPerkLevel(ModPerks.VOLT_OVERLOAD.get(), stack);
|
||||
int wireLength = PerkHelper.getItemPerkLevel(ModPerks.LONGER_WIRE.get(), stack);
|
||||
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming;
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
||||
|
||||
|
@ -386,7 +391,6 @@ public class FireMessage {
|
|||
stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(
|
||||
energy -> energy.extractEnergy(2000 + 200 * perkLevel, false)
|
||||
);
|
||||
// ItemNBTTool.setInt(stack, "Power", ItemNBTTool.getInt(stack, "Power", 1200) - 400);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +401,7 @@ public class FireMessage {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.getOrCreateTag().getBoolean("reloading")) {
|
||||
if (!player.getCooldowns().isOnCooldown(stack.getItem()) && stack.getOrCreateTag().getInt("ammo") > 0) {
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming;
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
||||
|
||||
|
@ -449,7 +453,7 @@ public class FireMessage {
|
|||
CompoundTag tag = stack.getOrCreateTag();
|
||||
|
||||
if (!tag.getBoolean("reloading") && !player.getCooldowns().isOnCooldown(stack.getItem()) && tag.getInt("ammo") > 0) {
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zooming;
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ public class ZoomMessage {
|
|||
if (message.type == 1) {
|
||||
player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
|
||||
capability.zoom = false;
|
||||
capability.zooming = false;
|
||||
capability.breath = false;
|
||||
capability.syncPlayerVariables(player);
|
||||
});
|
||||
|
|
|
@ -7,16 +7,6 @@ import net.minecraft.world.damagesource.DamageType;
|
|||
|
||||
public class DamageTypeTool {
|
||||
|
||||
public static boolean isArrowDamage(DamageSource source) {
|
||||
return source.is(ModDamageTypes.ARROW_IN_BRAIN) || source.is(ModDamageTypes.ARROW_IN_KNEE)
|
||||
|| source.is(ModDamageTypes.ARROW_IN_BRAIN_ABSOLUTE) || source.is(ModDamageTypes.ARROW_IN_KNEE_ABSOLUTE);
|
||||
}
|
||||
|
||||
public static boolean isArrowDamage(ResourceKey<DamageType> damageType) {
|
||||
return damageType == ModDamageTypes.ARROW_IN_BRAIN || damageType == ModDamageTypes.ARROW_IN_KNEE
|
||||
|| damageType == ModDamageTypes.ARROW_IN_BRAIN_ABSOLUTE || damageType == ModDamageTypes.ARROW_IN_KNEE_ABSOLUTE;
|
||||
}
|
||||
|
||||
public static boolean isGunDamage(DamageSource source) {
|
||||
return source.is(ModDamageTypes.GUN_FIRE) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT)
|
||||
|| source.is(ModDamageTypes.GUN_FIRE_ABSOLUTE) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE);
|
||||
|
@ -32,8 +22,7 @@ public class DamageTypeTool {
|
|||
}
|
||||
|
||||
public static boolean isHeadshotDamage(DamageSource source) {
|
||||
return source.is(ModDamageTypes.GUN_FIRE_HEADSHOT) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE)
|
||||
|| source.is(ModDamageTypes.ARROW_IN_BRAIN) || source.is(ModDamageTypes.ARROW_IN_BRAIN_ABSOLUTE);
|
||||
return source.is(ModDamageTypes.GUN_FIRE_HEADSHOT) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE);
|
||||
}
|
||||
|
||||
public static boolean isGunFireDamage(DamageSource source) {
|
||||
|
|
|
@ -247,12 +247,6 @@
|
|||
"death.attack.gunfire_headshot": "%1$s was headshot by %2$s",
|
||||
"death.attack.gunfire_headshot.entity": "%1$s was headshot by %2$s",
|
||||
"death.attack.gunfire_headshot.item": "%1$s was headshot by %2$s using %3$s",
|
||||
"death.attack.arrow_in_knee": "%1$s's took an arrow on the knee",
|
||||
"death.attack.arrow_in_knee.entity": "%1$s's knee was taken an arrow by %2$s",
|
||||
"death.attack.arrow_in_knee.item": "%1$s's knee was taken an arrow by %2$s using %3$s",
|
||||
"death.attack.arrow_in_brain": "An arrow shot into %1$s's brain",
|
||||
"death.attack.arrow_in_brain.entity": "%2$s's arrow shot into %1$s's brain",
|
||||
"death.attack.arrow_in_brain.item": "%2$s used %3$s to make an arrow shot into %1$s's brain",
|
||||
"death.attack.beast_gun": "%1$s was killed by %2$s using BEAST guns",
|
||||
"death.attack.mine": "%1$s step on Claymore",
|
||||
"death.attack.mine.entity": "%1$s step on %2$s's Claymore",
|
||||
|
|
|
@ -246,12 +246,6 @@
|
|||
"death.attack.gunfire_headshot": "%1$s被%2$s射爆了脑袋",
|
||||
"death.attack.gunfire_headshot.entity": "%1$s被%2$s射爆了脑袋",
|
||||
"death.attack.gunfire_headshot.item": "%1$s被%2$s用%3$s射爆了脑袋",
|
||||
"death.attack.arrow_in_knee": "%1$s的膝盖中了一箭",
|
||||
"death.attack.arrow_in_knee.entity": "%1$s的膝盖中了一箭,凶手是%2$s",
|
||||
"death.attack.arrow_in_knee.item": "%2$s用%3$s让%1$s的膝盖中了一箭",
|
||||
"death.attack.arrow_in_brain": "%1$s的脑子进矢了",
|
||||
"death.attack.arrow_in_brain.entity": "%1$s的脑子进矢了,凶手是%2$s",
|
||||
"death.attack.arrow_in_brain.item": "%2$s用%3$s让%1$s的脑子进矢了",
|
||||
"death.attack.beast_gun": "%1$s被%2$s用BEAST枪械臭炸了",
|
||||
"death.attack.mine": "%1$s不慎踩到了阔剑地雷",
|
||||
"death.attack.mine.entity": "%1$s踩到了%2$s的阔剑地雷",
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"values": [
|
||||
"superbwarfare:gunfire_absolute",
|
||||
"superbwarfare:gunfire_headshot_absolute",
|
||||
"superbwarfare:arrow_in_knee_absolute",
|
||||
"superbwarfare:arrow_in_brain_absolute",
|
||||
"superbwarfare:shock",
|
||||
"superbwarfare:cannon_fire"
|
||||
]
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"values": [
|
||||
"superbwarfare:gunfire_absolute",
|
||||
"superbwarfare:gunfire_headshot_absolute",
|
||||
"superbwarfare:arrow_in_knee_absolute",
|
||||
"superbwarfare:arrow_in_brain_absolute",
|
||||
"superbwarfare:shock",
|
||||
"superbwarfare:cannon_fire"
|
||||
]
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"values": [
|
||||
"superbwarfare:gunfire_absolute",
|
||||
"superbwarfare:gunfire_headshot_absolute",
|
||||
"superbwarfare:arrow_in_knee_absolute",
|
||||
"superbwarfare:arrow_in_brain_absolute",
|
||||
"superbwarfare:shock",
|
||||
"superbwarfare:cannon_fire"
|
||||
]
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"values": [
|
||||
"superbwarfare:gunfire_absolute",
|
||||
"superbwarfare:gunfire_headshot_absolute",
|
||||
"superbwarfare:arrow_in_knee_absolute",
|
||||
"superbwarfare:arrow_in_brain_absolute",
|
||||
"superbwarfare:shock",
|
||||
"superbwarfare:cannon_fire"
|
||||
]
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"exhaustion": 0,
|
||||
"message_id": "arrow_in_brain",
|
||||
"scaling": "never"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"exhaustion": 0,
|
||||
"message_id": "arrow_in_brain",
|
||||
"scaling": "never"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"exhaustion": 0,
|
||||
"message_id": "arrow_in_knee",
|
||||
"scaling": "never"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"exhaustion": 0,
|
||||
"message_id": "arrow_in_knee",
|
||||
"scaling": "never"
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"zoom_speed": 1,
|
||||
"zoom": 2,
|
||||
"spread": 3,
|
||||
"zoomSpread": 0,
|
||||
"spread": 4,
|
||||
"zoomSpread": 1,
|
||||
"recoil_x": 0.005,
|
||||
"recoil_y": 0.003,
|
||||
"headshot": 1.5,
|
||||
"headshot": 2.5,
|
||||
"damage": 24,
|
||||
"weight": 1,
|
||||
"BypassesArmor": 0.25
|
||||
|
|
Loading…
Add table
Reference in a new issue