This commit is contained in:
Hanno Reents 2024-04-07 18:28:28 +02:00
parent 75d9508fe9
commit 46de36d7b6
60 changed files with 7 additions and 20 deletions

0
.github/workflows/build.yml vendored Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

0
Workspace/Icons/schiffsblock.xcf Normal file → Executable file
View File

0
build.gradle Normal file → Executable file
View File

0
settings.gradle Normal file → Executable file
View File

0
src/client/java/modchest/REServerModClient.java Normal file → Executable file
View File

View File

View File

@ -1,6 +1,7 @@
package modchest.networking; package modchest.networking;
import modchest.REServerMod; import modchest.REServerMod;
import modchest.networking.packet.getNamesOfRespawnButtonsS2CPacket;
import modchest.networking.packet.respawnRequestS2CPacket; import modchest.networking.packet.respawnRequestS2CPacket;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View File

@ -8,7 +8,7 @@ import net.minecraft.network.PacketByteBuf;
public class getNamesOfRespawnButtonsS2CPacket { public class getNamesOfRespawnButtonsS2CPacket {
public static void receive(MinecraftClient minecraftClient, ClientPlayNetworkHandler clientPlayNetworkHandler, PacketByteBuf packetByteBuf, PacketSender packetSender) { public static String[] receive(MinecraftClient minecraftClient, ClientPlayNetworkHandler clientPlayNetworkHandler, PacketByteBuf packetByteBuf, PacketSender packetSender) {
String[] namesFromServer = new String[5]; String[] namesFromServer = new String[5];
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
namesFromServer[i] = (buf.readString(32767)); namesFromServer[i] = (buf.readString(32767));

View File

@ -1,6 +1,5 @@
package modchest.networking.packet; package modchest.networking.packet;
import modchest.REServerModClient;
import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.PacketSender;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayNetworkHandler;

0
src/client/resources/reservermod.client.mixins.json Normal file → Executable file
View File

0
src/documentation/Development Normal file → Executable file
View File

0
src/documentation/Documentation Normal file → Executable file
View File

0
src/documentation/Features Normal file → Executable file
View File

0
src/main/java/modchest/REServerModDataGenerator.java Normal file → Executable file
View File

View File

View File

View File

View File

0
src/main/java/modchest/block/modBlocks.java Normal file → Executable file
View File

2
src/main/java/modchest/data/ModLootTableGenerator.java Normal file → Executable file
View File

@ -1,9 +1,7 @@
package modchest.data; package modchest.data;
import modchest.item.modItems;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider;
import modchest.block.modBlocks;
//vereinfacht das erstellen der einzelnen JSON files, bisher nicht verwendet, am besten auch nie verwenden; unten auskommentierter code ist example-code! Hier: die Loot-Tables also was ein Item beim Abbau dropt //vereinfacht das erstellen der einzelnen JSON files, bisher nicht verwendet, am besten auch nie verwenden; unten auskommentierter code ist example-code! Hier: die Loot-Tables also was ein Item beim Abbau dropt
public class ModLootTableGenerator extends FabricBlockLootTableProvider { public class ModLootTableGenerator extends FabricBlockLootTableProvider {

3
src/main/java/modchest/data/ModModelProvider.java Normal file → Executable file
View File

@ -1,12 +1,9 @@
package modchest.data; package modchest.data;
import modchest.block.modBlocks;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider; import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.minecraft.data.client.BlockStateModelGenerator; import net.minecraft.data.client.BlockStateModelGenerator;
import net.minecraft.data.client.ItemModelGenerator; import net.minecraft.data.client.ItemModelGenerator;
import modchest.item.modItems;
import net.minecraft.data.client.Models;
//vereinfacht das erstellen der einzelnen JSON files, bisher nicht verwendet, am besten auch nie verwenden; unten auskommentierter code ist example-code! Hier: Für die generierung der Texturen //vereinfacht das erstellen der einzelnen JSON files, bisher nicht verwendet, am besten auch nie verwenden; unten auskommentierter code ist example-code! Hier: Für die generierung der Texturen
public class ModModelProvider extends FabricModelProvider { public class ModModelProvider extends FabricModelProvider {

2
src/main/java/modchest/data/ModRecipeGenerator.java Normal file → Executable file
View File

@ -1,11 +1,9 @@
package modchest.data; package modchest.data;
import modchest.item.modItems;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
import net.minecraft.data.server.recipe.RecipeJsonProvider; import net.minecraft.data.server.recipe.RecipeJsonProvider;
import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
//vereinfacht das erstellen der einzelnen JSON files, bisher nicht verwendet, am besten auch nie verwenden; unten auskommentierter code ist example-code! Hier: würden die Rezepte erstellt werden //vereinfacht das erstellen der einzelnen JSON files, bisher nicht verwendet, am besten auch nie verwenden; unten auskommentierter code ist example-code! Hier: würden die Rezepte erstellt werden

0
src/main/java/modchest/data/ModWorldGenerator.java Normal file → Executable file
View File

View File

0
src/main/java/modchest/item/modItemGroup.java Normal file → Executable file
View File

0
src/main/java/modchest/item/modItems.java Normal file → Executable file
View File

View File

@ -1,6 +1,5 @@
package modchest.mixin; package modchest.mixin;
import modchest.REServerMod;
import modchest.util.ServerPlayerEntityInterface; import modchest.util.ServerPlayerEntityInterface;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
@ -10,8 +9,6 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Arrays;
@Mixin(ServerPlayerEntity.class) @Mixin(ServerPlayerEntity.class)
public abstract class ServerPlayerEntityMixin implements ServerPlayerEntityInterface { public abstract class ServerPlayerEntityMixin implements ServerPlayerEntityInterface {
@Unique @Unique

View File

@ -5,7 +5,6 @@ import modchest.util.setAndGetMultiButtonsSpawn;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@ -14,7 +13,6 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;

View File

@ -2,6 +2,7 @@ package modchest.networking;
import modchest.REServerMod; import modchest.REServerMod;
import modchest.networking.packet.deathScreenMultiButtonsC2SPacket; import modchest.networking.packet.deathScreenMultiButtonsC2SPacket;
import modchest.networking.packet.setNamesOfRespawnButtonsC2SPacket;
import modchest.networking.packet.setNewRespawnsC2SPacket; import modchest.networking.packet.setNewRespawnsC2SPacket;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View File

@ -14,7 +14,6 @@ import net.minecraft.text.Text;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.awt.*;
import java.util.Arrays; import java.util.Arrays;
public class deathScreenMultiButtonsC2SPacket { public class deathScreenMultiButtonsC2SPacket {

View File

@ -9,8 +9,6 @@ import net.minecraft.server.network.ServerPlayNetworkHandler;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import java.util.Arrays;
public class setNewRespawnsC2SPacket { public class setNewRespawnsC2SPacket {
public static void receive(MinecraftServer server, ServerPlayerEntity player, //Passiert auf dem Server!!! public static void receive(MinecraftServer server, ServerPlayerEntity player, //Passiert auf dem Server!!!
ServerPlayNetworkHandler handler, PacketByteBuf buf, PacketSender responseSender) { ServerPlayNetworkHandler handler, PacketByteBuf buf, PacketSender responseSender) {

View File

0
src/main/java/modchest/util/initializer.java Normal file → Executable file
View File

View File

@ -113,14 +113,15 @@ public class setAndGetMultiButtonsSpawn {
topNbt.put("multi_sleep", new NbtCompound()); topNbt.put("multi_sleep", new NbtCompound());
} }
NbtCompound subNbt = (NbtCompound) topNbt.get("multi_sleep"); //wie bei setMultiSpawn() NbtCompound subNbt = (NbtCompound) topNbt.get("multi_sleep"); //wie bei setMultiSpawn()
String names;
if (subNbt != null) { if (subNbt != null) {
name = subNbt.getIntArray("names"); // holt sich den Namen names = subNbt.getString("names"); // holt sich den Namen
} }
if (name.length == 0) { //das gleiche fuer den Namen if (name.length == 0) { //das gleiche fuer den Namen
String[] names = {"#1", "#2", "#3", "#4", "#5"}; String names = {"#1", "#2", "#3", "#4", "#5"};
try { try {
subNbt.putIntArray("names", names); subNbt.putString("names", names);
topNbt.put("multi_sleep", subNbt); topNbt.put("multi_sleep", subNbt);
castedPlayer.setDataSaver(topNbt); castedPlayer.setDataSaver(topNbt);
} catch (Exception e) { } catch (Exception e) {

View File

0
src/main/resources/assets/modchest/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

0
src/main/resources/assets/modchest/icon.png.old Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

0
src/main/resources/assets/modchest/lang/de_de.json Normal file → Executable file
View File

0
src/main/resources/assets/modchest/lang/en_pt.json Normal file → Executable file
View File

0
src/main/resources/assets/modchest/lang/en_us.json Normal file → Executable file
View File

View File

View File

View File

View File

View File

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

0
src/main/resources/data/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
src/main/resources/fabric.mod.json Normal file → Executable file
View File

0
src/main/resources/reservermod.mixins.json Normal file → Executable file
View File