Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configs for annoying Kami features #40

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.21'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
}


Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public final class ConfigHandler {
public static int netherDimensionID;
public static int endDimensionID;
public static int bedrockDimensionID = 19;
public static boolean shouldKamiLegsDoLightFeature = false;
public static boolean shouldKamiBootsDoGrass = true;

public static int soulHeartHeight;

Expand Down Expand Up @@ -228,6 +230,16 @@ public static void loadConfig(File configFile) {
-1023,
1023,
"The Dimension ID for the End, leave at 1 if you don't modify it with another mod/plugin.");
shouldKamiLegsDoLightFeature = config.getBoolean(
"Kami Leggings Light Placing Feature Enabled",
"general.kami",
shouldKamiLegsDoLightFeature,
"Sets if Legs of the Burning Mantle (Awakened Kami leggings) will do the effect where it places lights near you.");
shouldKamiBootsDoGrass = config.getBoolean(
"Kami Boots Dirt into Grass Feature Enabled",
"general.kami",
shouldKamiBootsDoGrass,
"Sets if Boots of the Horizontal Shield (Awakened Kami Boots) will do the effect where dirt under you turns into grass.");
}

LibEnchantIDs.idAscentBoost = loadEnchant(LibEnchantNames.ASCENT_BOOST, LibEnchantIDs.idAscentBoost);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ void tickPlayer(EntityPlayer player) {
player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F;
player.fallDistance = 0F;

int x = (int) player.posX;
int y = (int) player.posY - 1;
int z = (int) player.posZ;
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
if (ConfigHandler.shouldKamiBootsDoGrass) {
int x = (int) player.posX;
int y = (int) player.posY - 1;
int z = (int) player.posZ;
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ void tickPlayer(EntityPlayer player) {

if (player.isBurning()) player.heal(0.5F);
addPotionEffect(player, Potion.fireResistance, 119, -1);
setNearBrightNitor(player);
if (ConfigHandler.shouldKamiLegsDoLightFeature) {
setNearBrightNitor(player);
}
}
}

Expand Down