Implemented transfering between two Solarpanels
This commit is contained in:
@@ -6,9 +6,9 @@ import com.hypixel.hytale.server.core.plugin.JavaPlugin;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.ChunkStore;
|
||||
import org.KaiFlo.SolarCell.Commands.ExampleCommand;
|
||||
import org.KaiFlo.SolarCell.Components.EnergySource.Implementations.SolarCellComponent;
|
||||
import org.KaiFlo.SolarCell.Systems.EnergySource.SolarCellInitializer;
|
||||
import org.KaiFlo.SolarCell.Systems.EnergySource.SolarCellTickingSystem;
|
||||
import org.KaiFlo.SolarCell.Components.EnergySource.Implementations.EnergySourceComponent;
|
||||
import org.KaiFlo.SolarCell.Systems.EnergySource.EnergySourceInitializerSystem;
|
||||
import org.KaiFlo.SolarCell.Systems.EnergySource.EnergyProducerTickingSystem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SolarCellPlugin extends JavaPlugin {
|
||||
|
||||
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();
|
||||
|
||||
private ComponentType<ChunkStore, SolarCellComponent> solarCellComponentType;
|
||||
private ComponentType<ChunkStore, EnergySourceComponent> solarCellComponentType;
|
||||
|
||||
public SolarCellPlugin(@Nonnull JavaPluginInit init) {
|
||||
super(init);
|
||||
@@ -34,16 +34,16 @@ public class SolarCellPlugin extends JavaPlugin {
|
||||
instance = this;
|
||||
LOGGER.atInfo().log("Setting up plugin " + this.getName());
|
||||
|
||||
solarCellComponentType = this.getChunkStoreRegistry().registerComponent(SolarCellComponent.class, "SolarCell", SolarCellComponent.CODEC);
|
||||
solarCellComponentType = this.getChunkStoreRegistry().registerComponent(EnergySourceComponent.class, "SolarCell", EnergySourceComponent.CODEC);
|
||||
|
||||
this.getCommandRegistry().registerCommand(new ExampleCommand(this.getName(), this.getManifest().getVersion().toString()));
|
||||
|
||||
this.getChunkStoreRegistry().registerSystem(new SolarCellInitializer());
|
||||
this.getChunkStoreRegistry().registerSystem(new SolarCellTickingSystem());
|
||||
this.getChunkStoreRegistry().registerSystem(new EnergySourceInitializerSystem());
|
||||
this.getChunkStoreRegistry().registerSystem(new EnergyProducerTickingSystem());
|
||||
|
||||
}
|
||||
|
||||
public ComponentType<ChunkStore, SolarCellComponent> getSolarCellComponentType() {
|
||||
public ComponentType<ChunkStore, EnergySourceComponent> getSolarCellComponentType() {
|
||||
return solarCellComponentType;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user