Skip to content

Commit

Permalink
Merge pull request #13 from GorgeousOne/experimental
Browse files Browse the repository at this point in the history
Experimental
  • Loading branch information
GorgeousOne authored Mar 31, 2019
2 parents 761cebd + 8d2680e commit c95a44e
Show file tree
Hide file tree
Showing 64 changed files with 1,989 additions and 1,289 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ about: Create a report to help us improve the plugin
A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior for example:
1. Select a rectangle/ellipse somewhere
2. Run command "..."
Expand All @@ -24,4 +25,4 @@ If applicable, add screenshots to help explain your problem.
Name the Minecraft version your server is running on if you think the bug is version dependent.

**Additional context**
Add any other context about the problem here, e.g. other plugins that are involved in this bug.
Add any other context about the problem here, e.g. other plugins that are involved in this bug.
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
eclipse.preferences.version=1
encoding//src/me/gorgeousone/tangledmaze/core/TangledMain.java=UTF-8
encoding//src/me/gorgeousone/tangledmaze/data/Constants.java=UTF-8
encoding//src/me/gorgeousone/tangledmaze/data/Settings.java=UTF-8
63 changes: 63 additions & 0 deletions src/1.12_material_lists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
not-solid-materials:
- LEAVES
- BED_BLOCK
- CHEST
- SIGN_POST
- WOODEN_DOOR
- WALL_SIGN
- STONE_PLATE
- IRON_DOOR_BLOCK
- WOOD_PLATE
- CACTUS
- FENCE
- CAKE_BLOCK
- TRAP_DOOR
- IRON_FENCE
- FENCE_GATE
- NETHER_FENCE
- BREWING_STAND
- DRAGON_EGG
- ENDER_CHEST
- COBBLE_WALL
- ANVIL
- TRAPPED_CHEST
- GOLD_PLATE
- IRON_PLATE
- LEAVES_2
- IRON_TRAPDOOR
- STANDING_BANNER
- WALL_BANNER
- SPRUCE_FENCE_GATE
- BIRCH_FENCE_GATE
- JUNGLE_FENCE_GATE
- DARK_OAK_FENCE_GATE
- ACACIA_FENCE_GATE
- SPRUCE_FENCE
- BIRCH_FENCE
- JUNGLE_FENCE
- DARK_OAK_FENCE
- ACACIA_FENCE
- SPRUCE_DOOR
- BIRCH_DOOR
- JUNGLE_DOOR
- ACACIA_DOOR
- DARK_OAK_DOOR
replaceable-solid-materials:
- FENCE
- CAKE_BLOCK
- IRON_FENCE
- FENCE_GATE
- NETHER_FENCE
- COBBLE_WALL
- GOLD_PLATE
- IRON_PLATE
- SPRUCE_FENCE_GATE
- BIRCH_FENCE_GATE
- JUNGLE_FENCE_GATE
- DARK_OAK_FENCE_GATE
- ACACIA_FENCE_GATE
- SPRUCE_FENCE
- BIRCH_FENCE
- JUNGLE_FENCE
- DARK_OAK_FENCE
- ACACIA_FENCE
153 changes: 153 additions & 0 deletions src/1.13_material_lists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
not-solid-materials:
- ACACIA_DOOR
- ACACIA_FENCE
- ACACIA_FENCE_GATE
- ACACIA_LEAVES
- ACACIA_PRESSURE_PLATE
- ACACIA_TRAPDOOR
- ANVIL
- BIRCH_DOOR
- BIRCH_FENCE
- BIRCH_FENCE_GATE
- BIRCH_LEAVES
- BIRCH_PRESSURE_PLATE
- BIRCH_TRAPDOOR
- BLACK_BANNER
- BLACK_BED
- BLACK_WALL_BANNER
- BLUE_BANNER
- BLUE_BED
- BLUE_WALL_BANNER
- BREWING_STAND
- BROWN_BANNER
- BROWN_BED
- BROWN_WALL_BANNER
- CACTUS
- CAKE
- CHEST
- CHIPPED_ANVIL
- COBBLESTONE_WALL
- CONDUIT
- CYAN_BANNER
- CYAN_BED
- CYAN_WALL_BANNER
- DAMAGED_ANVIL
- DARK_OAK_DOOR
- DARK_OAK_FENCE
- DARK_OAK_FENCE_GATE
- DARK_OAK_LEAVES
- DARK_OAK_PRESSURE_PLATE
- DARK_OAK_TRAPDOOR
- DEAD_BRAIN_CORAL_FAN
- DEAD_BRAIN_CORAL_WALL_FAN
- DEAD_BUBBLE_CORAL_FAN
- DEAD_BUBBLE_CORAL_WALL_FAN
- DEAD_FIRE_CORAL_FAN
- DEAD_FIRE_CORAL_WALL_FAN
- DEAD_HORN_CORAL_FAN
- DEAD_HORN_CORAL_WALL_FAN
- DEAD_TUBE_CORAL_FAN
- DEAD_TUBE_CORAL_WALL_FAN
- DRAGON_EGG
- ENDER_CHEST
- GRAY_BANNER
- GRAY_BED
- GRAY_WALL_BANNER
- GREEN_BANNER
- GREEN_BED
- GREEN_WALL_BANNER
- HEAVY_WEIGHTED_PRESSURE_PLATE
- IRON_BARS
- IRON_DOOR
- IRON_TRAPDOOR
- JUNGLE_DOOR
- JUNGLE_FENCE
- JUNGLE_FENCE_GATE
- JUNGLE_LEAVES
- JUNGLE_PRESSURE_PLATE
- JUNGLE_TRAPDOOR
- LIGHT_BLUE_BANNER
- LIGHT_BLUE_BED
- LIGHT_BLUE_WALL_BANNER
- LIGHT_GRAY_BANNER
- LIGHT_GRAY_BED
- LIGHT_GRAY_WALL_BANNER
- LIGHT_WEIGHTED_PRESSURE_PLATE
- LIME_BANNER
- LIME_BED
- LIME_WALL_BANNER
- MAGENTA_BANNER
- MAGENTA_BED
- MAGENTA_WALL_BANNER
- MOSSY_COBBLESTONE_WALL
- NETHER_BRICK_FENCE
- OAK_DOOR
- OAK_FENCE
- OAK_FENCE_GATE
- OAK_LEAVES
- OAK_PRESSURE_PLATE
- OAK_TRAPDOOR
- ORANGE_BANNER
- ORANGE_BED
- ORANGE_WALL_BANNER
- PINK_BANNER
- PINK_BED
- PINK_WALL_BANNER
- PURPLE_BANNER
- PURPLE_BED
- PURPLE_WALL_BANNER
- RED_BANNER
- RED_BED
- RED_WALL_BANNER
- SIGN
- SPRUCE_DOOR
- SPRUCE_FENCE
- SPRUCE_FENCE_GATE
- SPRUCE_LEAVES
- SPRUCE_PRESSURE_PLATE
- SPRUCE_TRAPDOOR
- STONE_PRESSURE_PLATE
- TRAPPED_CHEST
- TURTLE_EGG
- WALL_SIGN
- WHITE_BANNER
- WHITE_BED
- WHITE_WALL_BANNER
- YELLOW_BANNER
- YELLOW_BED
- YELLOW_WALL_BANNER
replaceable-solid-materials:
- ACACIA_FENCE
- ACACIA_FENCE_GATE
- ACACIA_LEAVES
- ANVIL
- BIRCH_FENCE
- BIRCH_FENCE_GATE
- BIRCH_LEAVES
- CAKE
- COBBLESTONE_WALL
- DARK_OAK_FENCE
- DARK_OAK_FENCE_GATE
- DARK_OAK_LEAVES
- DEAD_BRAIN_CORAL_FAN
- DEAD_BRAIN_CORAL_WALL_FAN
- DEAD_BUBBLE_CORAL_FAN
- DEAD_BUBBLE_CORAL_WALL_FAN
- DEAD_FIRE_CORAL_FAN
- DEAD_FIRE_CORAL_WALL_FAN
- DEAD_HORN_CORAL_FAN
- DEAD_HORN_CORAL_WALL_FAN
- DEAD_TUBE_CORAL_FAN
- DEAD_TUBE_CORAL_WALL_FAN
- JUNGLE_FENCE
- JUNGLE_FENCE_GATE
- JUNGLE_LEAVES
- MOSSY_COBBLESTONE_WALL
- NETHER_BRICK_FENCE
- OAK_FENCE
- OAK_FENCE_GATE
- OAK_LEAVES
- SPRUCE_FENCE
- SPRUCE_FENCE_GATE
- SPRUCE_LEAVES
- TURTLE_EGG
6 changes: 6 additions & 0 deletions src/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: english
wand-item: gold_spade
maze:
maximum-pathwidth: 50
maximum-wallwidth: 50
maximum-wallheight: 100
33 changes: 33 additions & 0 deletions src/english.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
help-pages:
wand-command: This command gives you a mighty maze wand. Use it considerately! Click two blocks and a clipboard will appear with the equipped shape (rectangle or circle). By clicking and dragging a blue corner you can resize your clipboard. For starting over just click any other two blocks.
start-command: 'With this command you transform your clipboard into the floor plan of a maze. \n\nYou can add or cut away other clipboards from your floor plan with:'
discard-command: Discards your floor plan and your clipboard.
select-command: 'Lets you choose between different tools to edit floor plan of your maze. Following tools can be selected:'
tools:
rectangle: Your clipboards created with a wand will form rectangles.
circle: Your clipboards will form circles.
brush: Left click on the outline of your floor plan to reduce it at that block. Right click on the outline to expand it at that block.
exit: Click on the outline of your floor plan to set exits (or entrances, just how you see it). Click on an exit a second time to delete it again. The diamond exit indicates where the maze generator will begin building.
add-cut-command: 'Adds or cuts away your clipboard from your floor plan. This only works if the clipboard is touching your maze. If you cut off an area from the main part of your maze (with diamond exit) there won''t be generated any paths (just don''t). \n\nFor undoing these actions use:'
undo-command: Undoes the last change to your maze like adding or cutting a clipboar away or brushing.
pathwidth-wallwidth-wallheight-command: These three commands are for changing the width of maze paths and walls as well as the wall height for the generation in the end.
build-command: 'Builds your maze out of a mixture of blocks you enter. Just type in the name of each block (and &2":" &a+ &2a number &aif necessary), for example:\n &2"/maze build quartz_block:1" &a(that''s chiseled quartz) \nA constructed maze cannot be edited any further.'
teleport-command: Teleports you back to your maze (if you have the permission for that).
messages:
tool-switched: Switched tool to %tool%.
tool-for-floor-plan-only: This tool can only be used for a floor plan of a maze.
maze-pathwidth-changed: Path width set to %number% blocks.
maze-wallwidth-changed: Wall width set to %number% blocks.
maze-wallheight-changed: Wall height set to %number% blocks.
maze-building-started: Started building your maze.
errors:
insufficient-permission: You do not have the permission for this command.
clipboard-not-started: Please select an area with a maze wand first.
clipboard-not-finished: Please finish your clipboard first.
maze-not-started: Please start a maze first.
clipboard-not-touching-maze: Your clipboard does not seem to touch your maze.
no-maze-border-clicked: This block is not the border of your maze...
no-maze-exit-set: Please mark an exit at the border of your maze first.
no-build-blocks-specified: Please specify a block(s) from which your maze will be built.
argument-not-matching-block: '%block% is not a block name.'
number-not-valid: '%number% is not a valid number.'
26 changes: 18 additions & 8 deletions src/me/gorgeousone/tangledmaze/clip/Clip.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ public HashSet<Chunk> getBorderChunks() {
return (HashSet<Chunk>) borderChunks.clone();
}

