Skip to content

Commit

Permalink
1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Oct 22, 2023
1 parent 12cbf17 commit 49925b4
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 111 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=com.mineinabyss
version=0.20
idofrontVersion=0.18.26
version=0.21
idofrontVersion=0.19.14
4 changes: 2 additions & 2 deletions gradle/staminaLibs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
geary = "0.25-SNAPSHOT"
bonehurtingjuice = "1.9.2"
geary = "0.26.0"
bonehurtingjuice = "1.10.0"

[libraries]
geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "geary" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
103 changes: 82 additions & 21 deletions src/main/kotlin/com/mineinabyss/staminaclimb/config/StaminaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,86 @@ import org.bukkit.Material

@Serializable
class StaminaConfig(
val airTime: Long,
val staminaRegen: Float,
val staminaRegenInAir: Float,
val staminaRemovePerTick: Float,
val staminaRemoveWhileMoving: Float,
val staminaRemoveWhileOnLadder: Float,
val baseBarColor: Color,
val baseOverlay: Overlay,
val barRed: Float,
val barBlink1: Float,
val barBlink2: Float,
val barBlinkSpeed1: Float,
val barBlinkSpeed2: Float,
val maxFallDist: Double,
val jumpCooldown: Long,
val roofClimbDifficulty: Float,
val walljumpCooldown: Long,
val climbBlacklist: List<Material>,
val climbBlacklistGeneral: List<String>,
val climbDifficulty: Map<Material, Float> = mapOf(),
val climbDifficultyGeneral: Map<String, Float> = mapOf()
val airTime: Long = 400,
val staminaRegen: Float = 0.01f,
val staminaRegenInAir: Float = 0.003f,
val staminaRemovePerTick: Float = 0.005f,
val staminaRemoveWhileMoving: Float = 0.005f,
val staminaRemoveWhileOnLadder: Float = 0.01f,
val baseBarColor: Color = Color.GREEN,
val baseOverlay: Overlay = Overlay.NOTCHED_10,
val barRed: Float = 0.02f,
val barBlink1: Float = 0.3f,
val barBlink2: Float = 0.1f,
val barBlinkSpeed1: Float = 120f,
val barBlinkSpeed2: Float = 20f,
val maxFallDist: Double = 5.0,
val jumpCooldown: Long = 300,
val walljumpCooldown: Long = 300,
val roofClimbDifficulty: Float = 7.0f,
val climbBlacklist: Set<Material> = setOf(
Material.BEACON,
Material.BARREL,
Material.CAMPFIRE,
Material.CARTOGRAPHY_TABLE,
Material.CAULDRON,
Material.COMMAND_BLOCK,
Material.COMPOSTER,
Material.CRAFTING_TABLE,
Material.BREWING_STAND,
Material.DAYLIGHT_DETECTOR,
Material.DISPENSER,
Material.DROPPER,
Material.ENCHANTING_TABLE,
Material.ENDER_CHEST,
Material.FARMLAND,
Material.GRINDSTONE,
Material.HOPPER,
Material.HOPPER_MINECART,
Material.ITEM_FRAME,
Material.LANTERN,
Material.LECTERN,
Material.LEVER,
Material.LOOM,
Material.NOTE_BLOCK,
Material.SCAFFOLDING,
Material.SMOKER,
Material.SMITHING_TABLE,
Material.STONECUTTER,
Material.SWEET_BERRY_BUSH,
Material.BEEHIVE,
Material.BEE_NEST,
Material.ANVIL,
Material.CHIPPED_ANVIL,
Material.DAMAGED_ANVIL
),
val climbBlacklistGeneral: Set<String> = setOf(
"DOOR",
"FENCE",
"FURNACE",
"_BED",
"BELL",
"CHEST",
"BUTTON",
"SIGN",
"SHULKER_BOX"
),
val climbDifficulty: Map<Material, Float> = mapOf(
Material.SAND to 2f,
Material.BARRIER to -1f,
Material.COBBLESTONE to 0.8f,
Material.ICE to 5f,
Material.PACKED_ICE to 4f,
Material.BLUE_ICE to 4f,
Material.SLIME_BLOCK to 0.5f,
Material.HONEY_BLOCK to -1f,
),
val climbDifficultyGeneral: Map<String, Float> = mapOf(
"WOOD" to 0.3f,
"LOG" to 0.3f,
"SMOOTH" to 5f,
"FENCE" to 0.5f,
"DOOR" to -1f,
"GLASS" to -1f
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import com.mineinabyss.staminaclimb.nms.Tags
class StaminaPaperModule(
override val plugin: StaminaClimbPlugin
) : StaminaClimbModule {
override val configHolder: IdofrontConfig<StaminaConfig> = config("config") {
plugin.fromPluginPath(loadDefault = true)
}
override val configHolder: IdofrontConfig<StaminaConfig> =
config("config", plugin.dataFolder.toPath(), StaminaConfig())
override val config: StaminaConfig by configHolder
override val emptyClimbableMap = Tags.createEmptyClimbableMap()
override val normalClimbableMap = Tags.createNormalClimbableMap()
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/com/mineinabyss/staminaclimb/nms/Tags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import it.unimi.dsi.fastutil.ints.IntArrayList
import it.unimi.dsi.fastutil.ints.IntList
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
import net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket
import net.minecraft.network.protocol.common.ClientboundUpdateTagsPacket
import net.minecraft.resources.ResourceLocation
import net.minecraft.tags.BlockTags
import net.minecraft.tags.TagNetworkSerialization.NetworkPayload
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer
import org.bukkit.entity.Player

object Tags {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import com.mineinabyss.staminaclimb.nms.Tags.createPayload
import kotlinx.coroutines.delay
import net.kyori.adventure.bossbar.BossBar
import net.minecraft.core.registries.Registries
import net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket
import net.minecraft.network.protocol.common.ClientboundUpdateTagsPacket
import org.bukkit.Bukkit
import org.bukkit.GameMode.ADVENTURE
import org.bukkit.GameMode.SURVIVAL
import org.bukkit.Location
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer
import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
Expand Down
78 changes: 0 additions & 78 deletions src/main/resources/config.yml

This file was deleted.

0 comments on commit 49925b4

Please sign in to comment.