This repository has been archived by the owner on Apr 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
88 additions
and
279 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ build | |
# other | ||
eclipse | ||
run | ||
|
||
libs/ |
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
47 changes: 47 additions & 0 deletions
47
src/main/java/quaternary/incorporeal/etc/CorporeaInputHandler.java
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,47 @@ | ||
package quaternary.incorporeal.etc; | ||
|
||
import com.mojang.authlib.GameProfile; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.text.Style; | ||
import net.minecraft.util.text.TextComponentTranslation; | ||
import net.minecraft.util.text.TextFormatting; | ||
import net.minecraft.world.World; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import quaternary.incorporeal.tile.soulcore.TileCorporeaSoulCore; | ||
import vazkii.botania.api.corporea.CorporeaHelper; | ||
import vazkii.botania.api.corporea.CorporeaIndexRequestEvent; | ||
import vazkii.botania.api.corporea.InvWithLocation; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Mod.EventBusSubscriber | ||
public class CorporeaInputHandler { | ||
@SubscribeEvent | ||
public static void corporeaInput(CorporeaIndexRequestEvent e) { | ||
World world = e.requester.world; | ||
|
||
//Look for any corporea soul cores on the network | ||
List<GameProfile> soulCoreProfiles = new ArrayList<>(); | ||
for(InvWithLocation inv : CorporeaHelper.getInventoriesOnNetwork(e.indexSpark)) { | ||
TileEntity tile = world.getTileEntity(inv.pos); | ||
if(tile instanceof TileCorporeaSoulCore) { | ||
soulCoreProfiles.add(((TileCorporeaSoulCore)tile).getOwnerProfile()); | ||
} | ||
} | ||
|
||
//No soul cores on this network? Ok. | ||
if(soulCoreProfiles.isEmpty()) return; | ||
|
||
//Some soul cores on this network? Check for a matching one | ||
GameProfile playerProfile = e.requester.getGameProfile(); | ||
for(GameProfile profile : soulCoreProfiles) { | ||
if(profile.equals(playerProfile)) return; | ||
} | ||
|
||
//Couldn't find a matching one? Display an error message and cancel the event | ||
e.requester.sendMessage(new TextComponentTranslation("incorporeal.etc.noSoulCore").setStyle(new Style().setColor(TextFormatting.RED))); | ||
e.setCanceled(true); | ||
} | ||
} |
96 changes: 0 additions & 96 deletions
96
src/main/java/quaternary/incorporeal/etc/HackyCorporeaInputHandler.java
This file was deleted.
Oops, something went wrong.
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
18 changes: 0 additions & 18 deletions
18
src/main/java/quaternary/incorporeal/etc/SacrificialGoat.java
This file was deleted.
Oops, something went wrong.
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
41 changes: 0 additions & 41 deletions
41
src/main/java/quaternary/incorporeal/spookyasm/tweaks/RetainerComparatorTweak.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.