Skip to content

Commit

Permalink
Fixed Solar Generators
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBusyBiscuit committed Mar 7, 2020
1 parent fac8ed1 commit c8208fa
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import org.bukkit.Location;
import org.bukkit.inventory.ItemStack;

import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Objects.Category;
Expand All @@ -11,7 +13,7 @@
import me.mrCookieSlime.Slimefun.Objects.handlers.GeneratorTicker;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;

public abstract class SolarGenerator extends SimpleSlimefunItem<GeneratorTicker> {
public abstract class SolarGenerator extends SimpleSlimefunItem<GeneratorTicker> implements EnergyNetComponent {

public SolarGenerator(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe);
Expand All @@ -38,6 +40,16 @@ public double getNightEnergy() {
return 0;
}

@Override
public EnergyNetComponentType getEnergyComponentType() {
return EnergyNetComponentType.GENERATOR;
}

@Override
public int getCapacity() {
return 0;
}

@Override
public GeneratorTicker getItemHandler() {
return new GeneratorTicker() {
Expand Down

0 comments on commit c8208fa

Please sign in to comment.