Yeta wrench updates. #110

Merged
albinaask merged 1 commit from featurebranch into dev/1.19.x 2023-03-18 15:51:04 +00:00
albinaask commented 2023-02-28 21:24:52 +00:00 (Migrated from github.com)

Description

  • The yeta wrench can now break blocks with shift right click.
  • The Functionality is now mostly moved over to the block entity "MachineBlockEntity", if this is undesirable I can change it as per your wishes. But it makes it more flexible to intercept custom behaviours in the future, configured per block.
  • New method to facilitate "use" on Machine blocks, it is now passed to machine block entities automagically. (Useful for upcoming Vat update)

Todo

  • Implement custom sound to Yeta wrench, when breaking stuff. But it's a minor thing that has to happen after the sounds are merged together with the hang glider.

Checklist:

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation(N/A?)
# Description - The yeta wrench can now break blocks with shift right click. - The Functionality is now mostly moved over to the block entity "MachineBlockEntity", if this is undesirable I can change it as per your wishes. But it makes it more flexible to intercept custom behaviours in the future, configured per block. - New method to facilitate "use" on Machine blocks, it is now passed to machine block entities automagically. (Useful for upcoming Vat update) # Todo <!-- Remove this section if you're submitting an already-complete PR --> - Implement custom sound to Yeta wrench, when breaking stuff. But it's a minor thing that has to happen after the sounds are merged together with the hang glider. # Checklist: - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you) - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation(N/A?) <!-- Thanks to: https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/ for the building blocks of this template -->
ferriarnus (Migrated from github.com) reviewed 2023-03-01 21:35:13 +00:00
ferriarnus (Migrated from github.com) left a comment

Just a quick look at the code, I'll check in game when find more time.

Just a quick look at the code, I'll check in game when find more time.
ferriarnus (Migrated from github.com) commented 2023-03-01 21:30:20 +00:00

While I don't dislike the change to pass it on, do you already have a machine in mind for this?

While I don't dislike the change to pass it on, do you already have a machine in mind for this?
ferriarnus (Migrated from github.com) reviewed 2023-03-01 21:36:47 +00:00
@ -0,0 +4,4 @@
import net.minecraft.world.item.context.UseOnContext;
import net.minecraftforge.common.extensions.IForgeBlockEntity;
public interface IWrenchable extends IForgeBlockEntity {
ferriarnus (Migrated from github.com) commented 2023-03-01 21:36:47 +00:00

While I think an interface is fine (might also just be able to live as a method in machineblock), why extend IForgeBlockEntity?

While I think an interface is fine (might also just be able to live as a method in machineblock), why extend IForgeBlockEntity?
albinaask (Migrated from github.com) reviewed 2023-03-01 22:07:00 +00:00
albinaask (Migrated from github.com) commented 2023-03-01 22:06:59 +00:00

Yes. I do. PR coming very soon in a repository near you. I'm currently rebuilding the fluid interface, and clicking on a fluid containing machine with a bucket should have the effect that the bucket should fill up. This makes it extremely convenient to do with this method instead of making a separate class for every machine block containing fluid and then binding a separate method to pass the event. You just hook into this event in the already existing entity class (Which I have used for the vat for example, but again coming soon hopefully).

Yes. I do. PR coming very soon in a repository near you. I'm currently rebuilding the fluid interface, and clicking on a fluid containing machine with a bucket should have the effect that the bucket should fill up. This makes it extremely convenient to do with this method instead of making a separate class for every machine block containing fluid and then binding a separate method to pass the event. You just hook into this event in the already existing entity class (Which I have used for the vat for example, but again coming soon hopefully).
albinaask (Migrated from github.com) reviewed 2023-03-01 22:12:33 +00:00
@ -0,0 +4,4 @@
import net.minecraft.world.item.context.UseOnContext;
import net.minecraftforge.common.extensions.IForgeBlockEntity;
public interface IWrenchable extends IForgeBlockEntity {
albinaask (Migrated from github.com) commented 2023-03-01 22:12:33 +00:00

Ahhh, you just mean that leaving it floating about extending nothing I gather? I think I used a method in a block entity related class at some point during one of the many iterations while trying to get everything to work. Probably mostly legacy, but pretty useful for indicating that you only should be able to use the wrench in the configuration other than wrenching on block entities and that was the most suitable interface that BlockEntity was implementing. But We could absolutely change this!

Ahhh, you just mean that leaving it floating about extending nothing I gather? I think I used a method in a block entity related class at some point during one of the many iterations while trying to get everything to work. Probably mostly legacy, but pretty useful for indicating that you only should be able to use the wrench in the configuration other than wrenching on block entities and that was the most suitable interface that BlockEntity was implementing. But We could absolutely change this!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#110
No description provided.