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

Some features and a bug fix #12

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from
Open

Conversation

Gabo6480
Copy link

@Gabo6480 Gabo6480 commented Sep 8, 2022

Some extra features
Fixed #6
Carrying can now be done with either right or left click, this is to enable Bedrock players to pick up mobs too

rainbowdashlabs and others added 7 commits June 19, 2022 18:57
Update softDepends
Added a SaberFactions integration
maximumStacking: the maximum amount of entities that can be stacked through stacking. 0 = infinite stacking since you can disable stacking with allowStacking
maximumSelfCarry: The maximum amount of entities a player can pick without stacking
bypass.maxstack: infinite stacking regardless of maxStack
bypass.maxselfcarry: infinitely picking up mobs regardless of maxSelfCarry
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long
Copy link
Member

@rainbowdashlabs rainbowdashlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

I have some small suggestions, which need to be addressed before merging ^^

build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
@rainbowdashlabs rainbowdashlabs changed the base branch from master to dev September 8, 2022 18:04
This takes account for all dismount events, such as disconnect, Entity#removePassenger, the passenger dismounting for any reason, etc.
Changed version of Saber-Factions to 2.9.1-RC
getPlugin() returns the Towny plugin Instance.
Moved some stuff around to simplify the logic
Implemented  eldoriarpg#7
However this comes with a drawback. In order to achieve this, I'm adding an invisible baby armor stand as a buffer between the player and the entitiy it is holding, this comes with the drawback of obstructing the player's ability to interact/attack any other block or entity.
The only ones capable of circumbenting this naturally are bedrock player's or modded clients.

To the moment, the only way I've found to fix this is to teleport the armorstand on top of the player every tick instead, however, this makes the entities lag behind when running.
Commenting this in the case it could be rescued later, for now it has no use because of 616df31

Now right/left clicking while on SNEAK_THROW state, cancels the throw and switches you to SNEAK_MOUNT, which will allow you to stand back up without dropping the entity
Forgot to make the offsetter armorstand invisible and invulnerable
Adding this as afailsafe to ensure the function of the plugin
The offsetter armorstand wasn't being properly removed when no more entities where mounted on them
Copy link
Member

@rainbowdashlabs rainbowdashlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last changes. Please refrain from adding more features into this pull request. you can do this on another PR later. Hacktober is coming as well ^^ I need to do some testing on my own still. So far I only see mostly structural or formatting issues. But the logic seems to be fine

build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
allowStacking = map.getValueOrDefault("allowStacking", allowStacking);
maximumStacking = map.getValueOrDefault("maximumStacking", maximumStacking);
//maximumSelfCarry = map.getValueOrDefault("maximumSelfCarry", maximumSelfCarry);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove if not used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was leaving it on the chance it could be rescued later

src/main/java/de/eldoria/pickmeup/PickMeUp.java Outdated Show resolved Hide resolved
@@ -6,6 +6,8 @@ public final class Permissions {
public static final String BASE = "pickmeup.";
public static final String RELOAD = BASE + "reload";
public static final String BYPASS_NOSTACK = BASE + "bypass.nostack";
public static final String BYPASS_MAXSTACK = BASE + "bypass.maxstack";
//public static final String BYPASS_MAXSELFCARRY = BASE + "bypass.maxselfcarry";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove if not used.

src/main/java/de/eldoria/pickmeup/PickMeUp.java Outdated Show resolved Hide resolved
src/main/java/de/eldoria/pickmeup/commands/Reload.java Outdated Show resolved Hide resolved
Gabo6480 and others added 3 commits September 13, 2022 10:52
Co-authored-by: Lilly Tempest <46890129+RainbowDashLabs@users.noreply.github.com>
IsOffsetter causes an error, changed it to is-offsetter
Copy link
Member

@rainbowdashlabs rainbowdashlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long wait. I was caught up in work after my holidays and some other projects.

I found the time to test your changes in depth now myself.

  • The offset armorstand does not get removed when the server stops while the mob is mounted. This results in the mob floating on an armor stand, which cant be destroyed on restart.
  • Using creative a left click above the hat of someone carrying a mob destroys the armor stand, which results in dropping the mob. Doesnt work in survival so its a minor issue for now.
  • throwing works flawlessly and the rest of the functions. Good job!

Please fix the restart issue and I would be more than happy to merge your pull request!

@DaddyRobLIVE
Copy link

Some extra features Fixed #6 Carrying can now be done with either right or left click, this is to enable Bedrock players to pick up mobs too

I have bedrock users on my server and they are able to carry entities just fine. All you have to do is tap and hold the entity. If this is added please consider making it togglable through a config setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throwbar started when changing sneak state quickly
3 participants