Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class CustomMob extends MinecraftMob{
- String name;
- String type;
- String hostility;
- String colour;
- Scanner keyboard = new Scanner(System.in);
- public CustomMob(String name, String type, String hostility, String colour){
- this.name = name;
- this.type = type;
- this.hostility = hostility;
- this.colour = colour;
- }
- public String getName(){
- return name;
- }
- public String getType(){
- return type;
- }
- public String getHostility(){
- return hostility;
- }
- public String getColour(){
- return colour;
- }
- public String changeName(){
- Scanner keyboard = new Scanner(System.in);
- System.out.println("What would you like the new name to be?");
- name = keyboard.next();
- return name;
- }
- public String changeType(){
- System.out.println("What would you like the new type to be?");
- type = keyboard.next();
- return type;
- }
- public String changeColour(){
- System.out.println("What would you like the new colour to be?");
- colour = keyboard.next();
- return colour;
- }
- public String changeHostility(){
- System.out.println("What new hostility would you like? 1) Friendly, 2) Passive, 3) Hostile");
- Integer choice = keyboard.nextInt();
- if (choice == 1) {
- hostility = "friendly";
- } else if (choice == 2){
- hostility = "passive";
- } else if (choice == 3){
- hostility = "hostile";
- }
- return hostility;
- }
- public static void main(String[] args){
- Scanner keyboard = new Scanner(System.in);
- System.out.println("Welcome to the Custom Mob Creator");
- System.out.println("Input your new Mobs name.");
- String newName = keyboard.next();
- System.out.println("Input your new Mobs type.");
- String newType = keyboard.next();
- System.out.println("Input your new Mobs colour.");
- String newColour = keyboard.next();
- System.out.println("Input your new Mobs location.");
- String newLocation = keyboard.next();
- }
- }
- import java.util.ArrayList;
- import java.util.Scanner;
- public class MinecraftMob {
- String location;
- public String getLocation(){
- return location;
- }
- public String changeLocation(){
- ArrayList<String> biomes = new ArrayList<>();
- biomes.add("1) Plains");
- biomes.add("2) Water");
- biomes.add("3) Underground");
- biomes.add("4) The Nether");
- biomes.add("5) The End");
- for (int x = 0; x < biomes.size(); x++){
- System.out.println(biomes.get(x));
- }
- System.out.println("Choose the location for your new Mob.");
- Scanner keyboard = new Scanner(System.in);
- int location = keyboard.nextInt();
- if (location == 1) {
- return biomes.get(0);
- } else if (location == 2) {
- return biomes.get(1);
- } else if (location == 3){
- return biomes.get(2);
- } else if (location == 4){
- return biomes.get(3);
- } else if (location == 5){
- return biomes.get(4);
- }
- }
- }
Add Comment
Please, Sign In to add comment