forked from PaperMC/paperweight-test-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store custom multiblocks in a JSON file
- Loading branch information
1 parent
865de2e
commit b7919a8
Showing
5 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
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
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
28 changes: 28 additions & 0 deletions
28
src/main/java/net/slqmy/template_paper_plugin/custom_multiblock/StoredCustomMultiblock.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.slqmy.template_paper_plugin.custom_multiblock; | ||
|
||
import java.util.List; | ||
import java.util.Map.Entry; | ||
|
||
import net.slqmy.template_paper_plugin.util.types.BlockLocation; | ||
|
||
public class StoredCustomMultiblock { | ||
private final List<List<BlockLocation>> blockLocations; | ||
private final CustomMultiblock multiblockId; | ||
|
||
public List<List<BlockLocation>> getBlockLocations() { | ||
return blockLocations; | ||
} | ||
|
||
public CustomMultiblock getMultiblockId() { | ||
return multiblockId; | ||
} | ||
|
||
public StoredCustomMultiblock(List<List<BlockLocation>> blockLocations, CustomMultiblock multiblockId) { | ||
this.blockLocations = blockLocations; | ||
this.multiblockId = multiblockId; | ||
} | ||
|
||
public StoredCustomMultiblock(Entry<CustomMultiblock, AbstractCustomMultiblock> multiblockInfo) { | ||
this(multiblockInfo.getValue().getMultiblocks(), multiblockInfo.getKey()); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/net/slqmy/template_paper_plugin/custom_multiblock/StoredCustomMultiblocks.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package net.slqmy.template_paper_plugin.custom_multiblock; | ||
|
||
import java.util.List; | ||
|
||
public class StoredCustomMultiblocks { | ||
private List<StoredCustomMultiblock> storedCustomMultiblocks; | ||
|
||
public List<StoredCustomMultiblock> getStoredCustomMultiblocks() { | ||
return storedCustomMultiblocks; | ||
} | ||
|
||
public void addCustomMultiblock(StoredCustomMultiblock addedCustomMultiblocks) { | ||
storedCustomMultiblocks.add(addedCustomMultiblocks); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |