Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/minecraft/1.20' into minecraft/1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 committed May 13, 2024
2 parents b88345c + 34fe225 commit fbead9f
Show file tree
Hide file tree
Showing 80 changed files with 9,892 additions and 1,826 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ We welcome contributions to TARDIS Refined. If you have an idea for a new featur
<td><a href="https://twitter.com/50ap5ud5">50ap5ud5</a></td>
<td>Developer</td>
</tr>
<tr>
<td><a href="https://github.com/Duzos">duzo</a></td>
<td>Developer</td>
</tr>
<tr><td><a href="https://twitter.com/MagicMrmann">MagicMan</a></td>
<td>Art Lead</td> </tr>
<tr><td><a href="https://twitter.com/ILikePandas18">ILikePandas</a></td>
Expand All @@ -49,7 +53,7 @@ We welcome contributions to TARDIS Refined. If you have an idea for a new featur
</tbody>
</table>

With special thanks to Commoble, Lucraft, starray1000000, The Judge and Sea Pickle<br/><hr/>
With special thanks to Commoble, Lucraft, starray1000000, The Judge, Monsterwaill and Sea Pickle<br/><hr/>
![image](https://user-images.githubusercontent.com/34910888/209611682-abeaedc6-cf9a-465f-a693-9ba85f38cca6.png)

## Immersive Portals Support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class TardisRefined {

public static boolean IS_CONTROL_GROUP = true;
public static boolean IS_CONTROL_GROUP = false;
public static boolean IS_RELEASE = !IS_CONTROL_GROUP || !SharedConstants.IS_RUNNING_IN_IDE;

public static final String MODID = "tardis_refined";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
.then(UpgradesCommand.register(dispatcher))
.then(Commands.literal("data").then(Commands.literal("export").then(ExportDesktopCommand.register(dispatcher))))
.then(LevelCommand.register(dispatcher))
.then(CreateCommand.register(dispatcher)));
);

if(!TardisRefined.IS_RELEASE) {
dispatcher.register(Commands.literal(TardisRefined.MODID + "_dev").requires(commandSource -> commandSource.hasPermission(Platform.getServer().getOperatorUserPermissionLevel()))
.then(CreateCommand.register(dispatcher)
));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import whocraft.tardis_refined.common.tardis.TardisNavLocation;
import whocraft.tardis_refined.common.tardis.themes.ShellTheme;
import whocraft.tardis_refined.constants.NbtConstants;
import whocraft.tardis_refined.patterns.ShellPattern;
import whocraft.tardis_refined.registry.TRBlockRegistry;

import static whocraft.tardis_refined.common.block.shell.ShellBaseBlock.LOCKED;
Expand Down Expand Up @@ -183,6 +184,7 @@ public void placeExteriorBlock(TardisLevelOperator operator, TardisNavLocation l
AestheticHandler aestheticHandler = operator.getAestheticHandler();
ResourceLocation theme = (aestheticHandler.getShellTheme() != null) ? aestheticHandler.getShellTheme() : ShellTheme.HALF_BAKED.getId();
ShellTheme shellTheme = ShellTheme.getShellTheme(theme);
ShellPattern shellPattern = aestheticHandler.getShellTheme() != null ? aestheticHandler.shellPattern() : null;

//remove the exterior block
location.getLevel().setBlock(location.getPosition(), Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL);
Expand All @@ -207,6 +209,11 @@ public void placeExteriorBlock(TardisLevelOperator operator, TardisNavLocation l
if (location.getLevel().getBlockEntity(location.getPosition()) instanceof GlobalShellBlockEntity globalShell) {
globalShell.setTardisId(operator.getLevel().dimension());
globalShell.setShellTheme(theme);

if (shellPattern != null) {
globalShell.setPattern(shellPattern);
}

location.getLevel().sendBlockUpdated(location.getPosition(), targetBlockState, targetBlockState, Block.UPDATE_CLIENTS);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public DesktopTheme(String id, String structureLocation) {
* @param id
* @param structureLocation
* @param name - The display name that is shown on the Desktop Selection Screen. Supports Tellraw style JSON strings, but they must be validated beforehand.
* @implNote NOTE: Users must also add a PNG display image under assets/tardis_refined/textures/ui/desktops/
* @implNote NOTE: Users must also add a PNG display image under assets/tardis_refined/textures/gui/desktops/
*/
public DesktopTheme(String id, String structureLocation, String name) {
this(new ResourceLocation(TardisRefined.MODID, id), new ResourceLocation(TardisRefined.MODID, structureLocation), name);
Expand All @@ -52,7 +52,7 @@ public DesktopTheme(String id, String structureLocation, String name) {
* @param id - the unique identifier for the DesktopTheme. Do not use the Tardis Refined ModId for the namespace if the DesktopTheme is not for the base mod.
* @param structureLocation - the ResourceLocation for the structure's .nbt file. The nbt file should be located under data/[namespace]/structures.
* @param name - The display name that is shown on the Desktop Selection Screen. Supports Tellraw style JSON strings, but they must be validated beforehand.
* @implNote NOTE: Users must also add a PNG display image under assets/[namespace]/textures/ui/desktops/
* @implNote NOTE: Users must also add a PNG display image under assets/[namespace]/textures/gui/desktops/
*/
public DesktopTheme(ResourceLocation id, ResourceLocation structureLocation, String name) {
this.identifier = id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.commons.lang3.text.WordUtils;
import whocraft.tardis_refined.TardisRefined;
import whocraft.tardis_refined.common.block.console.GlobalConsoleBlock;
import whocraft.tardis_refined.common.block.life.EyeBlock;
import whocraft.tardis_refined.common.block.shell.ShellBaseBlock;
import whocraft.tardis_refined.common.capability.TardisLevelOperator;
import whocraft.tardis_refined.common.protection.ProtectedZone;
Expand Down Expand Up @@ -143,7 +144,7 @@ public static boolean shouldCancelBreaking(Level world, Entity entity, BlockPos
}
}

return (state.getBlock() instanceof GlobalConsoleBlock && world.dimensionTypeId() == TRDimensionTypes.TARDIS) || state.getBlock() instanceof ShellBaseBlock;
return (state.getBlock() instanceof GlobalConsoleBlock && world.dimensionTypeId() == TRDimensionTypes.TARDIS) || state.getBlock() instanceof ShellBaseBlock || state.getBlock() instanceof EyeBlock;
}

public static String getCleanDimensionName(ResourceKey<Level> dimensionKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ public static Map<ResourceLocation, List<ShellPattern>> registerDefaultPatterns(
}

//TODO Currently not compatible
/* addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "marble", false);
addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "gaudy", false);
addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "metal", false);
addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "stone", false);
addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "red", false);*/
addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "faded", true);
// addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "gaudy", false);
// addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "metal", false);
// addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "stone", false);
// addDefaultPattern(ShellTheme.POLICE_BOX.getId(), "red", false);*/

addDefaultPattern(ShellTheme.PHONE_BOOTH.getId(), "metal", false);

Expand Down
Loading

0 comments on commit fbead9f

Please sign in to comment.