Skip to content

Commit b4ce0b6

Browse files
committed
1.17.1
1 parent dfac9de commit b4ce0b6

19 files changed

+57
-66
lines changed

.loomversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.17
1+
1.17.1

api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>loom-root</artifactId>
77
<groupId>org.loomdev</groupId>
8-
<version>1.17</version>
8+
<version>1.17.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

api/src/main/java/org/loomdev/api/ApiVersion.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public enum ApiVersion {
3838
V21W16A("21w16a", ReleaseType.SNAPSHOT),
3939
V21W17A("21w17a", ReleaseType.SNAPSHOT),
4040
V21W18A("21w18a", ReleaseType.SNAPSHOT),
41-
V1_17R1("1.17-R1", ReleaseType.RELEASE);
41+
V1_17R1("1.17-R1", ReleaseType.RELEASE),
42+
V1_17_1R1("1.17.1-R1", ReleaseType.RELEASE);
4243

4344
public static final ApiVersion LATEST = values()[ApiVersion.values().length - 1];
4445
public static final ApiVersion LATEST_SNAPSHOT = getLatestByType(ReleaseType.SNAPSHOT);

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>org.loomdev</groupId>
66
<artifactId>loom-root</artifactId>
77
<packaging>pom</packaging>
8-
<version>1.17</version>
8+
<version>1.17.1</version>
99

1010
<modules>
1111
<module>api</module>

server/patches/server/MinecraftServer.patch

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft//server/MinecraftServer.java
22
+++ b/net/minecraft//server/MinecraftServer.java
3-
@@ -166,6 +166,10 @@
3+
@@ -163,6 +163,10 @@
44

55
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements SnooperPopulator, CommandSource, AutoCloseable {
66

@@ -11,7 +11,7 @@
1111
static final Logger LOGGER = LogManager.getLogger();
1212
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
1313
private static final int TICK_STATS_SPAN = 100;
14-
@@ -265,14 +269,14 @@
14+
@@ -261,14 +265,14 @@
1515
thread.setUncaughtExceptionHandler((thread1, throwable) -> {
1616
MinecraftServer.LOGGER.error(throwable);
1717
});
@@ -28,7 +28,7 @@
2828
super("Server");
2929
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
3030
this.profiler = this.metricsRecorder.getProfiler();
31-
@@ -314,13 +318,14 @@
31+
@@ -310,13 +314,14 @@
3232
this.structureManager = new StructureManager(serverresources.getResourceManager(), levelstoragesource_levelstorageaccess, datafixer);
3333
this.serverThread = thread;
3434
this.executor = Util.backgroundExecutor();
@@ -44,15 +44,15 @@
4444
ServerScoreboard serverscoreboard1 = this.getScoreboard();
4545

4646
Objects.requireNonNull(serverscoreboard1);
47-
@@ -631,6 +636,7 @@
47+
@@ -639,6 +644,7 @@
4848

4949
public void stopServer() {
5050
MinecraftServer.LOGGER.info("Stopping server");
5151
+ loomServer.shutdown(); // Loom
5252
if (this.getConnection() != null) {
5353
this.getConnection().stop();
5454
}
55-
@@ -679,6 +685,12 @@
55+
@@ -687,6 +693,12 @@
5656
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
5757
}
5858

@@ -65,7 +65,7 @@
6565
}
6666

6767
public String getLocalIp() {
68-
@@ -713,10 +725,12 @@
68+
@@ -721,10 +733,12 @@
6969
this.status.setVersion(new ServerStatus.Version(SharedConstants.getCurrentVersion().getName(), SharedConstants.getCurrentVersion().getProtocolVersion()));
7070
this.updateStatusIcon(this.status);
7171

@@ -80,7 +80,7 @@
8080
long j = i / 50L;
8181

8282
MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
83-
@@ -729,6 +743,13 @@
83+
@@ -737,6 +751,13 @@
8484
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
8585
}
8686

@@ -94,7 +94,7 @@
9494
this.nextTickTime += 50L;
9595
this.startMetricsRecordingTick();
9696
this.profiler.push("tick");
97-
@@ -827,7 +848,7 @@
97+
@@ -835,7 +856,7 @@
9898
}
9999
}
100100

@@ -103,15 +103,15 @@
103103
this.getProfiler().incrementCounter("runTask");
104104
super.doRunTask(ticktask);
105105
}
106-
@@ -881,6 +902,7 @@
106+
@@ -883,6 +904,7 @@
107107
long i = Util.getNanos();
108108

