mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
1.21.3 update
This commit is contained in:
806 files changed
+6314
-10501
No files matched your search
@@ -16,7 +16,6 @@ import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.item.crafting.RecipeManager;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
@@ -26,7 +25,6 @@ import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* overrides for {@link CommandSourceStack} so that the methods will run successfully client side
|
||||
@@ -42,7 +40,7 @@ public class ClientCommandSourceStack extends CommandSourceStack {
|
||||
@SuppressWarnings("resource")
|
||||
@Override
|
||||
public void sendSuccess(Supplier<Component> message, boolean sendToAdmins) {
|
||||
Minecraft.getInstance().player.sendSystemMessage(message.get());
|
||||
Minecraft.getInstance().gui.getChat().addMessage(message.get());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,14 +60,6 @@ public class ClientCommandSourceStack extends CommandSourceStack {
|
||||
return Minecraft.getInstance().getConnection().getOnlinePlayers().stream().map((player) -> player.getProfile().getName()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return a {@link Stream} of recipe ids that are available on the client}
|
||||
*/
|
||||
@Override
|
||||
public Stream<ResourceLocation> getRecipeNames() {
|
||||
return Minecraft.getInstance().getConnection().getRecipeManager().getRecipeIds();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return a set of {@link ResourceKey} for levels from the client side}
|
||||
*/
|
||||
@@ -103,14 +93,6 @@ public class ClientCommandSourceStack extends CommandSourceStack {
|
||||
return Minecraft.getInstance().getConnection().getAdvancements().get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return the {@link RecipeManager} from the client side}
|
||||
*/
|
||||
@Override
|
||||
public RecipeManager getRecipeManager() {
|
||||
return Minecraft.getInstance().getConnection().getRecipeManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return the level from the client side}
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user