forked from Ladysnake/Requiem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Ladysnake#665 from mrsterner/1.20
Bugfixes i find
- Loading branch information
Showing
10 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Requiem | ||
* Copyright (C) 2017-2024 Ladysnake | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses>. | ||
* | ||
* Linking this mod statically or dynamically with other | ||
* modules is making a combined work based on this mod. | ||
* Thus, the terms and conditions of the GNU General Public License cover the whole combination. | ||
* | ||
* In addition, as a special exception, the copyright holders of | ||
* this mod give you permission to combine this mod | ||
* with free software programs or libraries that are released under the GNU LGPL | ||
* and with code included in the standard release of Minecraft under All Rights Reserved (or | ||
* modified versions of such code, with unchanged license). | ||
* You may copy and distribute such a system following the terms of the GNU GPL for this mod | ||
* and the licenses of the other code concerned. | ||
* | ||
* Note that people who make modified versions of this mod are not obligated to grant | ||
* this special exception for their modified versions; it is their choice whether to do so. | ||
* The GNU General Public License gives permission to release a modified version without this exception; | ||
* this exception also makes it possible to release a modified version which carries forward this exception. | ||
*/ | ||
package ladysnake.requiem.compat; | ||
|
||
import com.sammy.malum.MalumMod; | ||
import com.sammy.malum.common.components.MalumComponents; | ||
import com.sammy.malum.common.components.MalumLivingEntityDataComponent; | ||
import ladysnake.requiem.api.v1.RequiemPlugin; | ||
import ladysnake.requiem.api.v1.annotation.CalledThroughReflection; | ||
import ladysnake.requiem.api.v1.event.requiem.PossessionStartCallback; | ||
|
||
import java.util.Optional; | ||
|
||
public class MalumCompat implements RequiemPlugin { | ||
|
||
@CalledThroughReflection | ||
public static void init() { | ||
PossessionStartCallback.EVENT.register(MalumMod.malumPath("soulless"), (target, possessor, simulate) -> { | ||
Optional<MalumLivingEntityDataComponent> optionalComponent = MalumComponents.MALUM_LIVING_ENTITY_COMPONENT.maybeGet(target); | ||
if (optionalComponent.isPresent() && optionalComponent.get().soulData.soulless) { | ||
return PossessionStartCallback.Result.ALLOW; | ||
} | ||
return PossessionStartCallback.Result.PASS; | ||
}); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters