Skip to content

Commit 63b1553

Browse files
Merge pull request #34 from WalshyDev/fix/issue-32
Fixes #32 and cleans up code a bit
2 parents df059da + bfb2aad commit 63b1553

File tree

12 files changed

+279
-185
lines changed

12 files changed

+279
-185
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ jobs:
1616
steps:
1717
- uses: actions/[email protected]
1818
- name: Set up JDK 1.8
19-
uses: actions/setup-java@v1.4.3
19+
uses: actions/setup-java@v2
2020
with:
21-
java-version: 1.8
21+
java-version: '8'
22+
distribution: 'adopt'
2223
- name: Build with Maven
2324
run: mvn package --file pom.xml

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
</resource>
5555
</resources>
5656

57-
5857
<plugins>
5958
<plugin>
6059
<groupId>org.apache.maven.plugins</groupId>
@@ -121,5 +120,12 @@
121120
<version>2.2.1</version>
122121
<scope>compile</scope>
123122
</dependency>
123+
124+
<dependency>
125+
<groupId>com.google.code.findbugs</groupId>
126+
<artifactId>jsr305</artifactId>
127+
<version>3.0.2</version>
128+
<scope>provided</scope>
129+
</dependency>
124130
</dependencies>
125131
</project>

src/main/java/io/github/thebusybiscuit/hotbarpets/HotbarPets.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void onEnable() {
4848
}
4949
}
5050

