-
Notifications
You must be signed in to change notification settings - Fork 6
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
8 changed files
with
62 additions
and
226 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
50 changes: 50 additions & 0 deletions
50
src/main/java/net/frozenblock/lib/core/client/api/PanoramaCommand.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,50 @@ | ||
package net.frozenblock.lib.core.client.api; | ||
|
||
import com.mojang.brigadier.CommandDispatcher; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; | ||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; | ||
import net.frozenblock.lib.FrozenSharedConstants; | ||
import net.minecraft.client.Minecraft; | ||
import org.jetbrains.annotations.NotNull; | ||
import java.io.File; | ||
import java.text.DateFormat; | ||
import java.text.SimpleDateFormat; | ||
import java.util.Date; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class PanoramaCommand { | ||
|
||
public static void register(@NotNull CommandDispatcher<FabricClientCommandSource> dispatcher) { | ||
dispatcher.register( | ||
ClientCommandManager.literal("panorama") | ||
.executes( | ||
context -> { | ||
FrozenSharedConstants.LOGGER.warn("PLAYER HAS ACCESS TO DEV CAMERA AND HAS JUST USED IT"); | ||
Minecraft client = Minecraft.getInstance(); | ||
File directory = getPanoramaFolderName(new File(client.gameDirectory, "panoramas")); | ||
File directory1 = new File(directory, "screenshots"); | ||
directory1.mkdir(); | ||
directory1.mkdirs(); | ||
client.grabPanoramixScreenshot(directory, 1024, 1024); | ||
return 1; | ||
} | ||
) | ||
); | ||
} | ||
|
||
private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss"); | ||
|
||
private static @NotNull File getPanoramaFolderName(File directory) { | ||
String string = DATE_FORMAT.format(new Date()); | ||
int i = 1; | ||
while (true) { | ||
File file = new File(directory, string + (i == 1 ? "" : "_" + i)); | ||
if (!file.exists()) { | ||
return file; | ||
} | ||
++i; | ||
} | ||
} | ||
} |
37 changes: 0 additions & 37 deletions
37
src/main/java/net/frozenblock/lib/ingamedevtools/RegisterInGameDevTools.java
This file was deleted.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
src/main/java/net/frozenblock/lib/ingamedevtools/item/Camera.java
This file was deleted.
Oops, something went wrong.
78 changes: 0 additions & 78 deletions
78
src/main/java/net/frozenblock/lib/ingamedevtools/item/LootTableWhacker.java
This file was deleted.
Oops, something went wrong.