Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<version>UNOFFICIAL</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -66,7 +66,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.5.1</version>

<configuration>

Expand Down Expand Up @@ -105,15 +105,14 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.slimefun</groupId>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-27</version>
<scope>provided</scope>
<version>experimental-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>io.github.baked-libs</groupId>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public final class ExoticGardenRecipeTypes {
private ExoticGardenRecipeTypes() {}

public static final RecipeType KITCHEN = new RecipeType(new NamespacedKey(ExoticGarden.instance, "kitchen"), new SlimefunItemStack("KITCHEN", Material.CAULDRON, "&eKitchen"), "", "&rThis item must be made", "&rin a Kitchen");
public static final RecipeType BREAKING_GRASS = new RecipeType(new NamespacedKey(ExoticGarden.instance, "breaking_grass"), new CustomItemStack(Material.GRASS, "&7Breaking Grass"));
public static final RecipeType HARVEST_TREE = new RecipeType(new NamespacedKey(ExoticGarden.instance, "harvest_tree"), new CustomItemStack(Material.OAK_LEAVES, "&aHarvesting a Tree", "", "&rYou can obtain this Item by", "&rharvesting the shown Tree"));
public static final RecipeType HARVEST_BUSH = new RecipeType(new NamespacedKey(ExoticGarden.instance, "harvest_bush"), new CustomItemStack(Material.OAK_LEAVES, "&aHarvesting a Bush", "", "&rYou can obtain this Item by", "&rharvesting the shown Bush"));
public static final RecipeType BREAKING_GRASS = new RecipeType(new NamespacedKey(ExoticGarden.instance, "breaking_grass"), CustomItemStack.create(ExoticGarden.grass, "&7Breaking Grass"));
public static final RecipeType HARVEST_TREE = new RecipeType(new NamespacedKey(ExoticGarden.instance, "harvest_tree"), CustomItemStack.create(Material.OAK_LEAVES, "&aHarvesting a Tree", "", "&rYou can obtain this Item by", "&rharvesting the shown Tree"));
public static final RecipeType HARVEST_BUSH = new RecipeType(new NamespacedKey(ExoticGarden.instance, "harvest_bush"), CustomItemStack.create(Material.OAK_LEAVES, "&aHarvesting a Bush", "", "&rYou can obtain this Item by", "&rharvesting the shown Bush"));

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public CustomFood(ItemGroup itemGroup, SlimefunItemStack item, ItemStack[] recip

@ParametersAreNonnullByDefault
public CustomFood(ItemGroup itemGroup, SlimefunItemStack item, int amount, ItemStack[] recipe, int food) {
super(itemGroup, item, ExoticGardenRecipeTypes.KITCHEN, true, recipe, new SlimefunItemStack(item, amount));
super(itemGroup, item, ExoticGardenRecipeTypes.KITCHEN, true, recipe, new SlimefunItemStack(item, amount).item());
this.food = food;
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import io.github.thebusybiscuit.slimefun4.libraries.dough.items.ItemUtils;
import io.github.thebusybiscuit.exoticgarden.ExoticGarden;

public class GrassSeeds extends SimpleSlimefunItem<ItemUseHandler> {

Expand All @@ -37,10 +38,10 @@ public ItemUseHandler getItemHandler() {
b.setType(Material.GRASS_BLOCK);

if (b.getRelative(BlockFace.UP).getType() == Material.AIR) {
b.getRelative(BlockFace.UP).setType(Material.GRASS);
b.getRelative(BlockFace.UP).setType(ExoticGarden.grass);
}

b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, Material.GRASS);
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, ExoticGarden.grass);
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Kitchen extends MultiBlockMachine {

@ParametersAreNonnullByDefault
public Kitchen(ExoticGarden plugin, ItemGroup itemGroup) {
super(itemGroup, new SlimefunItemStack("KITCHEN", Material.CAULDRON, "&eKitchen", "", "&a&oYou can make a bunch of different yummies here!", "&a&oThe result goes in the Furnace output slot"), new ItemStack[] { new CustomItemStack(Material.BRICK_STAIRS, "&oBrick Stairs (upside down)"), new CustomItemStack(Material.BRICK_STAIRS, "&oBrick Stairs (upside down)"), new ItemStack(Material.BRICKS), new ItemStack(Material.STONE_PRESSURE_PLATE), new ItemStack(Material.IRON_TRAPDOOR), new ItemStack(Material.BOOKSHELF), new ItemStack(Material.FURNACE), new ItemStack(Material.DISPENSER), new ItemStack(Material.CRAFTING_TABLE) }, new ItemStack[0], BlockFace.SELF);
super(itemGroup, new SlimefunItemStack("KITCHEN", Material.CAULDRON, "&eKitchen", "", "&a&oYou can make a bunch of different yummies here!", "&a&oThe result goes in the Furnace output slot"), new ItemStack[] { CustomItemStack.create(Material.BRICK_STAIRS, "&oBrick Stairs (upside down)"), CustomItemStack.create(Material.BRICK_STAIRS, "&oBrick Stairs (upside down)"), new ItemStack(Material.BRICKS), new ItemStack(Material.STONE_PRESSURE_PLATE), new ItemStack(Material.IRON_TRAPDOOR), new ItemStack(Material.BOOKSHELF), new ItemStack(Material.FURNACE), new ItemStack(Material.DISPENSER), new ItemStack(Material.CRAFTING_TABLE) }, new ItemStack[0], BlockFace.SELF);

this.plugin = plugin;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class MagicalEssence extends SlimefunItem {

@ParametersAreNonnullByDefault
public MagicalEssence(ItemGroup itemGroup, SlimefunItemStack item) {
super(itemGroup, item, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] { item, item, item, item, null, item, item, item, item });
super(itemGroup, item, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] { item.item(), item.item(), item.item(), item.item(), null, item.item(), item.item(), item.item(), item.item() });
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.Tag;
import org.bukkit.World;
Expand Down Expand Up @@ -305,7 +304,7 @@ public void onHarvest(BlockBreakEvent e) {
dropFruitFromTree(e.getBlock());
}

if (e.getBlock().getType() == Material.GRASS) {
if (e.getBlock().getType() == ExoticGarden.grass) {
if (!ExoticGarden.getGrassDrops().keySet().isEmpty() && e.getPlayer().getGameMode() != GameMode.CREATIVE) {
Random random = ThreadLocalRandom.current();

Expand Down Expand Up @@ -358,6 +357,7 @@ public void onInteract(PlayerInteractEvent e) {
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
if (e.getHand() != EquipmentSlot.HAND) return;
if (e.getPlayer().isSneaking()) return;
if (!ExoticGarden.isHarvestablePlant(e.getClickedBlock())) return;

if (Slimefun.getProtectionManager().hasPermission(e.getPlayer(), e.getClickedBlock().getLocation(), Interaction.BREAK_BLOCK)) {
ItemStack item = ExoticGarden.harvestPlant(e.getClickedBlock());
Expand Down Expand Up @@ -390,7 +390,7 @@ public void onBonemealPlant(BlockFertilizeEvent e) {

if (item instanceof BonemealableItem && ((BonemealableItem) item).isBonemealDisabled()) {
e.setCancelled(true);
b.getWorld().spawnParticle(Particle.VILLAGER_ANGRY, b.getLocation().clone().add(0.5, 0, 0.5), 4);
b.getWorld().spawnParticle(ExoticGarden.angryVillager, b.getLocation().clone().add(0.5, 0, 0.5), 4);
b.getWorld().playSound(b.getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 1);
}
}
Expand Down