Skip to content

Commit

Permalink
clean deprecated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Innokenty committed Jul 19, 2024
1 parent f16b90a commit c6bd789
Show file tree
Hide file tree
Showing 24 changed files with 1 addition and 72 deletions.
7 changes: 0 additions & 7 deletions src/main/java/io/singularitynet/EpisodeEventWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,8 @@

package io.singularitynet;

import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.chunk.WorldChunk;
import org.apache.logging.log4j.LogManager;

import java.util.concurrent.locks.ReentrantReadWriteLock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package io.singularitynet.MissionHandlerInterfaces;

import net.minecraft.network.message.MessageType;
import net.minecraft.text.Text;

import java.util.UUID;

public interface ClientChatListener {
void onChatMessage(Text message);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.singularitynet.projectmalmo.MissionInit;

import java.nio.ByteBuffer;
import java.util.Map;

/** Interface for objects which are responsible for providing Minecraft video data.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import net.minecraft.client.option.GameOptions;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.apache.commons.logging.Log;
import org.apache.logging.log4j.LogManager;
import io.singularitynet.mixin.GameOptionsMixin;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@

import io.singularitynet.IVereyaMessageListener;
import io.singularitynet.Server.VereyaModServer;
import io.singularitynet.VereyaMessage;
import io.singularitynet.VereyaMessageType;
import io.singularitynet.SidesMessageHandler;
import io.singularitynet.mixin.MobEntityAccessorMixin;
import io.singularitynet.projectmalmo.ContinuousMovementCommand;
import io.singularitynet.projectmalmo.ContinuousMovementCommands;
import io.singularitynet.projectmalmo.MissionInit;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
import net.minecraft.client.texture.NativeImage;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ai.control.JumpControl;
import net.minecraft.entity.ai.control.MoveControl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import io.singularitynet.MissionHandlerInterfaces.ICommandHandler;
import io.singularitynet.projectmalmo.ContinuousMovementCommands;
import io.singularitynet.projectmalmo.MissionInit;


public class ContinuousMovementCommandsImplementation extends CommandGroup implements ICommandHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.singularitynet.projectmalmo.ServerHandlers;
import org.apache.logging.log4j.LogManager;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.singularitynet.projectmalmo.MissionQuitCommands;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;

/** Quit command allows for the agent to abort its mission at any time. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
package io.singularitynet.MissionHandlers;

import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.common.collect.Sets;
import com.google.gson.*;
import com.mojang.serialization.JsonOps;
import com.mojang.serialization.Lifecycle;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import net.minecraft.data.DataProvider;
import net.minecraft.data.server.loottable.LootTableGenerator;
import net.minecraft.registry.*;
import net.minecraft.registry.entry.RegistryEntryInfo;
import net.minecraft.util.ErrorReporter;
import net.minecraft.util.Util;
import net.minecraft.util.math.random.RandomSeed;
import net.minecraft.util.math.random.RandomSequence;
import org.jetbrains.annotations.Nullable;
import net.minecraft.loot.LootDataType;
import net.minecraft.loot.LootTable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -33,7 +28,6 @@
import net.minecraft.data.server.loottable.vanilla.VanillaLootTableProviders;
import net.minecraft.item.Item;
import net.minecraft.loot.LootTableReporter;
import net.minecraft.loot.context.LootContextType;
import net.minecraft.loot.context.LootContextTypes;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;
Expand All @@ -43,7 +37,6 @@
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.function.Function;

import static net.minecraft.registry.Registries.ITEM;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@
import io.singularitynet.MissionHandlerInterfaces.IObservationProducer;
import com.google.gson.JsonArray;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.singularitynet.MyChatHud;
import io.singularitynet.mixin.InGameHudMixin;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.gui.hud.InGameHud;
import io.singularitynet.projectmalmo.MissionInit;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.nbt.visitor.NbtTextFormatter;
import net.minecraft.network.message.MessageType;
import net.minecraft.text.Text;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.UUID;

public class ObservationFromChatImplementation extends HandlerBase implements IObservationProducer, io.singularitynet.MissionHandlerInterfaces.ClientChatListener {
private static final Logger LOGGER = LogManager.getLogger();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,18 @@
package io.singularitynet.MissionHandlers;

import io.singularitynet.MissionHandlerInterfaces.IObservationProducer;
import io.singularitynet.projectmalmo.DrawItem;
import io.singularitynet.projectmalmo.MissionInit;
import io.singularitynet.projectmalmo.ObservationFromFullInventory;
import io.singularitynet.utils.JSONWorldDataHelper;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.Vec3d;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;

import java.util.List;
import java.util.Map;

/** Simple IObservationProducer class that returns a list of the full inventory, including the armour.
*/
public class ObservationFromFullInventoryImplementation extends HandlerBase implements IObservationProducer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeEntry;
import net.minecraft.util.collection.DefaultedList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
import net.minecraft.world.gen.GeneratorOptions;
import net.minecraft.world.gen.WorldPresets;
import net.minecraft.world.level.LevelInfo;
import io.singularitynet.mixin.LevelStorageMixin;
import org.apache.logging.log4j.LogManager;

import java.nio.file.Path;
import java.util.Properties;
import java.util.UUID;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/singularitynet/MyChatHud.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.gui.hud.MessageIndicator;
import net.minecraft.network.message.MessageSignatureData;
import net.minecraft.network.message.MessageType;
import net.minecraft.text.Text;
import org.jetbrains.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.mob.MobEntity;
import net.minecraft.entity.player.PlayerEntity;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import net.minecraft.world.entity.ClientEntityManager;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.Entity;
import net.minecraft.world.entity.EntityLookup;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(ClientWorld.class)
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/io/singularitynet/mixin/EntityMixin.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package io.singularitynet.mixin;

import io.singularitynet.Server.ServerStateMachine;
import net.minecraft.entity.EntityType;

import net.minecraft.entity.mob.MobEntity;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/io/singularitynet/mixin/InGameHudMixin.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
package io.singularitynet.mixin;

import io.singularitynet.MissionHandlerInterfaces.ClientChatListener;
import net.minecraft.client.Keyboard;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.Mouse;
import net.minecraft.client.gui.hud.ChatHud;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor;
import net.minecraft.client.gui.hud.InGameHud;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.List;
import java.util.Map;

@Mixin(InGameHud.class)
public interface InGameHudMixin {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/io/singularitynet/mixin/KeyBindingMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.singularitynet.MissionHandlers.CommandForKey;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.apache.commons.compress.harmony.pack200.NewAttributeBands;
import org.apache.logging.log4j.LogManager;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand All @@ -12,7 +11,6 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import net.minecraft.entity.mob.MobEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(MobEntity.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.singularitynet.mixin;

import net.minecraft.entity.Entity;
import net.minecraft.server.world.ServerEntityManager;
import net.minecraft.world.entity.EntityLike;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/io/singularitynet/mixin/ServerWorldMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
import net.minecraft.entity.Entity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.ActionResult;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(ServerWorld.class)
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/singularitynet/utils/CraftingHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import com.google.gson.JsonSyntaxException;
import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Inventories;
import net.minecraft.inventory.Inventory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.lwjgl.BufferUtils;

import java.io.IOException;
import java.lang.ref.Cleaner;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
Expand Down

0 comments on commit c6bd789

Please sign in to comment.