Package io.github.apfelcreme.Pipes.Pipe
Class Pipe
java.lang.Object
io.github.apfelcreme.Pipes.Pipe.Pipe
-
Constructor Summary
ConstructorDescriptionPipe
(LinkedHashMap<SimpleLocation, PipeInput> inputs, LinkedHashMap<SimpleLocation, PipeOutput> outputs, LinkedHashMap<SimpleLocation, ChunkLoader> chunkLoaders, LinkedHashSet<SimpleLocation> pipeBlocks, org.bukkit.Material type) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkLoaded
(SimpleLocation startLocation) boolean
returns the set of furnaces that are connected to a pipe that allows the server to load chunks if parts of the pipe are located in unloaded chunksgetInput
(SimpleLocation location) returns the pipe input object if there is one at the given locationreturns the set of inputsint
Get the last tick this pipe transferred somethingreturns the set of outputs which are connected to a sorterreturns the set of glass-blocks the pipe consists ofgetString
(org.bukkit.command.CommandSender player) returns a string with some info in itint
Get the amount of transfers in this transfer cycleorg.bukkit.Material
getType()
Get the type of this pipeint
hashCode()
void
highlight
(org.bukkit.entity.Player... players) displays particles around a pipevoid
setLastTransfer
(int lastTransfer) Set the last tick this pipe transferred somethingvoid
setTransfers
(int transfers) Set the amount of transfers in this transfer cycle
-
Constructor Details
-
Pipe
public Pipe(LinkedHashMap<SimpleLocation, PipeInput> inputs, LinkedHashMap<SimpleLocation, PipeOutput> outputs, LinkedHashMap<SimpleLocation, ChunkLoader> chunkLoaders, LinkedHashSet<SimpleLocation> pipeBlocks, org.bukkit.Material type)
-
-
Method Details
-
getInputs
returns the set of inputs- Returns:
- the set of inputs
-
getOutputs
returns the set of outputs which are connected to a sorter- Returns:
- the set of outputs
-
getChunkLoaders
returns the set of furnaces that are connected to a pipe that allows the server to load chunks if parts of the pipe are located in unloaded chunks- Returns:
- a set of chunk loaders
-
getPipeBlocks
returns the set of glass-blocks the pipe consists of- Returns:
- the set of pipe blocks
-
getInput
returns the pipe input object if there is one at the given location- Parameters:
location
- a SimpleLocation- Returns:
- a pipeinput
-
getType
public org.bukkit.Material getType()Get the type of this pipe- Returns:
- The type of the blocks this pipe consists of
-
getLastTransfer
public int getLastTransfer()Get the last tick this pipe transferred something- Returns:
- The tick number the last transfer happened
-
setLastTransfer
public void setLastTransfer(int lastTransfer) Set the last tick this pipe transferred something- Parameters:
lastTransfer
- The tick number the last transfer happened
-
getTransfers
public int getTransfers()Get the amount of transfers in this transfer cycle- Returns:
- the amount of transfers
-
setTransfers
public void setTransfers(int transfers) Set the amount of transfers in this transfer cycle- Parameters:
transfers
- the amount of transfers
-
highlight
public void highlight(org.bukkit.entity.Player... players) displays particles around a pipe- Parameters:
players
- The player to show the pipe to, none to show it to everyone
-
getString
returns a string with some info in it- Parameters:
player
- the player getting the string representation of this Pipe- Returns:
- a string with some info in it
-
equals
-
hashCode
public int hashCode() -
checkLoaded
- Throws:
ChunkNotLoadedException
-