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

Update 20250104 - Full Ballista Implementation #26

Merged
merged 1 commit into from
Jan 4, 2025
Merged

Conversation

Virus5600
Copy link
Owner

Fully implemented the Ballista Turret along with some major changes to the base Turret entity class and minor updates to the Cannon Turret.

Some standardizations and abstractions are also done to allow the current turrets and future turrets to have shorter codes.

[CHANGELOG]
🟢 Added my PayPal to my FUNDING.yml file.
🟢 Added the Ballista Turret's model, renderer, and entity classes along with its geo model and animation files.
🟢 Created a base Renderer class for all turrets, allowing turret renderers to just extend to this class and override the defaults.
🟢 Added a new Map property for the Cannon Turret entity that will now be implemented against all future turret implementation. This property defines all the offset points the turret uses such as the Cannon Turret's fuse and barrel offsets.
🟢 Added a new property for the Turret Entity base class which stores the attack goal of a turret, allowing for the attack goal to be called and be used for other processes such as defining a point in its attack cooldown when to use particles and such.
🟢 Added a new property for Turret Entity base class that defines how many barrels and what barrel is to be used next when shooting a projectile.
🟢 Added an overload for "getRelativePos" method of Turret Entity to now support Vec3d parameter.
🟢 Added an overridable method; "getMinAttackRange" and "getMaxAttackRange" which returns a float value that represents the turret's attack range in meters (1 meter = 1 full block).
🟢 Added an abstract method which returns a list of barrels the turret have when called.
🟢 Added several new overridable methods as well that sets the projectile velocity, along with a dependent method "shoot" that shoots the set projectile for the turret. This allows the shooting to be streamlined and even allow the entity to shoot when there's no target entity.
🟢 Added a local class for Turret Entity base class, which defines a velocity calculation for projectiles. See its documentation for more information.
🟢 Added the Ballista Turret's item counterpart, along with its parts.
🟢 Added Ballista Turret's item tooltips.
🟢 Added a minimum range for Cannon Turrets; set at 3 blocks.
🟢 Added a natural armor for the Cannon Turret; set at 3 armor points and 2 armor toughness.
🟢 Added a new method called "isWithinRange" which determines whether the provided entity or XYZ coordinates is within the minimum and maximum range of the turret.
🟢 Added a new block that is tied to the Ballista Turret's crafting recipe: Arrowhead, a block that inflicts damage when stepped on.
🟢 Added a new registry method for items so that blocks can be registered as items.
🟢 Added a DamageType registrey key fetcher in the Registry Utility class.
🟢 Moved the standard attributes to the Turret Entity base class for reusability. Check its javadocs for more information.
🟢 Moved the standard goals to the Turret Entity base class for reusability. Goals can still be overridden by calling "super.initGoals" method before adding the override goals. The attack goal can now be left null for the base class to set it. See its javadocs for more information.
🟢 Added several new text entries in the English lang file.
🟢 Added the Arrowhead to the "traps" block tag.
🟢 Added the Arrowhead to the list of damage types that could bypass armors.
🟢 Added both the cannonball and ballista arrow to the projectiles tag list.
🟢 Added ballista to the turret tag list.
🟡 Updated the Cannon Turret renderer class to extend the newly created base Turret Renderer class.
🟡 Updated the forgotten commented out code for Cannon Base item's fuel registry.
🟡 Refactored the custom Projectile Attack goal class to now support minimum range. Some variable names are also changed to easily understand what they do.
🟡 Overriden the "getPierceLevel" method of Ballista Arrow's superclass, allowing the projectile to now pierce entities once more. It now also accounts for armor protection.
🟡 Refactored Ballista Arrow entity's entity hit velocity calculations
🟡 Changed the order of declared parameters for Cannonball's entity constructor from "(World, LivingEntity)" to "(LivingEntity, World)".
🟡 Moved all standard goals from the subclass of Turret Entity base class to TurretEntity class itself.
🟡 Moved the Itemable interface from the "entity.turrets" package to its newly created "interfaces" subpackge.
🟡 Changed the Turret Entity base class into an abstract class.
🟡 Overriden the "setTarget" method under the base Turret Entity class, allowing the turret to not account for its minimum range and maximum range when setting a target.
🟡 Updated the projectile property of Turret Entity base class to "EntityType" instead of "Class" to accommodate the mapping change.
🟡 Updated Cannon Turret's item tooltip for range to match its updated range.
🟡 Updated a potential future bug where when a turret dies, their rotation get carries over to other instances of turrets.
🟡 Updated all Turret Item subclasses to now fetch their respective turret instance's max health and health.
🟡 Updated the Turret Item base class to now show the retrieved turret's current health over max health. This is reset to max health when the item is renamed however.
🔴 Reduced the redundant implementation of Cannon Turret entity class's interface.

Fully implemented the Ballista Turret along with some major changes to the base Turret entity class and minor updates to the Cannon Turret.

