Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
coehlrich committed Nov 6, 2024
1 parent efa6c9e commit 8316876
Show file tree
Hide file tree
Showing 19 changed files with 84 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java
@@ -2210,6 +2210,7 @@
@@ -2201,6 +2201,7 @@
case EntityHitResult entityhitresult:
this.gameMode.handlePickItemFromEntity(entityhitresult.getEntity(), flag);
break;
+ default:
}
}
}
@@ -2304,7 +2305,7 @@
@@ -2295,7 +2296,7 @@
}

public CompletableFuture<Void> delayTextureReload() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/client/data/Main.java
+++ b/net/minecraft/client/data/Main.java
@@ -18,7 +18,7 @@
public class Main {
@DontObfuscate
@SuppressForbidden(
- a = "System.out needed before bootstrap"
+ reason = "System.out needed before bootstrap"
)
public static void main(String[] p_388033_) throws IOException {
SharedConstants.tryDetectVersion();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/block/model/multipart/MultiPart.java
+++ b/net/minecraft/client/renderer/block/model/multipart/MultiPart.java
@@ -45,17 +45,9 @@
@@ -41,17 +41,9 @@
}
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java
@@ -2213,6 +2213,7 @@
@@ -2204,6 +2204,7 @@
case EntityHitResult entityhitresult:
this.gameMode.handlePickItemFromEntity(entityhitresult.getEntity(), flag);
break;
+ default:
}
}
}
@@ -2307,7 +2308,7 @@
@@ -2298,7 +2299,7 @@
}