51-
category = new Category(new NamespacedKey(this, "pets"), new CustomItem(SkullItem.fromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjIxNjY4ZWY3Y2I3OWRkOWMyMmNlM2QxZjNmNGNiNmUyNTU5ODkzYjZkZjRhNDY5NTE0ZTY2N2MxNmFhNCJ9fX0="), "&dHotbar Pets", "", "&a> Click to open"));
51+
category = new Category(new NamespacedKey(this, "pets"), new CustomItem(PetTexture.CATEGORY.getAsItem(), "&dHotbar Pets", "", "&a> Click to open"));
5252

5353
// Add all the Pets via their Group class
5454
new FarmAnimals(this);

src/main/java/io/github/thebusybiscuit/hotbarpets/HotbarPetsRunnable.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class HotbarPetsRunnable implements Runnable {
1616
private final HotbarPet fish;
1717
private final HotbarPet goldenCow;
1818

19-
public HotbarPetsRunnable() {
19+
protected HotbarPetsRunnable() {
2020
chicken = (HotbarPet) SlimefunItem.getByID("HOTBAR_PET_CHICKEN");
2121
mooshroom = (HotbarPet) SlimefunItem.getByID("HOTBAR_PET_MOOSHROOM");
2222
fish = (HotbarPet) SlimefunItem.getByID("HOTBAR_PET_FISH");
@@ -29,7 +29,7 @@ public void run() {
2929
for (int i = 0; i < 9; ++i) {
3030
ItemStack item = p.getInventory().getItem(i);
3131

32-
if (item == null || item.getType() == null || item.getType() == Material.AIR) {
32+
if (item == null || item.getType() == Material.AIR) {
3333
continue;
3434
}
3535

@@ -40,17 +40,19 @@ public void run() {
4040
}
4141
} else if (isPet(item, mooshroom)) {
4242
if (mooshroom.checkAndConsumeFood(p)) {
43-
p.getInventory().addItem(new ItemStack(Material.MUSHROOM_STEM));
43+
p.getInventory().addItem(new ItemStack(Material.MUSHROOM_STEW));
4444
p.getWorld().playSound(p.getLocation(), Sound.ENTITY_COW_AMBIENT, 1.0F, 2.0F);
4545
}
4646
} else if (isPet(item, fish)) {
4747
if (fish.checkAndConsumeFood(p)) {
4848
p.getInventory().addItem(new ItemStack(Material.COOKED_COD));
4949
p.getWorld().playSound(p.getLocation(), Sound.BLOCK_WATER_AMBIENT, 1.0F, 2.0F);
5050
}
51-
} else if (isPet(item, goldenCow) && goldenCow.checkAndConsumeFood(p)) {
52-
p.getInventory().addItem(new ItemStack(Material.GOLD_INGOT));
53-
p.getWorld().playSound(p.getLocation(), Sound.ENTITY_COW_AMBIENT, 0.8F, 2.0F);
51+
} else if (isPet(item, goldenCow)) {
52+
if (goldenCow.checkAndConsumeFood(p)) {
53+
p.getInventory().addItem(new ItemStack(Material.GOLD_INGOT));
54+
p.getWorld().playSound(p.getLocation(), Sound.ENTITY_COW_AMBIENT, 0.8F, 2.0F);
55+
}
5456
}
5557
}
5658
}
@@ -59,5 +61,4 @@ public void run() {
5961
private boolean isPet(ItemStack item, HotbarPet pet) {
6062
return pet != null && SlimefunUtils.isItemSimilar(item, pet.getItem(), true);
6163
}
62-
6364
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
package io.github.thebusybiscuit.hotbarpets;
2+
3+
import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullItem;
4+
import org.bukkit.inventory.ItemStack;
5+
6+
import javax.annotation.Nonnull;
7+
8+
/**
9+
* This class holds the head hashes for all head textures.
10+
*
11+
* @author WalshyDev
12+
*/
13+
public enum PetTexture {
14+
15+
// Category
16+
CATEGORY("621668ef7cb79dd9c22ce3d1f3f4cb6e2559893b6df4a469514e667c16aa4"),
17+
18+
// Boss
19+
WITHER_PET("cdf74e323ed41436965f5c57ddf2815d5332fe999e68fbb9d6cf5c8bd4139f"),
20+
21+
// Farm Animals
22+
COW_PET("5d6c6eda942f7f5f71c3161c7306f4aed307d82895f9d2b07ab4525718edc5"),
23+
PIG_PET("621668ef7cb79dd9c22ce3d1f3f4cb6e2559893b6df4a469514e667c16aa4"),
24+
CHICKEN_PET("1638469a599ceef7207537603248a9ab11ff591fd378bea4735b346a7fae893"),
25+
MOOSHROOM_PET("d0bc61b9757a7b83e03cd2507a2157913c2cf016e7c096a4d6cf1fe1b8db"),
26+
GOLDEN_COW_PET("8d103358d8f1bdaef1214bfa77c4da641433186bd4bc44d857c16811476fe"),
27+
28+
// Hostile
29+
SPIDER_PET("f7a4c256f0df614231f8d55344c9de39389361a740c11facc0d299f676dd9a"),
30+
GHAST_PET("8b6a72138d69fbbd2fea3fa251cabd87152e4f1c97e5f986bf685571db3cc0"),
31+
SHULKER_PET("b1d3534d21fe8499262de87affbeac4d25ffde35c8bdca069e61e1787ff2f"),
32+
PHANTOM_PET("40b9189c3713f0dacac9b2bb6065090c52b0c90f108208e0a86be5885e99579a"),
33+
ENDERMAN_PET("7a59bb0a7a32965b3d90d8eafa899d1835f424509eadd4e6b709ada50b9cf"),
34+
MAGMA_CUBE_PET("38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429"),
35+
BLAZE_PET("62505be7796b7d78a717c3e65ea42bf211449fdb6d93f2b406a88ab71b70"),
36+
37+
// Passive
38+
IRON_GOLEM_PET("89091d79ea0f59ef7ef94d7bba6e5f17f2f7d4572c44f90f76c4819a714"),
39+
SLIME_PET("16ad20fc2d579be250d3db659c832da2b478a73a698b7ea10d18c9162e4d9b5"),
40+
41+
// Peaceful Animals
42+
FISH_PET("6f99b580d45a784e7a964e7d3b1f97cece74911173bd21c1d7c56acdc385ed5"),
43+
SQUID_PET("01433be242366af126da434b8735df1eb5b3cb2cede39145974e9c483607bac"),
44+
RABBIT_PET("ff1559194a175935b8b4fea6614bec60bf81cf524af6f564333c555e657bc"),
45+
DOLPHIN_PET("cefe7d803a45aa2af1993df2544a28df849a762663719bfefc58bf389ab7f5"),
46+
PANDA_PET("414ff627a6a6f35e1d717ebcb191e4c7f9097542db599e7108ae2c7dd3513e51"),
47+
48+
// Special
49+
PURPLICIOUS_COW_PET("3e1fc63d303eb5f366aecae6d250d4e2d779a9f5ef8deaff5b3bc95307ff9"),
50+
MR_COOKIE_SLIME_PET("16709d87e85d153bb883a23a5a883ee44ddb284d5318b780a16e82a9dac651"),
51+
PATRIOT_PET("78a5646c8473e1bf45513be4e6e8656050671b65133c0048d484e1bf0b46295f"),
52+
WALSHRUS_PET("c966f0ebd77f1bcd656fa2dc3ef0303e26a6a3de498c3999d39fdcacc5f5ad"),
53+
EYAMAZ_PET("18474f7a6c139f1ccd735a4677c0453c4befedfc89feda49ea886eb18ddf6cdf"),
54+
55+
// Utility
56+
ENDER_CHEST_PET("a6cc486c2be1cb9dfcb2e53dd9a3e9a883bfadb27cb956f1896d602b4067"),
57+
WORKBENCH_PET("4ad881d68547161aa7b2925e383778756bc67a75b444a586e515953ef83a9");
58+
59+
private final String hash;
60+
61+
PetTexture(@Nonnull String hash) {
62+
this.hash = hash;
63+
}
64+
65+
@Nonnull
66+
public String getHash() {
67+
return hash;
68+
}
69+
70+
@Nonnull
71+
@Override
72+
public String toString() {
73+
return this.hash;
74+
}
75+
76+
@Nonnull
77+
public ItemStack getAsItem() {
78+
return SkullItem.fromHash(getHash());
79+
}
80+
}

src/main/java/io/github/thebusybiscuit/hotbarpets/groups/BossMobs.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.thebusybiscuit.hotbarpets.groups;
22

3+
import io.github.thebusybiscuit.hotbarpets.PetTexture;
34
import org.bukkit.Material;
45
import org.bukkit.inventory.ItemStack;
56

@@ -24,17 +25,17 @@ public String getName() {
2425
@Override
2526
public void load(HotbarPets plugin) {
2627
// @formatter:off
27-
new EnderDragonPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_DRAGON", Material.DRAGON_HEAD, "&5Ender Dragon Pet", getName(), "&7Favourite Food: Eyes Of Ender", "", "&fRight-Click: &7Shoots Dragon Fireball & Gives Resistance"), new ItemStack(Material.ENDER_EYE), new ItemStack[]{
28-
new ItemStack(Material.PRISMARINE_CRYSTALS), new ItemStack(Material.DRAGON_BREATH), new ItemStack(Material.PRISMARINE_CRYSTALS),
29-
SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.DRAGON_HEAD), SlimefunItems.ENDER_LUMP_3,
30-
new ItemStack(Material.PRISMARINE_CRYSTALS), new ItemStack(Material.DRAGON_BREATH), new ItemStack(Material.PRISMARINE_CRYSTALS)
31-
}).register(plugin);
32-
33-
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_WITHER", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2RmNzRlMzIzZWQ0MTQzNjk2NWY1YzU3ZGRmMjgxNWQ1MzMyZmU5OTllNjhmYmI5ZDZjZjVjOGJkNDEzOWYifX19", "&8Wither Pet", getName(), "&7Favourite Food: Soul Sand", "", "&fImmune to Wither Effect"), new ItemStack(Material.SOUL_SAND), new ItemStack[]{
34-
new ItemStack(Material.COAL), new ItemStack(Material.WITHER_SKELETON_SKULL), new ItemStack(Material.COAL),
35-
new ItemStack(Material.SOUL_SAND), new ItemStack(Material.NETHER_STAR), new ItemStack(Material.SOUL_SAND),
36-
new ItemStack(Material.SOUL_SAND), SlimefunItems.GOLD_24K, new ItemStack(Material.SOUL_SAND)
37-
}).register(plugin);
28+
new EnderDragonPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_DRAGON", Material.DRAGON_HEAD, "&5Ender Dragon Pet", getName(), "&7Favourite Food: Eyes Of Ender", "", "&fRight-Click: &7Shoots Dragon Fireball & Gives Resistance"), new ItemStack(Material.ENDER_EYE), new ItemStack[]{
29+
new ItemStack(Material.PRISMARINE_CRYSTALS), new ItemStack(Material.DRAGON_BREATH), new ItemStack(Material.PRISMARINE_CRYSTALS),
30+
SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.DRAGON_HEAD), SlimefunItems.ENDER_LUMP_3,
31+
new ItemStack(Material.PRISMARINE_CRYSTALS), new ItemStack(Material.DRAGON_BREATH), new ItemStack(Material.PRISMARINE_CRYSTALS)
32+
}).register(plugin);
33+
34+
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_WITHER", PetTexture.WITHER_PET.getHash(), "&8Wither Pet", getName(), "&7Favourite Food: Soul Sand", "", "&fImmune to Wither Effect"), new ItemStack(Material.SOUL_SAND), new ItemStack[]{
35+
new ItemStack(Material.COAL), new ItemStack(Material.WITHER_SKELETON_SKULL), new ItemStack(Material.COAL),
36+
new ItemStack(Material.SOUL_SAND), new ItemStack(Material.NETHER_STAR), new ItemStack(Material.SOUL_SAND),
37+
new ItemStack(Material.SOUL_SAND), SlimefunItems.GOLD_24K, new ItemStack(Material.SOUL_SAND)
38+
}).register(plugin);
3839
// @formatter:on
3940
}
4041

