Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Trigonaut

Trigonaut

Members
 View Profile  See their activity
  • Content Count

    3
  • Joined

    December 8, 2020
  • Last visited

    January 18

Community Reputation

0 Neutral

About Trigonaut

  • Rank
    Tree Puncher
  1. Trigonaut

    Changing how difficulty affects damage

    Trigonaut posted a topic in Modder Support

    I am trying to change the way damage to the player is affected by the game's difficulty. At the beginning of the vanilla PlayerEntity.attackEntityFrom() method (where these calculations are normally applied), there is a Forge hook for a LivingAttackEvent, but it doesn't seem offer any way to change the damage being dealt by that attack. I could probably accomplish what I'm looking for by copying all of the code from PlayerEntity.attackEntityFrom() and LivingEntity.attackEntityFrom(). into my subscribed method, but there must be a better way. How best can I override/bypass the formulas for when a player is damaged at different difficulties?
    • December 30, 2020
  2. Trigonaut

    Modded shield item 'blocking' model predicate.

    Trigonaut posted a topic in Modder Support

    I am trying to add a new type of shield, but its json model does not seem to respect the 'blocking' predicate even though the item extends ShieldItem. How should I make the blocking predicate set to 1 when the shield is used, like the vanilla shield?
    • December 29, 2020
    • 1 reply
  3. Trigonaut

    [1.16] Problem Emulating Player Right-Click

    Trigonaut posted a topic in Modder Support

    I am trying to create an entity which mimics the player using an item (placing a block, using a bucket, etc.). I have a class VirtualPlayerEntity extends PlayerEntity, which is passed into the onItemRightClick method for the item my entity is holding. My problem arises when that item is an empty bucket, used on a fluid block. In the onItemRightClick method for the BucketItem class I get the error: <com.trigonaut.mod.entity.VirtualPlayerEntity cannot be cast to net.minecraft.entity.player.ServerPlayerEntity> caused by the FILLED_BUCKET criteria trigger. How do I make VirtualPlayerEntity able to cast to ServerPlayerEntity? (preferably without extending it) Is there a better way to emulate a player right-click? How do other mods create this functionality? Attached is my VirtualPlayerEntity class. VirtualPlayerEntity.java
    • December 8, 2020
    • 1 reply
  • All Activity
  • Home
  • Trigonaut
  • Theme

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