public CompletableFuture<Void> delayTextureReload() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/client/data/Main.java
+++ b/net/minecraft/client/data/Main.java
@@ -21,7 +21,7 @@
public class Main {
@DontObfuscate
@SuppressForbidden(
- a = "System.out needed before bootstrap"
+ reason = "System.out needed before bootstrap"
)
public static void main(String[] p_388033_) throws IOException {
SharedConstants.tryDetectVersion();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/block/model/multipart/MultiPart.java
+++ b/net/minecraft/client/renderer/block/model/multipart/MultiPart.java
@@ -49,17 +49,9 @@
@@ -45,17 +45,9 @@
}

@OnlyIn(Dist.CLIENT)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/data/Main.java
+++ b/net/minecraft/data/Main.java
@@ -63,7 +63,7 @@

public class Main {
@SuppressForbidden(
- a = "System.out needed before bootstrap"
+ reason = "System.out needed before bootstrap"
)
@DontObfuscate
public static void main(String[] p_129669_) throws IOException {
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/resources/HolderSetCodec.java
+++ b/net/minecraft/resources/HolderSetCodec.java
@@ -70,7 +70,7 @@
@@ -64,7 +64,7 @@

private static <E> DataResult<HolderSet<E>> lookupTag(HolderGetter<E> p_332757_, TagKey<E> p_332743_) {
return p_332757_.get(p_332743_)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/server/Bootstrap.java
+++ b/net/minecraft/server/Bootstrap.java
@@ -32,7 +32,7 @@
import org.slf4j.Logger;

@SuppressForbidden(
- a = "System.out setup"
+ reason = "System.out setup"
)
public class Bootstrap {
public static final PrintStream STDOUT = System.out;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -65,7 +65,7 @@
private static final Logger LOGGER = LogUtils.getLogger();

@SuppressForbidden(
- a = "System.out needed before bootstrap"
+ reason = "System.out needed before bootstrap"
)
@DontObfuscate
public static void main(String[] p_129699_) {
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -424,6 +424,7 @@
@@ -425,6 +425,7 @@
}

entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
+ double d11 = d7;
d6 = d3 - entity.getX();
d7 = d4 - entity.getY();
if (d7 > -0.5 || d7 < 0.5) {
@@ -451,7 +452,7 @@
Vec3 vec3 = new Vec3(entity.getX() - d0, entity.getY() - d1, entity.getZ() - d2);
@@ -453,7 +454,7 @@
this.handlePlayerKnownMovement(vec3);
entity.setOnGroundWithMovement(p_9876_.onGround(), vec3);
this.player.checkMovementStatistics(vec3.x, vec3.y, vec3.z);
- this.clientVehicleIsFloating = d7 >= -0.03125
+ this.clientVehicleIsFloating = d11 >= -0.03125
&& !flag1
&& !this.server.isFlightAllowed()
&& !entity.isNoGravity()
@@ -844,7 +845,7 @@
@@ -850,7 +851,7 @@
if (itemstack.has(DataComponents.WRITABLE_BOOK_CONTENT)) {
ItemStack itemstack1 = itemstack.transmuteCopy(Items.WRITTEN_BOOK);
itemstack1.remove(DataComponents.WRITABLE_BOOK_CONTENT);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/util/ExtraCodecs.java
+++ b/net/minecraft/util/ExtraCodecs.java
@@ -232,7 +232,7 @@
@@ -234,7 +234,7 @@
P p1 = p_184445_.get(1);
return p_184365_.apply(p, p1);
}), p_184459_ -> ImmutableList.of(p_184366_.apply((I)p_184459_), p_184367_.apply((I)p_184459_)));
Expand All @@ -9,7 +9,7 @@
p_184360_ -> p_184360_.group(p_184362_.fieldOf(p_184363_).forGetter(Pair::getFirst), p_184362_.fieldOf(p_184364_).forGetter(Pair::getSecond))
.apply(p_184360_, Pair::of)
)
@@ -515,7 +515,7 @@
@@ -545,7 +545,7 @@
public <T> RecordBuilder<T> encode(V p_312741_, DynamicOps<T> p_312649_, RecordBuilder<T> p_312297_) {
K k = (K)p_312622_.apply(p_312741_);
p_312297_.add(p_312812_, p_312848_.encodeStart(p_312649_, k));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/util/datafix/DataFixers.java
+++ b/net/minecraft/util/datafix/DataFixers.java
@@ -1099,7 +1099,7 @@
@@ -1103,7 +1103,7 @@
Schema schema161 = p_14514_.addSchema(3086, SAME_NAMESPACED);
p_14514_.addFixer(
new EntityVariantFix(
Expand All @@ -9,7 +9,7 @@
p_216528_.defaultReturnValue("minecraft:tabby");
p_216528_.put(0, "minecraft:tabby");
p_216528_.put(1, "minecraft:black");
@@ -1139,7 +1139,7 @@
@@ -1143,7 +1143,7 @@
Schema schema162 = p_14514_.addSchema(3087, SAME_NAMESPACED);
p_14514_.addFixer(
new EntityVariantFix(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -488,7 +488,7 @@
@@ -492,7 +492,7 @@

this.firstTick = false;
if (this.level() instanceof ServerLevel serverlevel1 && this instanceof Leashable) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/animal/Sheep.java
+++ b/net/minecraft/world/entity/animal/Sheep.java
@@ -58,7 +58,7 @@
@@ -53,7 +53,7 @@
private static final int EAT_ANIMATION_TICKS = 40;
private static final EntityDataAccessor<Byte> DATA_WOOL_ID = SynchedEntityData.defineId(Sheep.class, EntityDataSerializers.BYTE);
private static final Map<DyeColor, Integer> COLOR_BY_DYE = Maps.newEnumMap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
+ ImmutableList.<net.minecraft.world.entity.ai.behavior.BehaviorControl<? super Piglin>>of(
avoidRepellent(),
SetEntityLookTarget.create(PiglinAi::isPlayerHoldingLovedItem, 14.0F),
StartAttacking.<Piglin>create((p_381526_, p_381527_) -> p_381527_.isAdult(), PiglinAi::findNearestValidAttackTarget),
StartAttacking.<Piglin>create((p_386321_, p_386322_) -> p_386322_.isAdult(), PiglinAi::findNearestValidAttackTarget),
- BehaviorBuilder.triggerIf(p_34804_ -> !p_34804_.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)),
- BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)),
- new RunOne<LivingEntity>(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java
+++ b/net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java
@@ -23,7 +23,7 @@

public class SetCustomModelDataFunction extends LootItemConditionalFunction {
private static final Codec<NumberProvider> COLOR_PROVIDER_CODEC = Codec.withAlternative(
- NumberProviders.CODEC, ExtraCodecs.RGB_COLOR_CODEC, ConstantValue::new
+ NumberProviders.CODEC, ExtraCodecs.RGB_COLOR_CODEC, integer -> new ConstantValue((float) integer)
);
public static final MapCodec<SetCustomModelDataFunction> CODEC = RecordCodecBuilder.mapCodec(
p_386432_ -> commonFields(p_386432_)

0 comments on commit 8316876

Please sign in to comment.