Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Recipe book dupe(s) and Block break dupes#89

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Sefiraat wants to merge4 commits intoSlimefun:master
base:master
Choose a base branch
Loading
fromSefiraat:guide-item-dupe

Conversation

@Sefiraat
Copy link
Member

@SefiraatSefiraat commentedJul 5, 2021
edited
Loading

Description

STB Recipe books will allow users to remove items if opened twice fast enough (autoclicker makes this trivial) allowing for the removal of any STB/Vanilla/other registered recipe item assuming they are on the correct page before attempting.
STB machines allow their items to be removed if the machine is broken while being viewed either by TNT or a 2nd player.

Changes

For recipe book dupes, I added a check to see if the player has the inventory opened before allowing the 2nd instance to open. This resolved the dupe and has no noticable side effects on machine GUIs.
For the machines I added a check for viewing players and kick them out.

Related Issues

Don't think these have ever been reported weirdly!

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have addedNonnull andNullable annotations to my methods to indicate their behaviour for null values

@SefiraatSefiraat requested a review froma team as acode ownerJuly 5, 2021 16:07
Copy link
Member

@Alessio-ColomboAlessio-Colombo left a comment

Choose a reason for hiding this comment

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

There, easier to fix

…ms/BaseSTBMachine.javaCo-authored-by: Sfiguz7 <37039432+Sfiguz7@users.noreply.github.com>
Comment on lines +206 to +210
if (hasOpenGUI(player)) {
Debugger.getInstance().debug(player.getName() +" opened GUI for " +getOwningItem());
setOpenGUI(player,this);
listener.onGUIOpened(player);
player.openInventory(inventory);
Copy link
Member

Choose a reason for hiding this comment

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

This shit is horrible

Why don't we have a method to do the whole setOpenGUI, onGUIOpened and openInv.... out of scope here but fuck meeeeeeee


@Override
publicvoidhideForAll() {
for (HumanEntityplayer :newArrayList<>(inventory.getViewers())) {
Copy link
Member

Choose a reason for hiding this comment

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

getViewers already a List...

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@WalshyDevWalshyDevWalshyDev requested changes

@Alessio-ColomboAlessio-ColomboAlessio-Colombo approved these changes

@TheBusyBiscuitTheBusyBiscuitAwaiting requested review from TheBusyBiscuit

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@Sefiraat@TheBusyBiscuit@WalshyDev@Alessio-Colombo

[8]ページ先頭

©2009-2025 Movatter.jp