Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Time-Dependent Attack Damage in Sword
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
d3us

[1.12.2] Time-Dependent Attack Damage in Sword

By d3us, November 14, 2020 in Modder Support

  • Start new topic

Recommended Posts

d3us    0

d3us

d3us    0

  • Tree Puncher
  • d3us
  • Members
  • 0
  • 4 posts
Posted November 14, 2020 (edited)

Hi, so I'm trying to make a sword that has an attack damage dependant on the world time.

From what I understand, it is too early to get the world time as early as the preInit, so I was thinking of initially setting the "timeAD" to something irrelevant, then replacing it with the actual "time attack damage" after the getWorldTime() is callable.

This is my first mod, so how do I do that?

 

The mechanic that I'm trying to achieve is the sword having the following attack damage: 0 at midnight, increasing tick by tick towards 50 at noon, then decreasing back to 0.

image.png

Edited November 14, 2020 by d3us

Share this post


Link to post
Share on other sites

ChampionAsh5357    160

ChampionAsh5357

ChampionAsh5357    160

  • World Shaper
  • ChampionAsh5357
  • Members
  • 160
  • 1019 posts
Posted November 14, 2020

The supported versions are in the blue banner above. Please update to one of those versions mentioned to receive support.

  • Thanks 1

Share this post


Link to post
Share on other sites

diesieben07    7595

diesieben07

diesieben07    7595

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7595
  • 55079 posts
Posted November 14, 2020

1.12 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • rennmaus
      gradlew build file too small

      By rennmaus · Posted 2 minutes ago

      Hey, I'm sorry for my bad english, isn't the best. I've coded a small mod in eclipse with forge gradle, but when i export it, the file is just 8kb small. My Launcher notice the mod, but do not add the crafting recipes etc. Can anyone help me please? Before i started coding, i typed in the command line: ./gradlew eclipse and it worked...   Christian
    • Shinzu🖤
      Ive been trying to make my own server and whenever i run the command that microsoft/minecraft gave me it just says the following

      By Shinzu🖤 · Posted 3 minutes ago

      Ive been trying to make my own server and whenever i run the command that microsoft/minecraft gave me it just says the following
    • diesieben07
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By diesieben07 · Posted 38 minutes ago

      Then you need an IItemHandler that combines the default slots (call super.getCapability to get them) and your own.
    • Klarks
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks · Posted 53 minutes ago

      To get my itemhandler.i need to get default living entity slots and my custom slots
    • diesieben07
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By diesieben07 · Posted 57 minutes ago

      That's an infinite loop. Why are you overriding getCapability at all?
  • Topics

    • rennmaus
      0
      gradlew build file too small

      By rennmaus
      Started 3 minutes ago

    • Shinzu🖤
      0
      Ive been trying to make my own server and whenever i run the command that microsoft/minecraft gave me it just says the following

      By Shinzu🖤
      Started 4 minutes ago

    • Klarks
      13
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks
      Started 5 hours ago

    • Fars3O_
      1
      Minecraft forge not fully loading

      By Fars3O_
      Started 5 hours ago

    • BastouP
      3
      [1.16.4] Get Overworld save directory

      By BastouP
      Started 15 hours ago

  • Who's Online (See full list)

    • loordgek
    • rennmaus
    • Aďas
    • night_charm
    • Shinzu🖤
    • Danebi
    • Klarks
    • diesieben07
    • Wintersky20
    • joaofm
    • GhostAkil
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.12.2] Time-Dependent Attack Damage in Sword
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community