-
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.
integration -> addon and fix a few bugs
- Loading branch information
Showing
18 changed files
with
174 additions
and
83 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
2 changes: 1 addition & 1 deletion
2
...minecraft/CharacterLoadingTeleporter.java → ...minecraft/CharacterLoadingTeleporter.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
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: 7 additions & 11 deletions
18
...acter/integration/mpm/MPMIntegration.java → ...d/multicharacter/addons/mpm/MPMAddon.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
31 changes: 31 additions & 0 deletions
31
src/main/java/co/runed/multicharacter/addons/mpm/MPMClientAddon.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,31 @@ | ||
package co.runed.multicharacter.addons.mpm; | ||
|
||
import co.runed.multicharacter.addons.mpm.packets.SPacketSaveMPM; | ||
import co.runed.multicharacter.api.ClientAddon; | ||
import co.runed.multicharacter.events.client.GuiCloseEvent; | ||
import co.runed.multicharacter.network.PacketDispatcher; | ||
import net.minecraft.client.gui.GuiScreen; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import noppes.mpm.client.gui.GuiMPM; | ||
|
||
public class MPMClientAddon extends ClientAddon | ||
{ | ||
@Override | ||
public void init() | ||
{ | ||
MinecraftForge.EVENT_BUS.register(this); | ||
} | ||
|
||
@SubscribeEvent | ||
public void onCloseGui(GuiCloseEvent event) | ||
{ | ||
GuiScreen gui = event.getGui(); | ||
|
||
// TODO: MOVE TO MPM INTEGRATION | ||
if (gui != null && gui.getClass() == GuiMPM.class) | ||
{ | ||
PacketDispatcher.sendToServer(new SPacketSaveMPM(((GuiMPM) gui).playerdata)); | ||
} | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
...ter/integration/mpm/CPacketUpdateMPM.java → .../addons/mpm/packets/CPacketUpdateMPM.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
3 changes: 2 additions & 1 deletion
3
...acter/integration/mpm/SPacketSaveMPM.java → ...er/addons/mpm/packets/SPacketSaveMPM.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
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,18 @@ | ||
package co.runed.multicharacter.api; | ||
|
||
public abstract class Addon implements IAddon | ||
{ | ||
IClientAddon clientAddon; | ||
|
||
@Override | ||
public IClientAddon getClientAddon() | ||
{ | ||
return this.clientAddon; | ||
} | ||
|
||
@Override | ||
public void setClientAddon(IClientAddon clientAddon) | ||
{ | ||
this.clientAddon = clientAddon; | ||
} | ||
} |
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,5 @@ | ||
package co.runed.multicharacter.api; | ||
|
||
public abstract class ClientAddon implements IClientAddon | ||
{ | ||
} |
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,6 @@ | ||
package co.runed.multicharacter.api; | ||
|
||
public interface IClientAddon | ||
{ | ||
void init(); | ||
} |
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
Oops, something went wrong.