Skip to content

Commit a0e3b5d

Browse files
committed
1.21.4
2 parents 9b7774c + d9c7334 commit a0e3b5d

13 files changed

+546
-21
lines changed

README-ES.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<img src="./src/main/resources/assets/carpet/icon.png" align="right" width="128px"/>
2+
3+
# Fabric Carpet
4+
5+
[![Development Builds](https://github.com/gnembon/fabric-carpet/actions/workflows/devbuild.yml/badge.svg)](https://github.com/gnembon/fabric-carpet/actions/workflows/devbuild.yml)
6+
[![CurseForge downloads](http://cf.way2muchnoise.eu/full_349239_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/carpet)
7+
[![Modrinth downloads](https://img.shields.io/modrinth/dt/carpet?label=Modrinth%20downloads&logo=modrinth)](https://modrinth.com/mod/carpet)
8+
[![GitHub downloads](https://img.shields.io/github/downloads/gnembon/fabric-carpet/total?label=Github%20downloads&logo=github)](https://github.com/gnembon/fabric-carpet/releases)
9+
[![GitHub contributors](https://img.shields.io/github/contributors/gnembon/fabric-carpet?label=Contributors&logo=github)](https://github.com/gnembon/fabric-carpet/graphs/contributors)
10+
[![Discord](https://badgen.net/discord/online-members/gn99m4QRY4?icon=discord&label=Discord&list=what)](https://discord.gg/gn99m4QRY4)
11+
12+
English version of this [docs](https://github.com/gnembon/fabric-carpet/blob/master/README.md)
13+
14+
Cause all carpets are made of fabric?
15+
16+
Esto es la [Fabric](https://fabricmc.net/) version del Carpet Mod, para Minecraft 1.14.X, 1.15.X, 1.16.X y siguientes.
17+
18+
Carpet Mod es un mod para Minecraft Vanilla que permite tener un control total de lo que importa desde la perspectiva tecnica del juego.
19+
20+
* Prueba tus granjas durante varias horas en tan solo unos minutos con el comando [`/tick warp`](https://github.com/gnembon/fabric-carpet/wiki/Commands#usage-tick-warp-ticks-cmd), tan rapido como tu computadora pueda
21+
* ...da un informe detallado de los items producido usando el comando [`/hopperCounters`](https://github.com/gnembon/fabric-carpet/wiki/Current-Available-Settings#hoppercounters)
22+
* Ve la mobcap del server, TPS, etc. con actualizaciones en vivo con [`/log`](https://github.com/gnembon/fabric-carpet/wiki/Commands#log)
23+
* Permite a los pistones mover entidades (por ejemplo. cofres) con [`/movableBlockEntities`](https://github.com/gnembon/fabric-carpet/wiki/Current-Available-Settings#movableblockentities)
24+
* [Arregla](https://github.com/gnembon/fabric-carpet/wiki/Current-Available-Settings#leadfix) [muchas](https://github.com/gnembon/fabric-carpet/wiki/Current-Available-Settings#portalsuffocationfix) [cosas](https://github.com/gnembon/fabric-carpet/wiki/Current-Available-Settings#unloadedentityfix)
25+
26+
# ecosistema carpet
27+
28+
Para funcionalidades del ecosistema de carpet este el lugar correcto. Ve las descargas disponibles en [pagina de descargas](https://github.com/gnembon/fabric-carpet/releases)
29+
30+
31+
<img src="https://raw.githubusercontent.com/gnembon/carpet-extra/master/src/main/resources/assets/carpet-extra/icon.png" align="right" width="128px"/>
32+
33+
## carpet-extra
34+
35+
Mira [carpet-extra](https://github.com/gnembon/carpet-extra/) mod para mas locas y divertidas funcionalidades, incluyendo mesas de crafteo automaticas, dispensers que ponen bloques, hasta trasquilado de pollos!
36+
37+
## mesa de crafteo automatica
38+
39+
Debido a problemas de compatibildias con vanilla y otros mods, descarga [mesa de crafteo automatica](https://github.com/gnembon/carpet-autoCraftingTable/releases) por Skyrising como un addon separado para carpet
40+
41+
## scarpet app store
42+
43+
Si quieres buscar o contribuir a las app store de scarpet mira las aplicaciones disponibles, ve [aqui](https://github.com/gnembon/scarpet), es gratis!
44+
45+
## quick-carpet
46+
47+
Tienes problemas con las snapshots recientes recientes o alguien necesita la version base de carpet?, pero necesita algunas funcionalidades bases de carpet?, checkea la version minima de [quick-carpet](https://github.com/gnembon/quick-carpet/releases). Va a funcionar bien, no vas a poder agregar extensiones o usar apps de scarpet en este por cierto.
48+
49+
## Otras extensiones hechas por la comunidad para carpet
50+
51+
Aqui hay una [lista de otras extensiones de carpet](https://github.com/gnembon/fabric-carpet/wiki/List-of-Carpet-extensions) creadas por la comunidad.
52+
53+
Cualquiera puede crear sus propias opciones de carpeta o extender el lenguaje scarpet con una nueva API, creando una extension de carpet usando esto [extension de carpet plantilla](https://github.com/gnembon/fabric-carpet-extension-example-mod).
54+
55+
# Como? Que?
56+
57+
Mira las instrucciones para los mods de carpeta https://fabricmc.net/use/ y pon [carpet...jar](https://github.com/gnembon/fabric-carpet/releases) en la carpeta `mods` junto a los otros mods compatibles.
58+
59+
Mira la [demostracion de mods](https://www.youtube.com/watch?v=Lt-ooRGpLz4) en youtube para la explicación de cada uno de las opciones y comandos, y checkea la lista de todas las opciones disponibles en la wiki por una lista actualizada de cada opcion.
60+
61+
# Carpet Mod Settings
62+
Mira la lista [Lista de todas las configuraciones disponibles][settings] en la wiki
63+
64+
[settings]: https://github.com/gnembon/fabric-carpet/wiki/Current-Available-Settings
65+
66+
Para versiones anteriores de Minecraft: 1.13 checkea [gnembon/carpetmod](https://github.com/gnembon/carpetmod) y para 1.12 checkea [gnembon/carpetmod112](https://github.com/gnembon/carpetmod112).

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
[![GitHub contributors](https://img.shields.io/github/contributors/gnembon/fabric-carpet?label=Contributors&logo=github)](https://github.com/gnembon/fabric-carpet/graphs/contributors)
1010
[![Discord](https://badgen.net/discord/online-members/gn99m4QRY4?icon=discord&label=Discord&list=what)](https://discord.gg/gn99m4QRY4)
1111

12+
Version en español de esta [documentacion](https://github.com/gnembon/fabric-carpet/blob/master/README-ES.md)
13+
1214
Cause all carpets are made of fabric?
1315
This is the [Fabric](https://fabricmc.net/) version of Carpet Mod, for Minecraft 1.14.X, 1.15.X, 1.16.X and above.
1416

docs/scarpet/Full.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2954,7 +2954,7 @@ It returns a `map` with a report indicating how many chunks were affected, and h
29542954
29552955
Adds a chunk ticket at a position, which makes the game to keep the designated area centered around
29562956
`pos` with radius of `radius` loaded for a predefined amount of ticks, defined by `type`. Allowed types
2957-
are `portal`: 300 ticks, `teleport`: 5 ticks, and `unknown`: 1 tick. Radius can be from 1 to 32 ticks.
2957+
are `portal`: 300 ticks, `teleport`: 40 ticks, and `unknown`: 1 tick. Radius can be from 1 to 32 ticks.
29582958
29592959
This function is tentative - will likely change when chunk ticket API is properly fleshed out.
29602960

docs/scarpet/api/BlocksAndWorldAccess.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ It returns a `map` with a report indicating how many chunks were affected, and h
625625

626626
Adds a chunk ticket at a position, which makes the game to keep the designated area centered around
627627
`pos` with radius of `radius` loaded for a predefined amount of ticks, defined by `type`. Allowed types
628-
are `portal`: 300 ticks, `teleport`: 5 ticks, and `unknown`: 1 tick. Radius can be from 1 to 32 ticks.
628+
are `portal`: 300 ticks, `teleport`: 40 ticks, and `unknown`: 1 tick. Radius can be from 1 to 32 ticks.
629629

630630
This function is tentative - will likely change when chunk ticket API is properly fleshed out.
631631

gradle.properties

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check https://fabricmc.net/develop/
6-
minecraft_version=1.21.2
7-
loader_version=0.16.7
6+
minecraft_version=1.21.4
7+
loader_version=0.16.9
88
jsr305_version=3.0.2
9-
fabric_version=0.106.0+1.21.2
9+
fabric_version=0.110.5+1.21.4
1010

1111
# Mod Properties
12-
mod_version = 1.4.158
12+
mod_version = 1.4.161
1313
maven_group = carpet
1414
archives_base_name = fabric-carpet
1515

1616
# Release Action properties for Curseforge and Snapshots
1717
# The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5)
1818
# This is needed because CF uses too vague names for prereleases and release candidates
1919
# Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN]
20-
release-curse-versions = Minecraft 1.21:1.21.2
20+
release-curse-versions = Minecraft 1.21:1.21.4
2121
# Whether or not to build another branch on release
2222
release-extra-branch = false
2323
# The name of the second branch to release

src/main/java/carpet/CarpetSettings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private static class LanguageValidator extends Validator<String> {
7171
@Rule(
7272
desc = "Sets the language for Carpet",
7373
category = FEATURE,
74-
options = {"en_us", "fr_fr", "pt_br", "zh_cn", "zh_tw"},
74+
options = {"en_us", "fr_fr", "es_ar","pt_br", "zh_cn", "zh_tw"},
7575
strict = true, // the current system doesn't handle fallbacks and other, not defined languages would make unreadable mess. Change later
7676
validate = LanguageValidator.class
7777
)

src/main/java/carpet/commands/PlayerCommand.java

+5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ private static boolean cantSpawn(CommandContext<CommandSourceStack> context)
190190
MinecraftServer server = context.getSource().getServer();
191191
PlayerList manager = server.getPlayerList();
192192

193+
if (EntityPlayerMPFake.isSpawningPlayer(playerName))
194+
{
195+
Messenger.m(context.getSource(), "r Player ", "rb " + playerName, "r is currently logging on");
196+
return true;
197+
}
193198
if (manager.getPlayerByName(playerName) != null)
194199
{
195200
Messenger.m(context.getSource(), "r Player ", "rb " + playerName, "r is already logged on");

src/main/java/carpet/helpers/HopperCounter.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.util.List;
3838
import java.util.Locale;
3939
import java.util.Map;
40+
import java.util.Optional;
4041
import java.util.stream.Collectors;
4142

4243
import static java.util.Map.entry;
@@ -420,13 +421,10 @@ public static TextColor guessColor(Item item, Level level)
420421
{
421422
for (Ingredient ingredient : r.placementInfo().ingredients())
422423
{
423-
for (Holder<Item> stack : ingredient.items())
424+
Optional<Holder<Item>> match = ingredient.items().filter(stack -> fromItem(stack.value(), registryAccess) != null).findFirst();
425+
if (match.isPresent())
424426
{
425-
TextColor cand = fromItem(stack.value(), registryAccess);
426-
if (cand != null)
427-
{
428-
return cand;
429-
}
427+
return fromItem(match.get().value(), registryAccess);
430428
}
431429
}
432430
}

src/main/java/carpet/helpers/ParticleDisplay.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void drawParticleLine(ServerPlayer player, Vec3 from, Vec3 to, Str
1818
if (accentParticle != null) player.serverLevel().sendParticles(
1919
player,
2020
accentParticle,
21-
true,
21+
true, true,
2222
to.x, to.y, to.z, count,
2323
spread, spread, spread, 0.0);
2424

@@ -33,7 +33,7 @@ public static void drawParticleLine(ServerPlayer player, Vec3 from, Vec3 to, Str
3333
player.serverLevel().sendParticles(
3434
player,
3535
mainParticle,
36-
true,
36+
true, true,
3737
delta.x+from.x, delta.y+from.y, delta.z+from.z, 1,
3838
0.0, 0.0, 0.0, 0.0);
3939
}

src/main/java/carpet/mixins/Explosion_optimizedTntMixin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ private void onExplostion(ServerLevel world, Entity entity, DamageSource damageS
8686
}
8787

8888
@Redirect(method = "hurtEntities",
89-
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;setDeltaMovement(Lnet/minecraft/world/phys/Vec3;)V"))
89+
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;push(Lnet/minecraft/world/phys/Vec3;)V"))
9090
private void setVelocityAndUpdateLogging(Entity entity, Vec3 velocity)
9191
{
9292
if (eLogger != null) {
9393
eLogger.onEntityImpacted(entity, velocity.subtract(entity.getDeltaMovement()));
9494
}
95-
entity.setDeltaMovement(velocity);
95+
entity.push(velocity);
9696
}
9797
}

src/main/java/carpet/patches/EntityPlayerMPFake.java

+23-1
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@
3636
import carpet.fakes.ServerPlayerInterface;
3737
import carpet.utils.Messenger;
3838

39+
import java.util.HashSet;
3940
import java.util.Optional;
4041
import java.util.Set;
4142
import java.util.concurrent.CompletableFuture;
4243

4344
@SuppressWarnings("EntityConstructor")
4445
public class EntityPlayerMPFake extends ServerPlayer
4546
{
47+
private static final Set<String> spawning = new HashSet<>();
48+
4649
public Runnable fixStartingPosition = () -> {};
4750
public boolean isAShadow;
4851

@@ -69,7 +72,21 @@ public static boolean createFake(String username, MinecraftServer server, Vec3 p
6972
}
7073
}
7174
GameProfile finalGP = gameprofile;
72-
fetchGameProfile(gameprofile.getName()).thenAcceptAsync(p -> {
75+
76+
// We need to mark this player as spawning so that we do not
77+
// try to spawn another player with the name while the profile
78+
// is being fetched - preventing multiple players spawning
79+
String name = gameprofile.getName();
80+
spawning.add(name);
81+
82+
fetchGameProfile(name).whenCompleteAsync((p, t) -> {
83+
// Always remove the name, even if exception occurs
84+
spawning.remove(name);
85+
if (t != null)
86+
{
87+
return;
88+
}
89+
7390
GameProfile current = finalGP;
7491
if (p.isPresent())
7592
{
@@ -127,6 +144,11 @@ public static EntityPlayerMPFake respawnFake(MinecraftServer server, ServerLevel
127144
return new EntityPlayerMPFake(server, level, profile, cli, false);
128145
}
129146

147+
public static boolean isSpawningPlayer(String username)
148+
{
149+
return spawning.contains(username);
150+
}
151+
130152
private EntityPlayerMPFake(MinecraftServer server, ServerLevel worldIn, GameProfile profile, ClientInformation cli, boolean shadow)
131153
{
132154
super(server, worldIn, profile, cli);

0 commit comments

Comments
 (0)