Skip to content

Commit da6d38d

Browse files
committed
Fix edgecase in vines, update config and Readme
1 parent d18da03 commit da6d38d

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,27 @@ for the original idea and name!
1111
# Setup/Installation
1212

1313
Download the latest release and place it in your plugins folder. The config.yml is generated the first
14-
time the plugin is run with the server. You can also look at it
14+
time the plugin is run on the server. You can also look at it
1515
[here](https://github.com/pmdevita/CreeperHeal2/blob/master/src/main/resources/config.yml).
1616

1717
New versions of Minecraft past the currently supported version do work, with the exception that newly
1818
added blocks may not repair properly.
1919

20+
# Commands and Permissions
21+
22+
- `/ch warp` - `creeperheal2.warp` Immediately heal all currently tracked explosions
23+
- `/ch stats` - `creeperheal2.stats` View stats about currently tracked explosions
24+
- `/ch cancel` - `creeperheal2.cancel` Cancel replacement of currently tracked explosions (you will lose blocks so be careful)
25+
26+
2027
# Development Progress
2128

2229
This plugin is still in beta and while I would consider it safer than the original on
2330
modern servers, and it supports every block except those listed below, it still may fail to
2431
replace some structures with 100% accuracy. Blocks that aren't replaced properly should drop as
2532
items though.
2633

27-
Currently, the following blocks can not be replaced properly (they will drop as items)
34+
Currently, the following blocks cannot be replaced properly (they will drop as items)
2835
- Paintings
2936
- Item frames
3037
- Chorus plants

src/main/kotlin/net/pdevita/creeperheal2/utils/FindDependentBlock.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,18 @@ object OnTopOf: FindDependentBlock {
5050

5151
object Vine: FindDependentBlock {
5252
override fun reorient(state: BlockState): Location? {
53+
// Try to attach to a vine above first
54+
if (state.block.getRelative(BlockFace.UP).blockData.material == Material.VINE) {
55+
return state.block.getRelative(BlockFace.UP).location
56+
}
57+
// Otherwise try attaching to one of it's attached faces
5358
val multipleFacing = state.blockData as MultipleFacing
5459
for (face in multipleFacing.faces) {
5560
if (state.block.getRelative(face).blockData.material != Material.AIR) {
5661
return state.block.getRelative(face).location
5762
}
5863
}
64+
// Otherwise attach to block above
5965
if (state.block.getRelative(BlockFace.UP).blockData.material != Material.AIR) {
6066
return state.block.getRelative(BlockFace.UP).location
6167
}

src/main/resources/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ turbo-type: 0
3131

3232
# Constant Amount Turbo Settings
3333
# The number of blocks to replace in each replacement cycle (For reference, non-turbo is 1)
34-
# Raising this will slightly increase TPS impact
34+
# Raising this will slightly increase visible lag. Recommended <20
3535
turbo-amount: 3
3636

3737
# Percentage Turbo Settings

0 commit comments

Comments
 (0)