src/main/java/io/github/thebusybiscuit/hotbarpets/groups/FarmAnimals.java

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.thebusybiscuit.hotbarpets.groups;
22

3+
import io.github.thebusybiscuit.hotbarpets.PetTexture;
34
import org.bukkit.Material;
45
import org.bukkit.inventory.ItemStack;
56

@@ -24,37 +25,37 @@ public String getName() {
2425
@Override
2526
public void load(HotbarPets plugin) {
2627
// @formatter:off
27-
SlimefunItemStack cow = new SlimefunItemStack("HOTBAR_PET_COW", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWQ2YzZlZGE5NDJmN2Y1ZjcxYzMxNjFjNzMwNmY0YWVkMzA3ZDgyODk1ZjlkMmIwN2FiNDUyNTcxOGVkYzUifX19", "&6Cow Pet", getName(), "&7Favourite Food: Wheat", "", "&fRight-Click: &7Removes negative Potion Effects");
28-
29-
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_PIG", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjIxNjY4ZWY3Y2I3OWRkOWMyMmNlM2QxZjNmNGNiNmUyNTU5ODkzYjZkZjRhNDY5NTE0ZTY2N2MxNmFhNCJ9fX0=", "&dPig Pet", getName(), "&7Favourite Food: Carrots", "", "&fBonus Saturation when eating", "&fAllows you to eat poisonous Food"), new ItemStack(Material.CARROT), new ItemStack[]{
30-
new ItemStack(Material.REDSTONE), new ItemStack(Material.CARROT), new ItemStack(Material.REDSTONE),
31-
new ItemStack(Material.PORKCHOP), new ItemStack(Material.DIAMOND), new ItemStack(Material.PORKCHOP),
32-
new ItemStack(Material.REDSTONE), SlimefunItems.GOLD_16K, new ItemStack(Material.REDSTONE)
33-
}).register(plugin);
34-
35-
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_CHICKEN", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTYzODQ2OWE1OTljZWVmNzIwNzUzNzYwMzI0OGE5YWIxMWZmNTkxZmQzNzhiZWE0NzM1YjM0NmE3ZmFlODkzIn19fQ==", "&fChicken Pet", getName(), "&7Favourite Food: Seeds", "", "&fGives you Eggs over time..."), new ItemStack(Material.WHEAT_SEEDS), new ItemStack[]{
36-
new ItemStack(Material.REDSTONE), new ItemStack(Material.FEATHER), new ItemStack(Material.REDSTONE),
37-
new ItemStack(Material.COOKED_CHICKEN), new ItemStack(Material.DIAMOND), new ItemStack(Material.COOKED_CHICKEN),
38-
new ItemStack(Material.REDSTONE), SlimefunItems.GOLD_16K, new ItemStack(Material.REDSTONE)
39-
}).register(plugin);
40-
41-
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_MOOSHROOM", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDBiYzYxYjk3NTdhN2I4M2UwM2NkMjUwN2EyMTU3OTEzYzJjZjAxNmU3YzA5NmE0ZDZjZjFmZTFiOGRiIn19fQ==", "&dMooshroom Pet", getName(), "&7Favourite Food: Red Mushrooms", "", "&fGives you Mushroom Stew over time..."), new ItemStack(Material.RED_MUSHROOM), new ItemStack[]{
42-
new ItemStack(Material.LAPIS_LAZULI), new ItemStack(Material.COOKED_BEEF), new ItemStack(Material.LAPIS_LAZULI),
43-
new ItemStack(Material.RED_MUSHROOM), new ItemStack(Material.DIAMOND), new ItemStack(Material.BROWN_MUSHROOM),
44-
new ItemStack(Material.LAPIS_LAZULI), SlimefunItems.GOLD_16K, new ItemStack(Material.LAPIS_LAZULI)
45-
}).register(plugin);
46-
47-
new CowPet(plugin.getCategory(), cow, new ItemStack(Material.WHEAT), new ItemStack[]{
48-
new ItemStack(Material.COAL), new ItemStack(Material.WHEAT), new ItemStack(Material.COAL),
49-
new ItemStack(Material.COOKED_BEEF), new ItemStack(Material.DIAMOND), new ItemStack(Material.COOKED_BEEF),
50-
new ItemStack(Material.COAL), SlimefunItems.GOLD_16K, new ItemStack(Material.COAL)
51-
}).register(plugin);
52-
53-
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_GOLDEN_COW", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOGQxMDMzNThkOGYxYmRhZWYxMjE0YmZhNzdjNGRhNjQxNDMzMTg2YmQ0YmM0NGQ4NTdjMTY4MTE0NzZmZSJ9fX0=", "&6Golden Cow Pet", getName(), "&7Favourite Food: Golden Carrots", "", "&fGives you Golden Ingots over time...", "&f(That means you have a net gain of 1 golden nugget)"), new ItemStack(Material.GOLDEN_CARROT), new ItemStack[]{
54-
new ItemStack(Material.GOLDEN_CARROT), new ItemStack(Material.GOLD_NUGGET), new ItemStack(Material.GOLDEN_CARROT),
55-
new ItemStack(Material.GOLD_NUGGET), cow, new ItemStack(Material.GOLD_NUGGET),
56-
new ItemStack(Material.GOLDEN_CARROT), new ItemStack(Material.GOLD_NUGGET), new ItemStack(Material.GOLDEN_CARROT)
57-
}).register(plugin);
28+
SlimefunItemStack cow = new SlimefunItemStack("HOTBAR_PET_COW", PetTexture.COW_PET.getHash(), "&6Cow Pet", getName(), "&7Favourite Food: Wheat", "", "&fRight-Click: &7Removes negative Potion Effects");
29+
30+
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_PIG", PetTexture.PIG_PET.getHash(), "&dPig Pet", getName(), "&7Favourite Food: Carrots", "", "&fBonus Saturation when eating", "&fAllows you to eat poisonous Food"), new ItemStack(Material.CARROT), new ItemStack[] {
31+
new ItemStack(Material.REDSTONE), new ItemStack(Material.CARROT), new ItemStack(Material.REDSTONE),
32+
new ItemStack(Material.PORKCHOP), new ItemStack(Material.DIAMOND), new ItemStack(Material.PORKCHOP),
33+
new ItemStack(Material.REDSTONE), SlimefunItems.GOLD_16K, new ItemStack(Material.REDSTONE)
34+
}).register(plugin);
35+
36+
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_CHICKEN", PetTexture.CHICKEN_PET.getHash(), "&fChicken Pet", getName(), "&7Favourite Food: Seeds", "", "&fGives you Eggs over time..."), new ItemStack(Material.WHEAT_SEEDS), new ItemStack[] {
37+
new ItemStack(Material.REDSTONE), new ItemStack(Material.FEATHER), new ItemStack(Material.REDSTONE),
38+
new ItemStack(Material.COOKED_CHICKEN), new ItemStack(Material.DIAMOND), new ItemStack(Material.COOKED_CHICKEN),
39+
new ItemStack(Material.REDSTONE), SlimefunItems.GOLD_16K, new ItemStack(Material.REDSTONE)
40+
}).register(plugin);
41+
42+
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_MOOSHROOM", PetTexture.MOOSHROOM_PET.getHash(), "&dMooshroom Pet", getName(), "&7Favourite Food: Red Mushrooms", "", "&fGives you Mushroom Stew over time..."), new ItemStack(Material.RED_MUSHROOM), new ItemStack[] {
43+
new ItemStack(Material.LAPIS_LAZULI), new ItemStack(Material.COOKED_BEEF), new ItemStack(Material.LAPIS_LAZULI),
44+
new ItemStack(Material.RED_MUSHROOM), new ItemStack(Material.DIAMOND), new ItemStack(Material.BROWN_MUSHROOM),
45+
new ItemStack(Material.LAPIS_LAZULI), SlimefunItems.GOLD_16K, new ItemStack(Material.LAPIS_LAZULI)
46+
}).register(plugin);
47+
48+
new CowPet(plugin.getCategory(), cow, new ItemStack(Material.WHEAT), new ItemStack[] {
49+
new ItemStack(Material.COAL), new ItemStack(Material.WHEAT), new ItemStack(Material.COAL),
50+
new ItemStack(Material.COOKED_BEEF), new ItemStack(Material.DIAMOND), new ItemStack(Material.COOKED_BEEF),
51+
new ItemStack(Material.COAL), SlimefunItems.GOLD_16K, new ItemStack(Material.COAL)
52+
}).register(plugin);
53+
54+
new HotbarPet(plugin.getCategory(), new SlimefunItemStack("HOTBAR_PET_GOLDEN_COW", PetTexture.GOLDEN_COW_PET.getHash(), "&6Golden Cow Pet", getName(), "&7Favourite Food: Golden Carrots", "", "&fGives you Golden Ingots over time...", "&f(That means you have a net gain of 1 golden nugget)"), new ItemStack(Material.GOLDEN_CARROT), new ItemStack[] {
55+
new ItemStack(Material.GOLDEN_CARROT), new ItemStack(Material.GOLD_NUGGET), new ItemStack(Material.GOLDEN_CARROT),
56+
new ItemStack(Material.GOLD_NUGGET), cow, new ItemStack(Material.GOLD_NUGGET),
57+
new ItemStack(Material.GOLDEN_CARROT), new ItemStack(Material.GOLD_NUGGET), new ItemStack(Material.GOLDEN_CARROT)
58+
}).register(plugin);
5859
// @formatter:on
5960
}
6061

0 commit comments

Comments
 (0)