-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changed mace recipe - Mod is now configurable - Wind Bounce is no longer built-in to the mace and is now a treasure enchantment (can be changed in config) - (Disabled by default) New charged Wind Bounce launches you double the height for double the durability (sneak while using Wind Bounce) - Compatibility with Enchantment Lore mod
- Loading branch information
Showing
18 changed files
with
293 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package com.kckarnige.wham.config; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import net.treset.vanillaconfig.config.*; | ||
import net.treset.vanillaconfig.config.base.BaseConfig; | ||
import net.treset.vanillaconfig.config.managers.SaveLoadManager; | ||
import net.treset.vanillaconfig.screen.ConfigScreen; | ||
|
||
public class MainConfig { | ||
static PageConfig configPage; | ||
static PageConfig clientPage; | ||
static PageConfig serverPage; | ||
static ConfigScreen configScreen; | ||
static ConfigScreen clientConfigScreen; | ||
static ConfigScreen serverConfigScreen; | ||
public static ButtonConfig CLIENT_CONFIG; | ||
public static ButtonConfig SERVER_CONFIG; | ||
|
||
public static BooleanConfig MACE_MODEL; | ||
public static BooleanConfig MACE_WINDU; | ||
public static BooleanConfig MACE_WINDU_4EVS; | ||
public static BooleanConfig DEFAULT_BOUNCE; | ||
public static BooleanConfig BIG_BOUNCE; | ||
|
||
|
||
public static void init() { | ||
configPage = new PageConfig("config.wham"); | ||
clientPage = new PageConfig("config.wham.client"); | ||
serverPage = new PageConfig("config.wham.server"); | ||
CLIENT_CONFIG = new ButtonConfig("config.wham.client_button"); | ||
SERVER_CONFIG = new ButtonConfig("config.wham.server_button"); | ||
|
||
MACE_MODEL = new BooleanConfig(true, "config.wham.3d_mace"); | ||
MACE_WINDU = new BooleanConfig(true, "config.wham.mace_wind_toggle"); | ||
MACE_WINDU_4EVS = new BooleanConfig(false, "config.wham.mace_4ever_wind"); | ||
|
||
DEFAULT_BOUNCE = new BooleanConfig(false, "config.wham.wind_bounce_default", "config.wham.wind_bounce_default.description"); | ||
BIG_BOUNCE = new BooleanConfig(false, "config.wham.toggle_charge_bounce", "config.wham.toggle_charge_bounce.description"); | ||
|
||
configPage.setOptions(new BaseConfig[]{ | ||
CLIENT_CONFIG, | ||
SERVER_CONFIG | ||
}); | ||
clientPage.setOptions(new BaseConfig[]{ | ||
MACE_MODEL, | ||
MACE_WINDU, | ||
MACE_WINDU_4EVS | ||
}); | ||
serverPage.setOptions(new BaseConfig[]{ | ||
BIG_BOUNCE, | ||
DEFAULT_BOUNCE | ||
}); | ||
|
||
clientPage.setSaveName("client"); | ||
clientPage.setPath("wham_config"); | ||
serverPage.setSaveName("server"); | ||
serverPage.setPath("wham_config"); | ||
|
||
configScreen = new ConfigScreen(configPage, MinecraftClient.getInstance().currentScreen); | ||
clientConfigScreen = new ConfigScreen(clientPage, MinecraftClient.getInstance().currentScreen); | ||
serverConfigScreen = new ConfigScreen(serverPage, MinecraftClient.getInstance().currentScreen); | ||
|
||
|
||
|
||
SaveLoadManager.globalSaveConfig(clientPage); | ||
MACE_MODEL.onChange(MainConfig::onBooleanConfigChanged); | ||
CLIENT_CONFIG.onClickL(MainConfig::onClientButtonClick); | ||
SERVER_CONFIG.onClickL(MainConfig::onServerButtonClick); | ||
|
||
} | ||
|
||
private static void onClientButtonClick(String s) { | ||
MinecraftClient.getInstance().setScreen(clientConfigScreen); | ||
} | ||
|
||
private static void onServerButtonClick(String s) { | ||
MinecraftClient.getInstance().setScreen(serverConfigScreen); | ||
} | ||
|
||
static void onBooleanConfigChanged(boolean prevBoolean, String name) { | ||
if (!MainConfig.MACE_MODEL.getBoolean()) { | ||
MainConfig.MACE_WINDU_4EVS.setEditable(false); | ||
MainConfig.MACE_WINDU.setEditable(false); | ||
} else { | ||
MainConfig.MACE_WINDU_4EVS.setEditable(true); | ||
MainConfig.MACE_WINDU.setEditable(true); | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/kckarnige/wham/config/ModMenuConfig.java
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,16 @@ | ||
package com.kckarnige.wham.config; | ||
|
||
import com.terraformersmc.modmenu.api.ConfigScreenFactory; | ||
import com.terraformersmc.modmenu.api.ModMenuApi; | ||
import net.minecraft.client.gui.screen.Screen; | ||
|
||
public class ModMenuConfig implements ModMenuApi { | ||
|
||
public ConfigScreenFactory<?> getModConfigScreenFactory() { | ||
return this::OpenConfig; | ||
} | ||
|
||
public Screen OpenConfig (Screen parent) { | ||
return MainConfig.configScreen; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/kckarnige/wham/enchantments/WhamEnchantment.java
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,17 @@ | ||
package com.kckarnige.wham.enchantments; | ||
|
||
import net.minecraft.enchantment.Enchantment; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class WhamEnchantment { | ||
public static final RegistryKey<Enchantment> WIND_BOUNCE = of("wind_bounce"); | ||
|
||
private static RegistryKey<Enchantment> of(String name) { | ||
return RegistryKey.of(RegistryKeys.ENCHANTMENT, Identifier.of("wham", name)); | ||
} | ||
|
||
public static void initialize() { | ||
} | ||
} |
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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,3 +1,23 @@ | ||
{ | ||
"item.wham.mace_head": "Mace Head" | ||
"item.wham.mace_head": "Mace Head", | ||
"enchantment.wham.wind_bounce": "Wind Bounce", | ||
|
||
"config.wham": "Wham! Config", | ||
"config.wham.client": "Wham! Config > Client-Side", | ||
"config.wham.server": "Wham! Config > Server-Side", | ||
"config.wham.client_button": "Client Config", | ||
"config.wham.server_button": "Server Config", | ||
|
||
"config.wham.3d_mace": "Use 3D Mace Model", | ||
"config.wham.mace_wind_toggle": "Display Wind on 3D Mace Model", | ||
"config.wham.mace_4ever_wind": "Always Display Wind on Mace", | ||
|
||
"config.wham.toggle_charge_bounce": "Enable 'Charge Bounce'", | ||
"config.wham.toggle_charge_bounce.description": "Perform a 'Wind Bounce' while sneaking to 'Charge Bounce'.", | ||
|
||
"config.wham.wind_bounce_default": "Use 'Wind Bounce' Without Enchant", | ||
"config.wham.wind_bounce_default.description": "Enables the Mace's ability to 'Wind Bounce' even without the enchantment. The enchantment is still obtainable and does still work as intended.", | ||
|
||
"enchantment_lore.wham:wind_bounce.lore": "Within this ancient tome lies the stories of an ancient civilization which took pride in the powers and gifts brought by the airs and winds, this was the same civilization responsible for the first documented discovery of the Breeze.\n\nEven though this book has hundreds of pages, it's lighter than a feather.", | ||
"enchantment_lore.wham:wind_bounce.description": "§nWind Bounce§r\n\nMax Level: II\n\nCompatible with: Mace\n\nUsing the mace on the ground launches the wielder into the air, doing so does a considerable amount of damage to the mace.\n\nUsing while crouched will have the wielder launch higher, and deal double the damage to the mace.\n\nThe higher the level the less damage the mace takes when using this ability." | ||
} |
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,3 +1,23 @@ | ||
{ | ||
"item.wham.mace_head": "Mace Head" | ||
"item.wham.mace_head": "Mace Head", | ||
"enchantment.wham.wind_bounce": "Wind Bounce", | ||
|
||
"config.wham": "Wham! Config", | ||
"config.wham.client": "Wham! Config > Client-Side", | ||
"config.wham.server": "Wham! Config > Server-Side", | ||
"config.wham.client_button": "Client Config", | ||
"config.wham.server_button": "Server Config", | ||
|
||
"config.wham.3d_mace": "Use 3D Mace Model", | ||
"config.wham.mace_wind_toggle": "Display Wind on 3D Mace Model", | ||
"config.wham.mace_4ever_wind": "Always Display Wind on Mace", | ||
|
||
"config.wham.toggle_charge_bounce": "Enable 'Charge Bounce'", | ||
"config.wham.toggle_charge_bounce.description": "Perform a 'Wind Bounce' while sneaking to 'Charge Bounce'.", | ||
|
||
"config.wham.wind_bounce_default": "Use 'Wind Bounce' Without Enchant", | ||
"config.wham.wind_bounce_default.description": "Enables the Mace's ability to 'Wind Bounce' even without the enchantment. The enchantment is still obtainable and does still work as intended.", | ||
|
||
"enchantment_lore.wham:wind_bounce.lore": "Within this ancient tome lies the stories of an ancient civilization which took pride in the powers and gifts brought by the airs and winds, this was the same civilization responsible for the first documented discovery of the Breeze.\n\nEven though this book has hundreds of pages, it's lighter than a feather.", | ||
"enchantment_lore.wham:wind_bounce.description": "§nWind Bounce§r\n\nMax Level: II\n\nCompatible with: Mace\n\nUsing the mace on the ground launches the wielder into the air, doing so does a considerable amount of damage to the mace.\n\nUsing while crouched will have the wielder launch higher, and deal double the damage to the mace.\n\nThe higher the level the less damage the mace takes when using this ability." | ||
} |
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
Oops, something went wrong.