109109
++this.tickCount;
110110
+ org.loomdev.loom.event.LoomEventDispatcher.fire(new org.loomdev.loom.event.server.TickEventImpl.PreImpl(getTickCount())); // Loom :: fire TickEvent.Pre
111111
this.tickChildren(booleansupplier);
112112
if (i - this.lastServerStatus >= 5000000000L) {
113113
this.lastServerStatus = i;
114-
@@ -915,17 +937,20 @@
114+
@@ -917,17 +939,20 @@
115115
}
116116

117117
this.profiler.pop();
@@ -132,15 +132,15 @@
132132
this.profiler.push("commandFunctions");
133133
this.getFunctions().tick();
134134
this.profiler.popPush("levels");
135-
@@ -946,6 +971,7 @@
135+
@@ -948,6 +973,7 @@
136136
this.profiler.push("tick");
137137

138138
try {
139139
+ org.loomdev.loom.event.LoomEventDispatcher.fire(new org.loomdev.loom.event.server.TickEventImpl.WorldImpl(getTickCount(), serverlevel)); // Loom :: fire TickEvent.World
140140
serverlevel.tick(booleansupplier);
141141
} catch (Throwable throwable) {
142142
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
143-
@@ -1030,7 +1056,7 @@
143+
@@ -1032,7 +1058,7 @@
144144

145145
@DontObfuscate
146146
public String getServerModName() {
@@ -149,7 +149,7 @@
149149
}
150150

151151
public SystemReport fillSystemReport(SystemReport systemreport) {
152-
@@ -1075,7 +1101,7 @@
152+
@@ -1077,7 +1103,7 @@
153153
public abstract Optional<String> getModdedStatus();
154154

155155
public void sendMessage(Component component, UUID uuid) {
@@ -158,7 +158,7 @@
158158
}
159159

160160
public KeyPair getKeyPair() {
161-
@@ -1396,11 +1422,11 @@
161+
@@ -1398,11 +1424,11 @@
162162

163163
public CompletableFuture<Void> reloadResources(Collection<String> collection) {
164164
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
@@ -172,15 +172,15 @@
172172
}, this).thenCompose((immutablelist) -> {
173173
return ServerResources.loadResources(immutablelist, this.registryHolder, this.isDedicatedServer() ? Commands.CommandSelection.DEDICATED : Commands.CommandSelection.INTEGRATED, this.getFunctionCompilationLevel(), this.executor, this);
174174
}).thenAcceptAsync((serverresources) -> {
175-
@@ -1853,6 +1879,7 @@
175+
@@ -1855,6 +1881,7 @@
176176
}
177177
}
178178

179179
+ /* // Loom start :: decompile error
180180
public void doRunTask(Runnable runnable) {
181181
this.doRunTask((TickTask) runnable);
182182
}
183-
@@ -1864,6 +1891,7 @@
183+
@@ -1866,6 +1893,7 @@
184184
public Runnable wrapRunnable(Runnable runnable) {
185185
return this.wrapRunnable(runnable);
186186
}

server/patches/server/dedicated/DedicatedServer.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
}
3535
};
3636

37-
@@ -177,8 +181,10 @@
38-
SkullBlockEntity.setProfileCache(this.getProfileCache());
37+
@@ -178,8 +182,10 @@
3938
SkullBlockEntity.setSessionService(this.getSessionService());
39+
SkullBlockEntity.setMainThreadExecutor(this);
4040
GameProfileCache.setUsesAuthentication(this.usesAuthentication());
4141
+ loomServer.getPluginManager().loadOnServerStart(); // Loom :: load plugins
4242
DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
@@ -45,7 +45,7 @@
4545
long j = Util.getNanos() - i;
4646
String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D);
4747

48-
@@ -618,7 +624,9 @@
48+
@@ -619,7 +625,9 @@
4949
return this.resourcePackPrompt;
5050
}
5151

server/patches/server/level/ServerPlayer.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
--- a/net/minecraft//server/level/ServerPlayer.java
22
+++ b/net/minecraft//server/level/ServerPlayer.java
3-
@@ -140,6 +140,7 @@
3+
@@ -141,6 +141,7 @@
44

55
public class ServerPlayer extends Player {
66

77
+ public java.util.OptionalInt viewDistance = java.util.OptionalInt.empty(); // Loom
88
private static final Logger LOGGER = LogManager.getLogger();
99
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
1010
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
11-
@@ -361,7 +362,7 @@
11+
@@ -357,7 +358,7 @@
1212
compoundtag.putInt("SpawnZ", this.respawnPosition.getZ());
1313
compoundtag.putBoolean("SpawnForced", this.respawnForced);
1414
compoundtag.putFloat("SpawnAngle", this.respawnAngle);
@@ -17,7 +17,7 @@
1717
Logger logger = ServerPlayer.LOGGER;
1818

1919
Objects.requireNonNull(logger);
20-
@@ -1079,7 +1080,7 @@
20+
@@ -1075,7 +1076,7 @@
2121

2222
for (int j = 0; j < i; ++j) {
2323
ResourceLocation resourcelocation = aresourcelocation1[j];
@@ -26,15 +26,15 @@
2626

2727
Objects.requireNonNull(list);
2828
optional.ifPresent(list::add);
29-
@@ -1285,6 +1286,7 @@
29+
@@ -1281,6 +1282,7 @@
3030
this.textFilteringEnabled = serverboundclientinformationpacket.isTextFilteringEnabled();
3131
this.getEntityData().set(ServerPlayer.DATA_PLAYER_MODE_CUSTOMISATION, (byte) serverboundclientinformationpacket.getModelCustomisation());
3232
this.getEntityData().set(ServerPlayer.DATA_PLAYER_MAIN_HAND, (byte) (serverboundclientinformationpacket.getMainHand() == HumanoidArm.LEFT ? 0 : 1));
3333
+ this.viewDistance = java.util.OptionalInt.of(serverboundclientinformationpacket.viewDistance); // Loom
3434
}
3535

3636
public boolean canChatInColor() {
37-
@@ -1374,7 +1376,7 @@
37+
@@ -1370,7 +1372,7 @@
3838

3939
@Nullable
4040
public Component getTabListDisplayName() {

server/patches/server/network/ServerGamePacketListenerImpl.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft//server/network/ServerGamePacketListenerImpl.java
22
+++ b/net/minecraft//server/network/ServerGamePacketListenerImpl.java
3-
@@ -439,7 +439,7 @@
3+
@@ -438,7 +438,7 @@
44

55
public void handleRecipeBookSeenRecipePacket(ServerboundRecipeBookSeenRecipePacket serverboundrecipebookseenrecipepacket) {
66
PacketUtils.ensureRunningOnSameThread(serverboundrecipebookseenrecipepacket, this, this.player.getLevel());
@@ -9,7 +9,7 @@
99
ServerRecipeBook serverrecipebook = this.player.getRecipeBook();
1010

1111
Objects.requireNonNull(serverrecipebook);
12-
@@ -776,7 +776,7 @@
12+
@@ -763,7 +763,7 @@
1313
ListTag listtag = new ListTag();
1414

1515
if (this.player.isTextFilteringEnabled()) {
@@ -18,7 +18,7 @@
1818
return StringTag.valueOf((String) unaryoperator.apply(textfilter_filteredtext.getFiltered()));
1919
});
2020

21-
@@ -1111,7 +1111,11 @@
21+
@@ -1098,7 +1098,11 @@
2222

2323
public void handleResourcePackResponse(ServerboundResourcePackPacket serverboundresourcepackpacket) {
2424
PacketUtils.ensureRunningOnSameThread(serverboundresourcepackpacket, this, this.player.getLevel());
@@ -31,7 +31,7 @@
3131
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
3232
this.disconnect(new TranslatableComponent("multiplayer.requiredTexturePrompt.disconnect"));
3333
}
34-
@@ -1133,7 +1137,13 @@
34+
@@ -1120,7 +1124,13 @@
3535
public void onDisconnect(Component component) {
3636
ServerGamePacketListenerImpl.LOGGER.info("{} lost connection: {}", this.player.getName().getString(), component.getString());
3737
this.server.invalidateStatus();
@@ -46,7 +46,7 @@
4646
this.player.disconnect();
4747
this.server.getPlayerList().remove(this.player);
4848
this.player.getTextFilter().leave();
49-
@@ -1209,9 +1219,17 @@
49+
@@ -1196,9 +1206,17 @@
5050
TranslatableComponent translatablecomponent = s1.isEmpty() ? null : new TranslatableComponent("chat.type.text", new Object[]{this.player.getDisplayName(), s1});
5151
TranslatableComponent translatablecomponent1 = new TranslatableComponent("chat.type.text", new Object[]{this.player.getDisplayName(), s});
5252

server/patches/server/players/PlayerList.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft//server/players/PlayerList.java
22
+++ b/net/minecraft//server/players/PlayerList.java
3-
@@ -199,7 +199,12 @@
3+
@@ -201,7 +201,12 @@
44
translatablecomponent = new TranslatableComponent("multiplayer.player.joined.renamed", new Object[]{serverplayer.getDisplayName(), s});
55
}
66

@@ -14,23 +14,23 @@
1414
servergamepacketlistenerimpl.teleport(serverplayer.getX(), serverplayer.getY(), serverplayer.getZ(), serverplayer.getYRot(), serverplayer.getXRot());
1515
this.players.add(serverplayer);
1616
this.playersByUUID.put(serverplayer.getUUID(), serverplayer);
17-
@@ -552,6 +557,7 @@
17+
@@ -554,6 +559,7 @@
1818
while (iterator.hasNext()) {
1919
ServerPlayer serverplayer = (ServerPlayer) iterator.next();
2020

2121
+ if (org.loomdev.loom.entity.player.PlayerPacketFilter.shouldSend(serverplayer, packet)) // Loom :: player packet filter
2222
serverplayer.connection.send(packet);
2323
}
2424

25-
@@ -564,6 +570,7 @@
25+
@@ -566,6 +572,7 @@
2626
ServerPlayer serverplayer = (ServerPlayer) iterator.next();
2727

2828
if (serverplayer.level.dimension() == resourcekey) {
2929
+ if (org.loomdev.loom.entity.player.PlayerPacketFilter.shouldSend(serverplayer, packet)) // Loom :: player packet filter
3030
serverplayer.connection.send(packet);
3131
}
3232
}
33-
@@ -635,7 +642,7 @@
33+
@@ -637,7 +644,7 @@
3434
}
3535

3636
public void deop(GameProfile gameprofile) {

server/patches/world/entity/LivingEntity.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
protected LivingEntity(EntityType<? extends LivingEntity> entitytype, Level level) {
3232
super(entitytype, level);
33-
@@ -1848,7 +1859,7 @@
33+
@@ -1852,7 +1863,7 @@
3434
this.setItemSlot(EquipmentSlot.MAINHAND, itemstack);
3535
}
3636

@@ -39,7 +39,7 @@
3939
this.hurt(DamageSource.OUT_OF_WORLD, 4.0F);
4040
}
4141

42-
@@ -2675,7 +2686,7 @@
42+
@@ -2678,7 +2689,7 @@
4343
}
4444

4545
public boolean isSensitiveToWater() {
@@ -48,7 +48,7 @@
4848
}
4949

5050
private void updateFallFlying() {
51-
@@ -2972,7 +2983,7 @@
51+
@@ -2975,7 +2986,7 @@
5252

5353
}
5454

@@ -57,7 +57,7 @@
5757
byte b0 = (Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS);
5858
int j;
5959

60-
@@ -3260,7 +3271,7 @@
60+
@@ -3263,7 +3274,7 @@
6161
}
6262

6363
public void stopSleeping() {
@@ -66,7 +66,7 @@
6666
Level level = this.level;
6767

6868
java.util.Objects.requireNonNull(this.level);
69-
@@ -3292,7 +3303,7 @@
69+
@@ -3295,7 +3306,7 @@
7070

7171
@Nullable
7272
public Direction getBedOrientation() {

server/patches/world/entity/Mob.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft//world/entity/Mob.java
22
+++ b/net/minecraft//world/entity/Mob.java
3-
@@ -99,7 +99,7 @@
3+
@@ -100,7 +100,7 @@
44
private final NonNullList<ItemStack> armorItems;
55
protected final float[] armorDropChances;
66
private boolean canPickUpLoot;
@@ -9,7 +9,7 @@
99
private final Map<BlockPathTypes, Float> pathfindingMalus;
1010
private ResourceLocation lootTable;
1111
private long lootTableSeed;
12-
@@ -1107,7 +1107,7 @@
12+
@@ -1108,7 +1108,7 @@
1313
if (itemstack.getItem() instanceof SpawnEggItem) {
1414
if (this.level instanceof ServerLevel) {
1515
SpawnEggItem spawneggitem = (SpawnEggItem) itemstack.getItem();
@@ -18,7 +18,7 @@
1818

1919
optional.ifPresent((mob) -> {
2020
this.onOffspringSpawnedFromEgg(player, mob);
21-
@@ -1162,7 +1162,7 @@
21+
@@ -1163,7 +1163,7 @@
2222
if (this.isRemoved()) {
2323
return null;
2424
} else {

server/patches/world/entity/animal/TropicalFish.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft//world/entity/animal/TropicalFish.java
22
+++ b/net/minecraft//world/entity/animal/TropicalFish.java
3-
@@ -199,7 +199,7 @@
3+
@@ -195,7 +195,7 @@
44
}
55
}
66

0 commit comments

Comments
 (0)