Some standardizations and abstractions are also done to allow the current turrets and future turrets to have shorter codes.

[CHANGELOG]
🟢 Added my PayPal to my FUNDING.yml file.
🟢 Added the Ballista Turret's model, renderer, and entity classes along with its geo model and animation files.
🟢 Created a base Renderer class for all turrets, allowing turret renderers to just extend to this class and override the defaults.
🟢 Added a new Map property for the Cannon Turret entity that will now be implemented against all future turret implementation. This property defines all the offset points the turret uses such as the Cannon Turret's fuse and barrel offsets.
🟢 Added a new property for the Turret Entity base class which stores the attack goal of a turret, allowing for the attack goal to be called and be used for other processes such as defining a point in its attack cooldown when to use particles and such.
🟢 Added a new property for Turret Entity base class that defines how many barrels and what barrel is to be used next when shooting a projectile.
🟢 Added an overload for "getRelativePos" method of Turret Entity to now support Vec3d parameter.
🟢 Added an overridable method; "getMinAttackRange" and "getMaxAttackRange" which returns a float value that represents the turret's attack range in meters (1 meter = 1 full block).
🟢 Added an abstract method which returns a list of barrels the turret have when called.
🟢 Added several new overridable methods as well that sets the projectile velocity, along with a dependent method "shoot" that shoots the set projectile for the turret. This allows the shooting to be streamlined and even allow the entity to shoot when there's no target entity.
🟢 Added a local class for Turret Entity base class, which defines a velocity calculation for projectiles. See its documentation for more information.
🟢 Added the Ballista Turret's item counterpart, along with its parts.
🟢 Added Ballista Turret's item tooltips.
🟢 Added a minimum range for Cannon Turrets; set at 3 blocks.
🟢 Added a natural armor for the Cannon Turret; set at 3 armor points and 2 armor toughness.
🟢 Added a new method called "isWithinRange" which determines whether the provided entity or XYZ coordinates is within the minimum and maximum range of the turret.
🟢 Added a new block that is tied to the Ballista Turret's crafting recipe: Arrowhead, a block that inflicts damage when stepped on.
🟢 Added a new registry method for items so that blocks can be registered as items.
🟢 Added a DamageType registrey key fetcher in the Registry Utility class.
🟢 Moved the standard attributes to the Turret Entity base class for reusability. Check its javadocs for more information.
🟢 Moved the standard goals to the Turret Entity base class for reusability. Goals can still be overridden by calling "super.initGoals" method before adding the override goals. The attack goal can now be left null for the base class to set it. See its javadocs for more information.
🟢 Added several new text entries in the English lang file.
🟢 Added the Arrowhead to the "traps" block tag.
🟢 Added the Arrowhead to the list of damage types that could bypass armors.
🟢 Added both the cannonball and ballista arrow to the projectiles tag list.
🟢 Added ballista to the turret tag list.
🟡 Updated the Cannon Turret renderer class to extend the newly created base Turret Renderer class.
🟡 Updated the forgotten commented out code for Cannon Base item's fuel registry.
🟡 Refactored the custom Projectile Attack goal class to now support minimum range. Some variable names are also changed to easily understand what they do.
🟡 Overriden the "getPierceLevel" method of Ballista Arrow's superclass, allowing the projectile to now pierce entities once more. It now also accounts for armor protection.
🟡 Refactored Ballista Arrow entity's entity hit velocity calculations
🟡 Changed the order of declared parameters for Cannonball's entity constructor from "(World, LivingEntity)" to "(LivingEntity, World)".
🟡 Moved all standard goals from the subclass of Turret Entity base class to TurretEntity class itself.
🟡 Moved the Itemable interface from the "entity.turrets" package to its newly created "interfaces" subpackge.
🟡 Changed the Turret Entity base class into an abstract class.
🟡 Overriden the "setTarget" method under the base Turret Entity class, allowing the turret to not account for its minimum range and maximum range when setting a target.
🟡 Updated the projectile property of Turret Entity base class to "EntityType<?>" instead of "Class<?>" to accommodate the mapping change.
🟡 Updated Cannon Turret's item tooltip for range to match its updated range.
🟡 Updated a potential future bug where when a turret dies, their rotation get carries over to other instances of turrets.
🟡 Updated all Turret Item subclasses to now fetch their respective turret instance's max health and health.
🟡 Updated the Turret Item base class to now show the retrieved turret's current health over max health. This is reset to max health when the item is renamed however.
🔴 Reduced the redundant implementation of Cannon Turret entity class's interface.
@Virus5600 Virus5600 self-assigned this Jan 4, 2025
@Virus5600 Virus5600 added the enhancement New feature or request label Jan 4, 2025
@Virus5600 Virus5600 added this to the Beta v1.1.0 milestone Jan 4, 2025
@Virus5600 Virus5600 merged commit f616f95 into main Jan 4, 2025
6 checks passed
@Virus5600 Virus5600 deleted the v1.1.0-beta-1.21 branch January 4, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant