Update to 1.1.1.2
This commit is contained in:
parent
9507923f86
commit
5a70c8f072
5 changed files with 22 additions and 17 deletions
|
@ -5,7 +5,7 @@ plugins {
|
|||
}
|
||||
|
||||
version = "${myversion}"
|
||||
group = 'dev.zontreck.mcmods' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
group = 'dev.zontreck' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'WatchMyDurability'
|
||||
|
||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
||||
|
@ -135,9 +135,10 @@ dependencies {
|
|||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
||||
|
||||
implementation fg.deobf("dev.zontreck:libzontreck:1.0.0.1:dev")
|
||||
runtimeOnly fg.deobf("dev.zontreck:libzontreck:1.0.0.1")
|
||||
compileOnly fg.deobf("dev.zontreck:libzontreck:1.0.0.1:dev")
|
||||
implementation fg.deobf("dev.zontreck:libzontreck:${libz_version}:dev")
|
||||
runtimeOnly fg.deobf("dev.zontreck:libzontreck:${libz_version}")
|
||||
compileOnly fg.deobf("dev.zontreck:libzontreck:${libz_version}:dev")
|
||||
|
||||
// Real mod deobf dependency examples - these get remapped to your current mappings
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
|
||||
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
|
||||
|
|
|
@ -5,4 +5,5 @@ org.gradle.daemon=false
|
|||
|
||||
mc_version=1.19.2
|
||||
forge_version=43.1.16
|
||||
myversion = 1.1.1.1
|
||||
myversion=1.1.1.2
|
||||
libz_version=1.0.0.2
|
|
@ -55,13 +55,15 @@ public class CheckInventory extends TimerTask
|
|||
// Good to proceed
|
||||
if(current.shouldGiveAlert())
|
||||
{
|
||||
|
||||
Minecraft.getInstance().player.displayClientMessage(Component.literal(ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Red).set(ColorOptions.Bold).toString()+"You need to eat!"), false);
|
||||
String Msg = ChatColor.doColors("!Dark_Red!!bold!You need to eat!");
|
||||
Minecraft.getInstance().player.displayClientMessage(Component.literal(Msg), false);
|
||||
|
||||
SoundEvent sv = SoundEvents.WARDEN_ROAR;
|
||||
SoundEvent sv = SoundEvents.WARDEN_ROAR; // It sounds like a growling stomach
|
||||
Soundify(sv);
|
||||
}
|
||||
|
||||
WatchMyDurability.LastHealth=current;
|
||||
|
||||
}
|
||||
|
||||
public void PushItems(String type, List<ItemStack> stack)
|
||||
|
@ -111,7 +113,8 @@ public class CheckInventory extends TimerTask
|
|||
|
||||
SoundEvent theSound = SoundEvents.ITEM_BREAK;
|
||||
Soundify(theSound);
|
||||
|
||||
|
||||
|
||||
Component X = Component.literal(replaced);
|
||||
Minecraft.getInstance().player.displayClientMessage(X, false);
|
||||
break; // Rule applies, break out of this loop, move to next item.
|
||||
|
|
|
@ -2,8 +2,7 @@ package dev.zontreck.mcmods;
|
|||
|
||||
import com.mojang.logging.LogUtils;
|
||||
|
||||
import dev.zontreck.libzontreck.chat.ChatColorFactory;
|
||||
import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions;
|
||||
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||
import dev.zontreck.mcmods.configs.WMDClientConfig;
|
||||
import dev.zontreck.mcmods.gui.HeartsRenderer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -44,7 +43,8 @@ public class WatchMyDurability
|
|||
|
||||
public WatchMyDurability()
|
||||
{
|
||||
WMDPrefix = ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Gray).toString() + "[" + ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Green) + "WMD" + ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Gray) + "]";
|
||||
WatchMyDurability.WMDPrefix = ChatColor.doColors("!Dark_Gray![!Bold!!Dark_Green!WMD!Reset!!Dark_Gray!]!reset!");
|
||||
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
|
||||
// Register the commonSetup method for modloading
|
||||
|
@ -79,7 +79,7 @@ public class WatchMyDurability
|
|||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event)
|
||||
{
|
||||
LOGGER.info(": : : CLIENT SETUP : : :");
|
||||
LOGGER.info(WMDPrefix+": : : CLIENT SETUP : : :");
|
||||
// Some client setup code
|
||||
//LOGGER.info("HELLO FROM CLIENT SETUP");
|
||||
//LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
|
||||
|
@ -100,21 +100,21 @@ public class WatchMyDurability
|
|||
public static void onJoin(ClientPlayerNetworkEvent.LoggingIn event){
|
||||
// Joined
|
||||
//LOGGER.info("PLAYER LOGGED IN");
|
||||
LOGGER.info(": : : PLAYER LOGGED IN : : :");
|
||||
LOGGER.info(WMDPrefix+": : : PLAYER LOGGED IN : : :");
|
||||
WatchMyDurability.isInGame=true;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onLeave(ClientPlayerNetworkEvent.LoggingOut event){
|
||||
//LOGGER.info("PLAYER LOGGED OUT");
|
||||
LOGGER.info(": : : PLAYER LOGGED OUT : : :");
|
||||
LOGGER.info(WMDPrefix+": : : PLAYER LOGGED OUT : : :");
|
||||
WatchMyDurability.isInGame=false;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onClone(ClientPlayerNetworkEvent.Clone event)
|
||||
{
|
||||
LOGGER.info(": : : : PLAYER RESPAWNED OR MOVED TO A NEW WORLD : : : :");
|
||||
LOGGER.info(WMDPrefix+": : : : PLAYER RESPAWNED OR MOVED TO A NEW WORLD : : : :");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ modId="watchmydurability" #mandatory
|
|||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
||||
# see the associated build.gradle script for how to populate this completely automatically during a build
|
||||
version="1.1.1.1" #mandatory
|
||||
version="1.1.1.2" #mandatory
|
||||
# A display name for the mod
|
||||
displayName="Watch My Durability" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
||||
|
|
Reference in a new issue