Mojira Archive
BDS-18805

armadillo

import React, { useState } from "react";

import { StyleSheet, Text, View } from "react-native";

 

const App = () => {

  const [armorStand, setArmorStand] = useState(null);

 

  const handleArmorStandClick = () => {

    if (!armorStand)

{       const armorStand = new ArmorStand();       armorStand.setLocation(0, 0, 0);       armorStand.setRotation(0, 0, 0);       armorStand.setCustomName("Броненосець");       armorStand.setHealth(200);         // Додати броню       armorStand.setItemInHand(0, new ItemStack(Material.IRON_BARDING));       armorStand.setItemInOffHand(0, new ItemStack(Material.IRON_BARDING));         // Додати щит       armorStand.setItemInHand(1, new ItemStack(Material.SHIELD));         setArmorStand(armorStand);     }

else

{       armorStand.destroy();       setArmorStand(null);     }

  };

 

  return (

    <View style={styles.container}>

      <Text style={styles.title}>Броненосець</Text>

     

{armorStand && (         <View style=\{styles.armorStand}

>

          <Text style={styles.armorStandName}>{armorStand.customName}</Text>

        </View>

      )}

      <TouchableOpacity onPress={handleArmorStandClick}>

        <Text style={styles.button}>Створити броненосець</Text>

      </TouchableOpacity>

    </View>

  );

};

 

const styles = StyleSheet.create({

  container:

{     flex: 1,     alignItems: "center",     justifyContent: "center",   }

,

  title:

{     fontSize: 24,     fontWeight: "bold",   }

,

  armorStand:

{     position: "absolute",     top: 0,     left: 0,     width: 1,     height: 1,   }

,

  armorStandName:

{     fontSize: 16,     color: "white",   }

,

  button:

{     padding: 10,     backgroun dColor: "blue",     borderRadius: 5,   }

,

});

 

export default App;

Environment

React Native

Attachments1

Z165Dz9L.jpg
Z165Dz9L.jpg

Uzvar-u

Comments2

Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response

Can you please describe your issue in more detail? Recording of this issue occuring would be very helpful. If it exceeds file size limit you can use OneDrive or similar file hosting service and share link.

To make your bug report as effective as possible, please try and include the following steps to reproduce the problem:

Steps to Reproduce:
1.
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

 Quick Links:
📓 Bug Tracker Guidelines – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 BDS Wiki – 📖 FAQs

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

History3

Maciej Piornik
[MCQA] Kinga Izdebska
[MCQA] Kinga Izdebska

Resolution: UnresolvedIncomplete

Incomplete
Uzvar-u
0
1
Unconfirmed
1.20.15 Hotfix