Record Class BossBarView
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.bossbar.BossBarView
- Record Components:
event- the bar as the game keeps it: name, colour, overlay, the server's progressstyle- the style it is drawn inentity- the entity it belongs to, while it is loaded here; null if none was given, or it is out of sightprogress- how full it is, 0 to 1, eased smoothly towards the server'strail- what it was a moment ago, 0 to 1, at leastprogress: hold it a moment after a hit, then drain it, to show what was losthurt- how freshly it was hit, 1 the moment of a hit falling to 0 over half a secondtime- ticks since the bar appeared, with the partial tick, for animating it
public record BossBarView(net.minecraft.world.BossEvent event, net.minecraft.resources.Identifier style, @Nullable net.minecraft.world.entity.Entity entity, float progress, float trail, float hurt, float time)
extends Record
A boss bar as a
BossBarRenderer draws it this frame: what the game knows of it, and what CoolCatLib keeps
for drawing it well.-
Constructor Summary
ConstructorsConstructorDescriptionBossBarView(net.minecraft.world.BossEvent event, net.minecraft.resources.Identifier style, @Nullable net.minecraft.world.entity.Entity entity, float progress, float trail, float hurt, float time) Creates an instance of aBossBarViewrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.entity.Entityentity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.BossEventevent()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.floathurt()Returns the value of thehurtrecord component.net.minecraft.network.chat.Componentname()floatprogress()Returns the value of theprogressrecord component.net.minecraft.resources.Identifierstyle()Returns the value of thestylerecord component.floattime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.floattrail()Returns the value of thetrailrecord component.
-
Constructor Details
-
BossBarView
public BossBarView(net.minecraft.world.BossEvent event, net.minecraft.resources.Identifier style, @Nullable @Nullable net.minecraft.world.entity.Entity entity, float progress, float trail, float hurt, float time) Creates an instance of aBossBarViewrecord class.- Parameters:
event- the value for theeventrecord componentstyle- the value for thestylerecord componententity- the value for theentityrecord componentprogress- the value for theprogressrecord componenttrail- the value for thetrailrecord componenthurt- the value for thehurtrecord componenttime- the value for thetimerecord component
-
-
Method Details
-
name
public net.minecraft.network.chat.Component name() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
event
-
style
-
entity
-
progress
-
trail
-
hurt
-
time
-