public TreeSet<MazePoint> getFill() {
public TreeSet<MazePoint> getFilling() {
return fill;
}

public TreeSet<MazePoint> getBorder() {
return border;
}

public TreeSet<MazePoint> getFill(Chunk chunk) {
public TreeSet<MazePoint> getFilling(Chunk chunk) {
return getPointsInChunk(fill, chunk);
}

public TreeSet<MazePoint> getBorder(Chunk chunk) {
return getPointsInChunk(border, chunk);
}

public boolean addFill(MazePoint point) {
public boolean addFilling(MazePoint point) {

if (getWorld() != point.getWorld()) {
return false;
Expand All @@ -78,15 +78,15 @@ public boolean addFill(MazePoint point) {
size++;
return true;
}

return false;
}

public boolean removeFill(MazePoint point) {
public boolean removeFilling(MazePoint point) {

if(fill.remove(point)) {

if(getFill(point.getChunk()).isEmpty()) {
if(getFilling(point.getChunk()).isEmpty()) {
fillChunks.remove(point.getChunk());
}

Expand All @@ -97,7 +97,7 @@ public boolean removeFill(MazePoint point) {
return false;
}

public void removeFill(Collection<MazePoint> points) {
public void removeFilling(Collection<MazePoint> points) {

HashSet<Chunk> chunks = new HashSet<>();

Expand All @@ -111,7 +111,7 @@ public void removeFill(Collection<MazePoint> points) {

for(Chunk chunk : chunks) {

if(getFill(chunk).isEmpty()) {
if(getFilling(chunk).isEmpty()) {
fillChunks.remove(chunk);
}
}
Expand Down Expand Up @@ -168,10 +168,20 @@ public void removeBorder(Collection<MazePoint> points) {
}

public boolean contains(MazePoint point) {

if(point.getWorld() != getWorld()) {
return false;
}

return fill.contains(point);
}

public boolean borderContains(MazePoint point) {

if(point.getWorld() != getWorld()) {
return false;
}

return border.contains(point);
}

Expand Down
Loading

0 comments on commit c95a44e

Please sign in to comment.