Hello. I had two questions. 1. How to fix a bug. When a player dies next to ArmorStand, he stops being invisible. How to fix it? 2. How do I make Velocity for ArmorStand? So he jumped up. Sorry for my english, he's not the bes @Zombie_Striker
Do you mean the Player stops being invisible, or the Armrostand stops being invisible? Either way, that should not happen in the base game. Do you have any other plugins on your server that modfified what happens when players die? Armorstand#setVelocity() should be enough to change the velocity of the armorstand. Note that this only works if the armorstand has gravity, since the "nogravity" tag stops all velocity.
No, there is no plugin at death. Are you hinting at this? It does not work. Most likely, I did wrong ... Vector vector = new Vector(block.getLocation().getX(), block.getLocation().getZ(), block.getLocation().getY() + 5); stand.setVelocity(vector);
Again, which thing stops being invisible? Vectors Use the system X Y Z for velocity. What you're doing is seting the Y (How far up the player needs to go) to be the same as Z (how far north), and setting its Z (how fast to the north the player moves) equal to the Y +5. You're making the player go north, not up. You're getting the entities LOCATION, and setting it equal to the velocity, not getting the entities velocity/ the Vector to the block and adding Y. Basically, if the block is at 0, 100, 0, the player will just go north very fast regardless of where the player is. If you want the player to move towards the block, you need to subtract the block's location relative to the player's location, and use that vector as the velocity.
Players can see ArmorStand even with Visible (false) I'm not very good with English, maybe I'm not reading this way, but I absolutely did not understand anything .... Example?
When a player is dead and not reborn, it happens: These hands are visible. http://i.piccy.info/i9/30a92e911b834d28f6764de4fee767c1/1535055868/29214/1265090/mi709.jpg http://i.piccy.info/i9/f6e5110d53df33e6ef362c7cadc8beb6/1535055918/36971/1265090/mi710.jpg And further. How can I fix this bug? When ArmorStand is created, the head does not have skin on it, but when it spawns twice, the skin appears. And one more question. How can I make my head smaller? On the screenshots above it is huge. I need her to be like this: http://i.piccy.info/i9/f03bfcb6ffdfc614cb3aa75ea3e89515/1535057618/27850/1265090/mi711.jpg http://i.piccy.info/i9/c9367b4fa555e63dfbba522296175b3c/1535057681/23697/1265090/mi712.jpg
@ewrs If the first two images were supposed to be a before image and after image, they both are visible. Also, does this happen with all of the armorstands, or just that one? For the head/skin issue, this has something to do with a bug for MC. There currently isn't a fix besides spawning it twice. As for the other bug, to change the size of an armorstand, you need to call setSmall(true) to make it small
1. I did not notice this with other racks And another such question. How can I use setOwner () with a value head? I do not quite understand. How to make this Armor Stand jump? http://i.piccy.info/i9/f6e5110d53df33e6ef362c7cadc8beb6/1535055918/36971/1265090/mi710.jpg And yet, there is such a bug when ArmorStand appears completely invisible and only after a while the head appears. I did not notice this on other servers.
@ewrs If other armorstands stay invisible when the player dies, there may be an issue with the way you are creating that specific one. Could you post the code you use to create it? Well, setOwner requires the player's name, so you would just need to provide the name of the player's whose skin you want. ARMORSTAND.setVelocity(ARMORSTAND.getVelocity().add(0,5,0));
@Zombie_Striker, help... 1. https://pastebin.com/JvYi1AML 2. This site is only available for VALUE 3. how can I slow it down? stand.setVelocity(new Vector(0, 0.5, 0)); And how can I do this so that after he gets up, he does not fall, but stops? I thought for a while and made him rise and stay in the air. But why does he stay in different places all the time? http://i.piccy.info/i9/e6af394680f241a7df920d67cbe3ef27/1535115268/42312/1265090/mi714.jpg http://i.piccy.info/i9/72b30b377677eaec557780603eea8f59/1535115384/38228/1265090/mi715.jpg Code: https://pastebin.com/xfRW2SNd
What does the "Animate" line do? What do you mean? What is this 'VALUE'? You can slow the armorstand by reducing the vector's Y. Well, to make the armorstand stop, check if the velocity for the armorstand is less than or equal to 0 (which means it either stopped going up, or is going down), and if it is, set gravity to false.
@Zombie_Striker, 1. It does the animation. public Animate(ArmorStand stand) { s = stand; } @Override public void run() { EulerAngle oldRot = s.getHeadPose(); EulerAngle newRot = oldRot.add(0, 0.2f, 0); s.setHeadPose(newRot); } 2. For example, I can not get this head by nickname, but I can by value https://minecraft-heads.com/custom/heads/decoration/22488-pufferfish-dispenser 3. But in fact it does not rise above stand.setVelocity(new Vector(0, 0.01, 0)); # where even less ??? 4. What? Example...... Help
@ewrs Then I'm not sure why that armorstand is visible. Try removing all other code for that armorstands besides making it invisible, in case one of your other systems is making it visible again. Okay, so that is not a player's skin, but instead some NBT tag data. Use this util to change the skin using the texture data from the command on that site. It's not rising because 0.01 is a very small velocity. Gravity applied to the armostand should be something like 0.1 Make sure it is greater than that for it to actually go up. Here's some code: Code: ARMOSTAND.setVelocity(new Vector(0,4,0)); new BukkitRunnable(){ public void run(){ if(ARMORSTAND.getVelocity().getY() <= 0){ ARMORSTAND.setGravity(true); } } }.runTaskLater(MAIN,10);
4. new BukkitRunnable(){ public void run(){ if(stand.getVelocity().getY() <= 0){ stand.setGravity(false); }else { stand.setVelocity(new Vector(0,0.1f,0)); } } }.runTaskLater(Main.getInstance(), 10); He generally stands still ... (That code does not work either ...) UPD: He takes off super-high and falls ...
@ewrs By setting the velocity to 0.1 every 10 ticks, the armorstand will go up forever, since you are always making it go up unless it somehow manages to go down. Move the setVelocity line out of the runnable
@Zombie_Sriker, Not Worked new BukkitRunnable(){ public void run(){ if(stand.getVelocity().getY() <= 0){ stand.setGravity(false); }else { stand.setVelocity(new Vector(0,0.1,0)); } } }.runTaskLater(Main.getInstance(), 10); I need him to stand up a little and froze... And why on the same cubecraft the skin is always there, and I sometimes have Alex? ..
@ewrs Again, try moving the setVelocty method outside of the runnable, and change the 0.1 to something like 1, 2, or 3. For the skin, there are a wide variety of things that could cause this. For example, if your server is in offline mode there is a chance that skins may not be applied. Also, for older updates such as 1.7 and lower, the skins will now load because Mojang changed the skin system. Does it only happen on your server? If so, there is something about it, whether it be a change made to one of the settings or possibly one of the plugins that is causing it. If it is only you who experiences the problem, it may be something that was set by you/ a plugin that specially targets you for something that is causing the problem.
@Zombie_Striker, The server is empty. On it there is only this plugin and some more (WorldGuard and WorldEdit)