epstein file
This commit is contained in:
@@ -6,7 +6,7 @@ minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.10
|
||||
loader_version=0.18.3
|
||||
# Mod Properties
|
||||
mod_version=26.2.8
|
||||
mod_version=26.2.8.1
|
||||
maven_group=dev.tggamesyt
|
||||
archives_base_name=szar
|
||||
# Dependencies
|
||||
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -63,6 +64,16 @@ public class SzarClient implements ClientModInitializer {
|
||||
int loopStart = startOffset + startLength;
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ClientPlayNetworking.registerGlobalReceiver(Szar.OPEN_URL,
|
||||
(client, handler, buf, responseSender) -> {
|
||||
String url = "https://files.tggamesyt.dev/f/1770574109164-655298600-2022.03.17-1%20Exhibit%201.pdf";
|
||||
// maybe https://www.justice.gov/epstein/doj-disclosures
|
||||
|
||||
client.execute(() -> {
|
||||
Util.getOperatingSystem().open(url);
|
||||
});
|
||||
}
|
||||
);
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||
if (client.world == null) return;
|
||||
|
||||
|
||||
30
src/main/java/dev/tggamesyt/szar/EpsteinFile.java
Normal file
30
src/main/java/dev/tggamesyt/szar/EpsteinFile.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package dev.tggamesyt.szar;
|
||||
|
||||
import net.fabricmc.fabric.api.networking.v1.PacketByteBufs;
|
||||
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EpsteinFile extends Item {
|
||||
public EpsteinFile(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity player, Hand hand) {
|
||||
if (!world.isClient && player instanceof ServerPlayerEntity serverPlayer) {
|
||||
PacketByteBuf buf = PacketByteBufs.create();
|
||||
|
||||
ServerPlayNetworking.send(serverPlayer, Szar.OPEN_URL, buf);
|
||||
}
|
||||
|
||||
return TypedActionResult.success(player.getStackInHand(hand));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,6 +77,8 @@ public class Szar implements ModInitializer {
|
||||
public static MinecraftServer SERVER;
|
||||
public static final Identifier PLANE_ANIM_PACKET =
|
||||
new Identifier("szar", "plane_anim");
|
||||
public static final Identifier OPEN_URL = new Identifier(MOD_ID, "epsteinfiles");
|
||||
|
||||
public static final Block SZAR_BLOCK =
|
||||
new SzarBlock();
|
||||
public static final TrackedData<Long> LAST_CRIME_TICK =
|
||||
@@ -588,7 +590,7 @@ public class Szar implements ModInitializer {
|
||||
public static final Item EPSTEIN_FILES = Registry.register(
|
||||
Registries.ITEM,
|
||||
new Identifier(MOD_ID, "epstein_files"),
|
||||
new Item(new Item.Settings())
|
||||
new EpsteinFile(new Item.Settings())
|
||||
);
|
||||
public static final Item HANDCUFF_ITEM = Registry.register(
|
||||
Registries.ITEM,
|
||||
|
||||
Reference in New Issue
Block a user