From 1cf7ec74bd60e33b14a16eb0d43250a7313a4b41 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 18 Mar 2022 10:05:30 +0000 Subject: [PATCH] Changes/fixes --- .../com/willfp/ecocrates/crate/Crate.kt | 4 ++++ .../ecocrates/crate/placed/PlacedCrate.kt | 5 +++- .../core-plugin/src/main/resources/crates.yml | 23 ++++++++++--------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/Crate.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/Crate.kt index cee41e6..57dbc6a 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/Crate.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/Crate.kt @@ -404,6 +404,10 @@ class Crate( override fun hashCode(): Int { return Objects.hash(this.id) } + + override fun toString(): String { + return "Crate{id=$id}" + } } private val openingCrates = mutableSetOf() diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/placed/PlacedCrate.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/placed/PlacedCrate.kt index 5fd3651..7baa0fa 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/placed/PlacedCrate.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/crate/placed/PlacedCrate.kt @@ -24,7 +24,6 @@ class PlacedCrate( crate.hologramFrames.firstOrNull()?.lines ?: emptyList() ) - private var currentFrameTick = 0 private var currentFrame: HologramFrame? = null private var item: Item? = null @@ -86,4 +85,8 @@ class PlacedCrate( animation.spawnParticle(location, tick, particle) } } + + override fun toString(): String { + return "PlacedCrate{crate=$crate,location=$location}" + } } diff --git a/eco-core/core-plugin/src/main/resources/crates.yml b/eco-core/core-plugin/src/main/resources/crates.yml index f52e9dd..753a96e 100644 --- a/eco-core/core-plugin/src/main/resources/crates.yml +++ b/eco-core/core-plugin/src/main/resources/crates.yml @@ -8,14 +8,15 @@ crates: rows: 6 mask: items: + - gray_stained_glass_pane - black_stained_glass_pane pattern: - - "111111111" - - "100000001" - - "100000001" - - "100000001" - - "100000001" - - "111111111" + - "222222222" + - "211010112" + - "201010102" + - "201010102" + - "201111102" + - "222222222" key: item: tripwire_hook unbreaking:1 hide_enchants name:"&aDemo Crate Key" @@ -106,7 +107,7 @@ crates: name: "&bDiamond" item: diamond lore: [ ] - row: 2 + row: 3 column: 2 - id: emerald @@ -123,8 +124,8 @@ crates: name: "&aEmerald" item: emerald lore: [ ] - row: 2 - column: 3 + row: 4 + column: 2 - id: bedrock commands: [ ] @@ -140,5 +141,5 @@ crates: name: "very cool demo bedrock" item: bedrock lore: [ ] - row: 2 - column: 4 + row: 5 + column: 2