generated from Slimefun/Addon-Template
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix(StardustMeteor): Fix #52, Make it extend UnplaceableBlock inste…
…ad of implementing the interface
- Loading branch information
1 parent
7560aca
commit 9f27da6
Showing
1 changed file
with
73 additions
and
73 deletions.
There are no files selected for viewing
146 changes: 73 additions & 73 deletions
146
src/main/java/me/profelements/dynatech/items/misc/StarDustMeteor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
package me.profelements.dynatech.items.misc; | ||
|
||
import org.bukkit.NamespacedKey; | ||
import org.bukkit.World.Environment; | ||
import org.bukkit.block.Biome; | ||
import org.bukkit.inventory.ItemStack; | ||
|
||
import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource; | ||
import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable; | ||
import me.mrCookieSlime.Slimefun.Lists.RecipeType; | ||
import me.mrCookieSlime.Slimefun.Objects.Category; | ||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; | ||
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; | ||
import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullItem; | ||
import me.profelements.dynatech.DynaTech; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class StarDustMeteor extends SlimefunItem implements NotPlaceable, GEOResource { | ||
|
||
public static final SlimefunItemStack STARDUST_METEOR = new SlimefunItemStack( | ||
"STARDUST_METEOR", | ||
SkullItem.fromHash("c482d1ba4bdac990f6ea987703587fd79fe55555363251984679d4f279cc0c2a"), | ||
"&6Stardust Meteor", | ||
"", | ||
"&fGeomined from Mountain or Badlands Biomes" | ||
); | ||
|
||
private final NamespacedKey key = new NamespacedKey(DynaTech.getInstance(), "stardust_meteor"); | ||
|
||
public StarDustMeteor(Category category) { | ||
super(category, STARDUST_METEOR, RecipeType.GEO_MINER, new ItemStack[0]); | ||
register(); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public NamespacedKey getKey() { | ||
return key; | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public ItemStack getItem() { | ||
return STARDUST_METEOR.clone(); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getName() { | ||
return "Stardust Meteor"; | ||
} | ||
|
||
@Override | ||
public boolean isObtainableFromGEOMiner() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public int getDefaultSupply(@Nonnull Environment environment, @Nonnull Biome biome) { | ||
if (biome == Biome.MOUNTAINS || biome == Biome.BADLANDS) { | ||
return 16; | ||
} else { | ||
return 0; | ||
} | ||
} | ||
|
||
@Override | ||
public int getMaxDeviation() { | ||
return 4; | ||
} | ||
|
||
} | ||
package me.profelements.dynatech.items.misc; | ||
|
||
import org.bukkit.NamespacedKey; | ||
import org.bukkit.World.Environment; | ||
import org.bukkit.block.Biome; | ||
import org.bukkit.inventory.ItemStack; | ||
|
||
import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource; | ||
import io.github.thebusybiscuit.slimefun4.implementation.items.blocks.UnplaceableBlock; | ||
import me.mrCookieSlime.Slimefun.Lists.RecipeType; | ||
import me.mrCookieSlime.Slimefun.Objects.Category; | ||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; | ||
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; | ||
import me.mrCookieSlime.Slimefun.cscorelib2.skull.SkullItem; | ||
import me.profelements.dynatech.DynaTech; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class StarDustMeteor extends UnplaceableBlock implements GEOResource { | ||
|
||
public static final SlimefunItemStack STARDUST_METEOR = new SlimefunItemStack( | ||
"STARDUST_METEOR", | ||
SkullItem.fromHash("c482d1ba4bdac990f6ea987703587fd79fe55555363251984679d4f279cc0c2a"), | ||
"&6Stardust Meteor", | ||
"", | ||
"&fGeomined from Mountain or Badlands Biomes" | ||
); | ||
|
||
private final NamespacedKey key = new NamespacedKey(DynaTech.getInstance(), "stardust_meteor"); | ||
|
||
public StarDustMeteor(Category category) { | ||
super(category, STARDUST_METEOR, RecipeType.GEO_MINER, new ItemStack[0]); | ||
register(); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public NamespacedKey getKey() { | ||
return key; | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public ItemStack getItem() { | ||
return STARDUST_METEOR.clone(); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getName() { | ||
return "Stardust Meteor"; | ||
} | ||
|
||
@Override | ||
public boolean isObtainableFromGEOMiner() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public int getDefaultSupply(@Nonnull Environment environment, @Nonnull Biome biome) { | ||
if (biome == Biome.MOUNTAINS || biome == Biome.BADLANDS) { | ||
return 16; | ||
} else { | ||
return 0; | ||
} | ||
} | ||
|
||
@Override | ||
public int getMaxDeviation() { | ||
return 4; | ||
} | ||
|
||
} |