Skip to content

Commit

Permalink
Fix cargo dupe (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 authored Jul 8, 2023
1 parent 65938f0 commit 4461f8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>

<configuration>
<minimizeJar>true</minimizeJar>
Expand Down Expand Up @@ -101,7 +101,7 @@
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>a86446e236</version>
<version>RC-35</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.DistinctiveItem;
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
Expand All @@ -44,7 +45,7 @@
*
* @author TheBusyBiscuit
*/
public class MobEgg<T extends LivingEntity> extends SimpleSlimefunItem<ItemUseHandler> implements NotPlaceable {
public class MobEgg<T extends LivingEntity> extends SimpleSlimefunItem<ItemUseHandler> implements NotPlaceable, DistinctiveItem {

private final MobAdapter<T> adapter;

Expand Down Expand Up @@ -135,4 +136,8 @@ protected boolean canPlaceMob(Player p, Location l) {
return Slimefun.getProtectionManager().hasPermission(p, l, Interaction.PLACE_BLOCK);
}

@Override
public boolean canStack(@Nonnull ItemMeta sfItemMeta, @Nonnull ItemMeta itemMeta) {
return sfItemMeta.getPersistentDataContainer().equals(itemMeta.getPersistentDataContainer());
}
}

0 comments on commit 4461f8d

Please sign in to comment.