-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #216.
- Loading branch information
Showing
16 changed files
with
103 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
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
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
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
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
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,25 @@ | ||
package juuxel.adorn.lib | ||
|
||
import juuxel.adorn.AdornCommon | ||
import net.minecraft.stat.StatFormatter | ||
import net.minecraft.stat.Stats | ||
import net.minecraft.util.Identifier | ||
|
||
object AdornStats { | ||
val OPEN_DRAWER: Identifier = register("open_drawer", StatFormatter.DEFAULT) | ||
val OPEN_KITCHEN_CUPBOARD: Identifier = register("open_kitchen_cupboard", StatFormatter.DEFAULT) | ||
val INTERACT_WITH_SHELF: Identifier = register("interact_with_shelf", StatFormatter.DEFAULT) | ||
val INTERACT_WITH_TABLE_LAMP: Identifier = register("interact_with_table_lamp", StatFormatter.DEFAULT) | ||
val INTERACT_WITH_TRADING_STATION: Identifier = register("interact_with_trading_station", StatFormatter.DEFAULT) | ||
val DYE_TABLE_LAMP: Identifier = register("dye_table_lamp", StatFormatter.DEFAULT) | ||
val DYE_SOFA: Identifier = register("dye_sofa", StatFormatter.DEFAULT) | ||
val SIT_ON_CHAIR: Identifier = register("sit_on_chair", StatFormatter.DEFAULT) | ||
val SIT_ON_SOFA: Identifier = register("sit_on_sofa", StatFormatter.DEFAULT) | ||
val SIT_ON_BENCH: Identifier = register("sit_on_bench", StatFormatter.DEFAULT) | ||
|
||
private fun register(id: String, formatter: StatFormatter) = | ||
Stats.register("${AdornCommon.NAMESPACE}:$id", formatter) | ||
|
||
fun init() { | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,21 +1,28 @@ | ||
package juuxel.adorn.platform.forge | ||
|
||
import juuxel.adorn.AdornCommon | ||
import juuxel.adorn.lib.AdornStats | ||
import juuxel.adorn.platform.PlatformBridges | ||
import juuxel.adorn.platform.forge.client.AdornClient | ||
import net.minecraftforge.api.distmarker.Dist | ||
import net.minecraftforge.fml.DistExecutor | ||
import net.minecraftforge.fml.DistExecutor.SafeRunnable | ||
import net.minecraftforge.fml.common.Mod | ||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent | ||
import thedarkcolour.kotlinforforge.forge.FORGE_BUS | ||
import thedarkcolour.kotlinforforge.forge.MOD_BUS | ||
|
||
@Mod(AdornCommon.NAMESPACE) | ||
object Adorn { | ||
init { | ||
PlatformBridges.configManager.init() | ||
MOD_BUS.addListener(this::init) | ||
EventsImplementedInJava().register(MOD_BUS, FORGE_BUS) | ||
DistExecutor.safeRunWhenOn(Dist.CLIENT) { SafeRunnable(AdornClient::init) } | ||
// TODO: Compat.init(MOD_BUS) | ||
} | ||
|
||
private fun init(event: FMLCommonSetupEvent) { | ||
AdornStats.init() | ||
} | ||
} |