mirror of
https://github.com/haselkern/Minecraft-ArmorStand.git
synced 2025-05-17 15:05:33 +00:00
Easier equipment
Removed modes for different versions of minecraft.
This commit is contained in:
parent
2117cdb891
commit
6e97790ca3
2 changed files with 8 additions and 31 deletions
|
@ -99,11 +99,8 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<select id="equipmode">
|
||||
<option value="none">No Equipment</option>
|
||||
<option value="1.8">Minecraft 1.8- Equipment</option>
|
||||
<option value="1.9">Minecraft 1.9+ Equipment</option>
|
||||
</select>
|
||||
|
||||
<label><input type="checkbox" name="useequipment">Enable equipment</label><br>
|
||||
<div id="customequipment">
|
||||
<div class="padding">
|
||||
Enter the text id of an item (for example <i>stone</i> or <i>iron_sword</i>) into the appropriate slots. You can enter an arbitrary item for the head or hand, but the other slots must contain an appropriate item.
|
||||
|
|
32
js/main.js
32
js/main.js
|
@ -37,7 +37,7 @@ var noGravity = false;
|
|||
var showArms = false;
|
||||
var small = false;
|
||||
|
||||
var equipmentMode;
|
||||
var useEquipment;
|
||||
var equipHandRight;
|
||||
var equipHandLeft;
|
||||
var equipShoes;
|
||||
|
@ -265,7 +265,7 @@ function handleInput(){
|
|||
showArms = getCheckBoxInput("showarms");
|
||||
small = getCheckBoxInput("small");
|
||||
|
||||
equipmentMode = $("#equipmode").val(); // use direct jQuery for dropdowns
|
||||
useEquipment = getCheckBoxInput("useequipment");
|
||||
equipHandRight = getInput("equipHandRight");
|
||||
equipHandLeft = getInput("equipHandLeft");
|
||||
equipShoes = getInput("equipShoes");
|
||||
|
@ -313,18 +313,10 @@ function updateUI(){
|
|||
else
|
||||
$("#inputarms").slideUp();
|
||||
|
||||
if(equipmentMode != "none"){
|
||||
if(useEquipment)
|
||||
$("#customequipment").slideDown();
|
||||
if(equipmentMode == "1.9"){
|
||||
$("#equipHandLeft").show();
|
||||
}
|
||||
else{
|
||||
$("#equipHandLeft").hide();
|
||||
}
|
||||
}
|
||||
else{
|
||||
else
|
||||
$("#customequipment").slideUp();
|
||||
}
|
||||
|
||||
//Different colorinputs for armorparts
|
||||
if(isLeatherArmor(equipShoes))
|
||||
|
@ -403,20 +395,8 @@ function generateCode(){
|
|||
if(rotation != 0)
|
||||
tags.push("Rotation:["+rotation+"f]");
|
||||
|
||||
//1.8 Equipment
|
||||
if(equipmentMode == "1.8"){
|
||||
var equip = [];
|
||||
|
||||
equip.push(getHandRightItem());
|
||||
equip.push(getShoesItem());
|
||||
equip.push(getLeggingsItem());
|
||||
equip.push(getChestplateItem());
|
||||
equip.push(getHeadItem());
|
||||
|
||||
tags.push("Equipment:["+equip.join(",")+"]");
|
||||
}
|
||||
// 1.9 Equipment
|
||||
else if(equipmentMode == "1.9"){
|
||||
// Equipment
|
||||
if(useEquipment){
|
||||
var armor = [];
|
||||
|
||||
armor.push(getShoesItem());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue