Skip to content

Commit

Permalink
Hello 1.20.1!
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 committed Dec 9, 2024
2 parents 12a5681 + 69a66b8 commit 94aadc1
Show file tree
Hide file tree
Showing 207 changed files with 74,337 additions and 1,728 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ body:
- type: input
attributes:
label: "Attach the relevant crash report file or log file: (Don't know how to find a crash report file? See the [Minecraft Wiki Tutorial](https://minecraft.fandom.com/wiki/Tutorials/How_to_get_a_crash_report)"
description: "You can use a website such as a [gist](https://gist.github.com/) / [pastebin](https://pastebin.com/) / etc. and link it here. (Make sure that it isn't set to expire!)"
description: "You can use a website such as a [gist](https://gist.github.com/) / [pastebin](https://pastebin.com/) / etc. and link it here. (Make sure that it isn't set to expire!)"
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,19 @@ We welcome contributions to TARDIS Refined. If you have an idea for a new featur
</table>

With special thanks to Commoble, Lucraft, starray1000000, The Judge, Monsterwaill and Sea Pickle<br/><hr/>

Additionally, thanks to the additional builders who contributed desktops:
"Radiance" by Getsuga Tenno
"Watchface" by t___cup
"Vapor" by Tank
"Newwave" by Muffled

Other builds made by members of the team.

![image](https://user-images.githubusercontent.com/34910888/209611682-abeaedc6-cf9a-465f-a693-9ba85f38cca6.png)

## Immersive Portals Support
## Immersive Portals Support (Developer Note)
This mod has dedicated support for being compatible and integrating with Immersive Portals when Immersive Portals is present.
By default, Immersive Portals is not enabled in dev and fabrics build.gradle file must be edited to allow for this.
Instructions on how to do this can be found in the relevant build.gradle
If you are a user, the above is not relevant to you. All you should need to do is install Fabric TR and Fabric IP and you will be all ready to go.
105 changes: 82 additions & 23 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,88 @@

![TARDIS Refined](https://wiki.tardisrefined.net/TARDIS-Refined-Wiki/tardis_refined_v2.png)

## Github Fixes
- Added "Compatibility" with [Diagonal Windows](https://www.curseforge.com/minecraft/mc-mods/diagonal-windows)
- Exception Ticking World [#388](https://github.com/WhoCraft/TardisRefined/issues/388)
- Nuka Console Duplicate Control Entity Failing Flight Dance Events [#376](https://github.com/WhoCraft/TardisRefined/issues/376)
- land pad dont work and crash on server [#377](https://github.com/WhoCraft/TardisRefined/issues/377)
- tardis is damaged [#351](https://github.com/WhoCraft/TardisRefined/issues/351)
- Diagonal Windows makes it impossible to craft the terraformer [#383](https://github.com/WhoCraft/TardisRefined/issues/383)
- relogging causes TARDIS Dance events to not occur [#387](https://github.com/WhoCraft/TardisRefined/issues/387)
- [Incompatibility] Tardis refined dimensions fail to load with Dimension Threads [#374](https://github.com/WhoCraft/TardisRefined/issues/374)
- Console cannot be removed/changed with the console configurator outside the TARDIS dimension [#380](https://github.com/WhoCraft/TardisRefined/issues/380)

## Gameplay changes
- Standing in a Crashed smoke of a crashed TARDIS will cause 0.5 damage to the player for the duration their standing in it
- Recovery Progress of crashed TARDIS now displayed on controls until repair is complete
- Recovery Progress of crashed TARDIS is now displayed on Key tooltip
- You can now view your TARDIS exterior via the Monitor
- Holographic exteriors on consoles now spin according to throttle
- Improved UI for Gravity Shaft
- Speed up downwards descent for Gravity Shaft
- Fixed a bug where the overlay keybinds always rendered the default key
- Added Pilot Villager
-
## Bug Fixes
- Bug fix: Added "Compatibility" with [Diagonal Windows](https://www.curseforge.com/minecraft/mc-mods/diagonal-windows)
- Bug fix: Exception Ticking World [#388](https://github.com/WhoCraft/TardisRefined/issues/388)
- Bug fix: Nuka Console Duplicate Control Entity Failing Flight Dance Events [#376](https://github.com/WhoCraft/TardisRefined/issues/376)
- Bug fix: land pad dont work and crash on server [#377](https://github.com/WhoCraft/TardisRefined/issues/377)
- Bug fix: tardis is damaged [#351](https://github.com/WhoCraft/TardisRefined/issues/351)
- Bug fix: Diagonal Windows makes it impossible to craft the terraformer [#383](https://github.com/WhoCraft/TardisRefined/issues/383)
- Bug fix: relogging causes TARDIS Dance events to not occur [#387](https://github.com/WhoCraft/TardisRefined/issues/387)
- Bug fix: [Incompatibility] Tardis refined dimensions fail to load with Dimension Threads [#374](https://github.com/WhoCraft/TardisRefined/issues/374)
- Bug fix: Console cannot be removed/changed with the console configurator outside the TARDIS dimension [#380](https://github.com/WhoCraft/TardisRefined/issues/380)
- Bug fix: Fixed a bug where the overlay keybinds always rendered the default key

## Enhancements
- Enhancement: Standing in a Crashed smoke of a crashed TARDIS will cause 0.5 damage to the player for the duration their standing in it
- Enhancement: Recovery Progress of crashed TARDIS now displayed on controls until repair is complete
- Enhancement: Recovery Progress of crashed TARDIS is now displayed on Key tooltip
- Enhancement: Holographic exteriors on consoles now spin according to throttle
- Enhancement: Shell Viewer/Time Vortex (Accessed Via Monitor Screen)
- Enhancement: Speed up downwards descent for Gravity Shaft
- Enhancement: UI for Gravity Shaft
- Enhancement: Colored various texts on Key item
- Enhancement: Alarm now sounds when Fuel is below 5% and the TARDIS is not fueling+

## Additions
- Added Item: Mallet
- Added Villager: Pilot (POI: Console)
- Added Interior: Useable Terraformed
- "Added" Shell: Half Baked
- Added Vortex: Clouds
- Added Vortex: Flow
- Added Vortex: Space
- Added Vortex: Waves
- Added Vortex: Stars
- Added Vortex: Twilight Glow
- Added Vortex: Aurora Dreams
- Added Vortex: Desert Mirage
- Added Vortex: Neon Pulse
- Added Vortex: Ocean Breeze
- Added Vortex: Solar Flare
- Added Vortex: Crystal Lagoon
- Added Vortex: Velvet Night
- Added Vortex: Candy Pop
- Added Vortex: Emerald Forest
- Added Vortex: LGBT Rainbow
- Added Vortex: Transgender Flag
- Added Vortex: Bisexual Flag
- Added Vortex: Lesbian Flag
- Added Vortex: Non-Binary Flag
- Added Vortex: Agender Flag
- Added Vortex: Gay Flag

## Textures, Models & Animations
- Texture: Updated all Factory Console Variants
- Model: Updated Coral Console Model
- Model: Updated Victorian Console Model
- Model: Updated Factory Console Model
- Model: Updated Big Ben Interior Model
- Model: Updated Pathfinder Interior Model
- Animation: Updated Factory Console Flight Animation
- Animation: Updated Factory Console Idle Animation
- Animation: Added Factory Console Crash Animation
- Animation: Added Factory Console Power on Animation
- Animation: Added Factory Console Power off Animation
- Animation: Updated Victorian Console Flight Animation
- Animation: Updated Victorian Console Idle Animation
- Animation: Added Victorian Console Crash Animation
- Animation: Added Victorian Console Power on Animation
- Animation: Added Victorian Console Power off Animation


## Compatibility
- [Trinkets](https://wiki.tardisrefined.net/extendedinventorymods.html#trinkets)
- [Curios](https://wiki.tardisrefined.net/extendedinventorymods.html#curios)
- [Diagonal Windows](https://wiki.tardisrefined.net/diagonal-blocks-windows-walls.html#diagonal-walls)


## Technical changes
- Most animations for Consoles are now loaded from JSON
- Some models for Consoles are now loaded from JSON
- Some models for Consoles are now loaded from JSON

## NOTE
- Upon updating to this version, your previous: ``Return Location``, ``Current Location`` and ``Target Location`` will be reset
This will not lead to any other data loss and your TARDIS will be exactly where you left it, take off once and you will be all sorted. This was a required change to resolve some issues


Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import static net.minecraft.client.animation.AnimationChannel.Interpolations.CATMULLROM;
import static net.minecraft.client.animation.AnimationChannel.Interpolations.LINEAR;
import static net.minecraft.client.animation.AnimationChannel.Targets.POSITION;
import static net.minecraft.client.animation.AnimationChannel.Targets.ROTATION;
import static whocraft.tardis_refined.TardisRefined.LOGGER;
import static net.minecraft.client.animation.AnimationChannel.Targets.*;

/**
Expand Down Expand Up @@ -125,7 +124,6 @@ private static List<Keyframe> parseKeyframes(JsonElement transformationData, Ani
if(transformationData == null) return keyframes;

JsonObject jsonObject = transformationData.getAsJsonObject();
TardisRefined.LOGGER.info("Keyframe Info: {}", jsonObject);

if (!jsonObject.has("keyframes") || !jsonObject.get("keyframes").isJsonArray()) {
return keyframes;
Expand Down Expand Up @@ -159,9 +157,8 @@ private static List<Keyframe> parseKeyframes(JsonElement transformationData, Ani
Keyframe keyframe = new Keyframe(timestamp, Objects.requireNonNull(targetToVector(targetType, vector3f)), interpolation);
keyframes.add(keyframe);
}

// Log the total number of keyframes parsed
TardisRefined.LOGGER.info("Total keyframes parsed for target {}: {}", targetToString(targetType), keyframes.size());
TardisRefined.LOGGER.debug("({} + {}) Total keyframes parsed: {}", targetToString(targetType), jsonObject.get("bone").getAsString(), keyframes.size());

return keyframes;
}
Expand Down Expand Up @@ -216,9 +213,8 @@ public static JsonObject loadJsonFromResource(ResourceManager resourceManager, R
JsonReader reader = new JsonReader(new InputStreamReader(inputStream));
return JsonParser.parseReader(reader).getAsJsonObject();
} catch (IOException e) {
LOGGER.error("Failed to load JSON from resource: {}", resourceLocation, e);
e.printStackTrace();
return null;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,79 +0,0 @@
package whocraft.tardis_refined;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import net.minecraft.network.chat.Component;
import net.minecraft.server.MinecraftServer;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import static whocraft.tardis_refined.TardisRefined.IS_CONTROL_GROUP;

public class ControlGroupCheckers {

public static final ControlGroupCheckers INSTANCE = new ControlGroupCheckers();
private static final String API_URL = "https://mc.craig.software/api/skin/beta_players";
private final List<String> uuidList = new ArrayList<>();

public ControlGroupCheckers() {
if(IS_CONTROL_GROUP) {
fetchUUIDsFromAPI();
}
}

public static void tickServer(MinecraftServer serverLevel) {
if (!IS_CONTROL_GROUP) return;
serverLevel.getPlayerList().getPlayers().iterator().forEachRemaining(serverPlayer -> {
if (!ControlGroupCheckers.INSTANCE.isUUIDInList(serverPlayer.getStringUUID())) {
serverPlayer.connection.disconnect(Component.literal("Womp Womp! You're not on the list! :("));
}
});
}


public void fetchUUIDsFromAPI() {
try {
URL url = new URL(API_URL);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");

int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();

while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();

// Parse JSON response and extract UUIDs
parseJSON(response.toString());
} else {
System.out.println("Failed to fetch UUIDs from API. Response code: " + responseCode);
}
} catch (IOException e) {
e.printStackTrace();
}
}

private void parseJSON(String jsonResponse) {
JsonArray jsonArray = JsonParser.parseString(jsonResponse).getAsJsonArray();
for (JsonElement element : jsonArray) {
String uuid = element.getAsJsonObject().get("uuid").getAsString();
uuidList.add(uuid);
}
}

public boolean isUUIDInList(String uuid) {
return uuidList.contains(uuid);
}
}
20 changes: 11 additions & 9 deletions common/src/main/java/whocraft/tardis_refined/TardisRefined.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import net.minecraft.util.LowerCaseEnumTypeAdapterFactory;
import org.slf4j.Logger;
import whocraft.tardis_refined.client.TRParticles;
import whocraft.tardis_refined.registry.TRUpgrades;
import whocraft.tardis_refined.common.VortexRegistry;
import whocraft.tardis_refined.common.hum.TardisHums;
import whocraft.tardis_refined.common.network.TardisNetwork;
import whocraft.tardis_refined.common.network.messages.sync.SyncConsolePatternsMessage;
import whocraft.tardis_refined.common.network.messages.sync.SyncDesktopsMessage;
import whocraft.tardis_refined.common.network.messages.sync.SyncHumsMessage;
import whocraft.tardis_refined.common.network.messages.sync.SyncShellPatternsMessage;
import whocraft.tardis_refined.common.network.messages.sync.S2CSyncConsolePatterns;
import whocraft.tardis_refined.common.network.messages.sync.S2CSyncDesktops;
import whocraft.tardis_refined.common.network.messages.sync.S2CSyncHums;
import whocraft.tardis_refined.common.network.messages.sync.S2CSyncShellPatterns;
import whocraft.tardis_refined.common.tardis.TardisDesktops;
import whocraft.tardis_refined.common.tardis.themes.ConsoleTheme;
import whocraft.tardis_refined.common.tardis.themes.ShellTheme;
Expand All @@ -39,6 +39,8 @@ public class TardisRefined {

public static void init() {

VortexRegistry.VORTEX_DEFERRED_REGISTRY.registerToModBus();

TRItemRegistry.TABS.registerToModBus();
TRBlockRegistry.BLOCKS.registerToModBus();
TRItemRegistry.ITEMS.registerToModBus();
Expand All @@ -64,10 +66,10 @@ public static void init() {

TRTagKeys.init();
TardisNetwork.init();
TardisDesktops.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, SyncDesktopsMessage::new);
ConsolePatterns.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, SyncConsolePatternsMessage::new);
ShellPatterns.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, SyncShellPatternsMessage::new);
TardisHums.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, SyncHumsMessage::new);
TardisDesktops.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, S2CSyncDesktops::new);
ConsolePatterns.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, S2CSyncConsolePatterns::new);
ShellPatterns.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, S2CSyncShellPatterns::new);
TardisHums.getReloadListener().setSyncPacket(TardisNetwork.NETWORK, S2CSyncHums::new);

TRARSStructurePieceRegistry.register();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import whocraft.tardis_refined.common.capability.tardis.upgrades.Upgrade;
import whocraft.tardis_refined.common.entity.ControlEntity;
import whocraft.tardis_refined.common.tardis.TardisNavLocation;
import whocraft.tardis_refined.common.tardis.control.Control;

public class TardisCommonEvents {

Expand Down Expand Up @@ -101,7 +100,7 @@ public interface CanControlBeUsed {
* @param controlEntity The entity associated with the control.
* @return True if control can be used, false otherwise.
*/
EventResult canControlBeUsed(TardisLevelOperator tardisLevelOperator, Control control, ControlEntity controlEntity);
EventResult canControlBeUsed(TardisLevelOperator tardisLevelOperator, whocraft.tardis_refined.common.tardis.control.Control control, ControlEntity controlEntity);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +0,0 @@

package whocraft.tardis_refined.client;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.math.Transformation;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.entity.player.Player;
import whocraft.tardis_refined.common.GravityUtil;
import whocraft.tardis_refined.constants.ModMessages;

public class GravityOverlay {

private static boolean isInShaft = false;

private static void checkOverlay(Player player){
isInShaft = GravityUtil.isInGravityShaft(player);
}

public static void renderOverlay(PoseStack poseStack) {
Minecraft mc = Minecraft.getInstance();
Font fontRenderer = mc.font;
LocalPlayer player = mc.player;

if(player.tickCount % 100 == 0){
checkOverlay(player);
}

if (isInShaft && !mc.options.renderDebug) {
poseStack.pushPose();
poseStack.scale(1.2f, 1.2f, 1.2f);


int x = 5;
int y = 5;

MutableComponent ascendKey = Component.translatable(mc.options.keyJump.getDefaultKey().getName());
MutableComponent descendKey = Component.translatable(mc.options.keyShift.getDefaultKey().getName());

MultiBufferSource.BufferSource renderImpl = MultiBufferSource.immediate(Tesselator.getInstance().getBuilder());
fontRenderer.drawInBatch(Component.translatable(ModMessages.ASCEND_KEY, ascendKey).getString(), x, y, ChatFormatting.WHITE.getColor(), true, Transformation.identity().getMatrix(), renderImpl, Font.DisplayMode.NORMAL, 0, 15728880);
fontRenderer.drawInBatch(Component.translatable(Component.translatable(ModMessages.DESCEND_KEY, descendKey).getString()), x, y + fontRenderer.lineHeight, ChatFormatting.WHITE.getColor(), true, Transformation.identity().getMatrix(), renderImpl, Font.DisplayMode.NORMAL, 0, 15728880);
renderImpl.endBatch();

poseStack.popPose();
}
}

}
Loading

0 comments on commit 94aadc1

Please sign in to comment.