-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Bug Fix: [FORGE] Shell Patterns not shown on computer bank [#425](#425) - Bug Fix: Consoles not animating correctly - Bug fix: Tardis can travel to it's own dimension #435 - Bug fix: Tardis Shell Viewer not in correct position #434 #434
- Loading branch information
Showing
21 changed files
with
120 additions
and
32 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
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
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
56 changes: 56 additions & 0 deletions
56
...in/java/whocraft/tardis_refined/common/network/messages/player/ExitTardisViewMessage.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,56 @@ | ||
package whocraft.tardis_refined.common.network.messages.player; | ||
|
||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.server.level.ServerPlayer; | ||
import net.minecraft.world.level.Level; | ||
import org.jetbrains.annotations.NotNull; | ||
import whocraft.tardis_refined.TardisRefined; | ||
import whocraft.tardis_refined.common.capability.player.TardisPlayerInfo; | ||
import whocraft.tardis_refined.common.capability.tardis.TardisLevelOperator; | ||
import whocraft.tardis_refined.common.network.MessageC2S; | ||
import whocraft.tardis_refined.common.network.MessageContext; | ||
import whocraft.tardis_refined.common.network.MessageType; | ||
import whocraft.tardis_refined.common.network.TardisNetwork; | ||
import whocraft.tardis_refined.common.util.Platform; | ||
|
||
public class ExitTardisViewMessage extends MessageC2S { | ||
|
||
public ExitTardisViewMessage() { | ||
} | ||
|
||
public ExitTardisViewMessage(FriendlyByteBuf buf) { | ||
} | ||
|
||
@Override | ||
public @NotNull MessageType getType() { | ||
return TardisNetwork.TARDIS_EXIT; | ||
} | ||
|
||
@Override | ||
public void toBytes(FriendlyByteBuf buf) { | ||
|
||
} | ||
|
||
@Override | ||
public void handle(MessageContext context) { | ||
ServerPlayer player = context.getPlayer(); | ||
|
||
TardisPlayerInfo.get(player).ifPresent(tardisInfo -> { | ||
if (tardisInfo.isViewingTardis()) { | ||
ResourceKey<Level> key = ResourceKey.create(Registries.DIMENSION, | ||
new ResourceLocation(TardisRefined.MODID, tardisInfo.getViewedTardis().toString())); | ||
ServerLevel tardisLevel = Platform.getServer().getLevel(key); | ||
if (tardisLevel != null) { | ||
TardisLevelOperator.get(tardisLevel).ifPresent(tardisLevelOperator -> { | ||
tardisInfo.endShellView(player); | ||
}); | ||
} | ||
} | ||
}); | ||
|
||
} | ||
} |
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.