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>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<select id="equipmode">
|
|
||||||
<option value="none">No Equipment</option>
|
<label><input type="checkbox" name="useequipment">Enable equipment</label><br>
|
||||||
<option value="1.8">Minecraft 1.8- Equipment</option>
|
|
||||||
<option value="1.9">Minecraft 1.9+ Equipment</option>
|
|
||||||
</select>
|
|
||||||
<div id="customequipment">
|
<div id="customequipment">
|
||||||
<div class="padding">
|
<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.
|
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 showArms = false;
|
||||||
var small = false;
|
var small = false;
|
||||||
|
|
||||||
var equipmentMode;
|
var useEquipment;
|
||||||
var equipHandRight;
|
var equipHandRight;
|
||||||
var equipHandLeft;
|
var equipHandLeft;
|
||||||
var equipShoes;
|
var equipShoes;
|
||||||
|
@ -265,7 +265,7 @@ function handleInput(){
|
||||||
showArms = getCheckBoxInput("showarms");
|
showArms = getCheckBoxInput("showarms");
|
||||||
small = getCheckBoxInput("small");
|
small = getCheckBoxInput("small");
|
||||||
|
|
||||||
equipmentMode = $("#equipmode").val(); // use direct jQuery for dropdowns
|
useEquipment = getCheckBoxInput("useequipment");
|
||||||
equipHandRight = getInput("equipHandRight");
|
equipHandRight = getInput("equipHandRight");
|
||||||
equipHandLeft = getInput("equipHandLeft");
|
equipHandLeft = getInput("equipHandLeft");
|
||||||
equipShoes = getInput("equipShoes");
|
equipShoes = getInput("equipShoes");
|
||||||
|
@ -313,18 +313,10 @@ function updateUI(){
|
||||||
else
|
else
|
||||||
$("#inputarms").slideUp();
|
$("#inputarms").slideUp();
|
||||||
|
|
||||||
if(equipmentMode != "none"){
|
if(useEquipment)
|
||||||
$("#customequipment").slideDown();
|
$("#customequipment").slideDown();
|
||||||
if(equipmentMode == "1.9"){
|
else
|
||||||
$("#equipHandLeft").show();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$("#equipHandLeft").hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$("#customequipment").slideUp();
|
$("#customequipment").slideUp();
|
||||||
}
|
|
||||||
|
|
||||||
//Different colorinputs for armorparts
|
//Different colorinputs for armorparts
|
||||||
if(isLeatherArmor(equipShoes))
|
if(isLeatherArmor(equipShoes))
|
||||||
|
@ -403,20 +395,8 @@ function generateCode(){
|
||||||
if(rotation != 0)
|
if(rotation != 0)
|
||||||
tags.push("Rotation:["+rotation+"f]");
|
tags.push("Rotation:["+rotation+"f]");
|
||||||
|
|
||||||
//1.8 Equipment
|
// Equipment
|
||||||
if(equipmentMode == "1.8"){
|
if(useEquipment){
|
||||||
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"){
|
|
||||||
var armor = [];
|
var armor = [];
|
||||||
|
|
||||||
armor.push(getShoesItem());
|
armor.push(getShoesItem());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue