Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
coehlrich committed Oct 2, 2024
1 parent e603680 commit f0ef275
Show file tree
Hide file tree
Showing 31 changed files with 398 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
@@ -367,24 +367,23 @@
}

class WorldTemplateList extends RealmsObjectSelectionList<RealmsSelectWorldTemplateScreen.Entry> {
class WorldTemplateList extends ObjectSelectionList<RealmsSelectWorldTemplateScreen.Entry> {
- public WorldTemplateList(RealmsSelectWorldTemplateScreen param1) {
- this(var1, Collections.emptyList());
+ public WorldTemplateList() {
+ this(Collections.emptyList());
}

- public WorldTemplateList(Iterable<WorldTemplate> param1, Iterable p_313798_) {
- super(var1.width, var1.height - 33 - var1.getHeaderHeight(), var1.getHeaderHeight(), 46);
- super(Minecraft.getInstance(), var1.width, var1.height - 33 - var1.getHeaderHeight(), var1.getHeaderHeight(), 46);
- this.this$0 = var1;
+ public WorldTemplateList(Iterable<WorldTemplate> p_313798_) {
+ super(RealmsSelectWorldTemplateScreen.this.width, RealmsSelectWorldTemplateScreen.this.height - 33 - RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), 46);
+ super(Minecraft.getInstance(), RealmsSelectWorldTemplateScreen.this.width, RealmsSelectWorldTemplateScreen.this.height - 33 - RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), 46);
p_313798_.forEach(this::addEntry);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
--- a/net/minecraft/client/gui/Font.java
+++ b/net/minecraft/client/gui/Font.java
@@ -138,7 +138,7 @@
) {
int i = adjustColor(p_168650_);
Font.StringRenderOutput font$stringrenderoutput = new Font.StringRenderOutput(
- this, p_168652_, 0.0F, 0.0F, i, false, p_254170_, Font.DisplayMode.NORMAL, p_168653_
+ p_168652_, 0.0F, 0.0F, i, false, p_254170_, Font.DisplayMode.NORMAL, p_168653_
);

for (int j = -1; j <= 1; j++) {
@@ -161,7 +161,7 @@
}

Font.StringRenderOutput font$stringrenderoutput1 = new Font.StringRenderOutput(
- this, p_168652_, p_168647_, p_168648_, adjustColor(p_168649_), false, p_254170_, Font.DisplayMode.POLYGON_OFFSET, p_168653_
+ p_168652_, p_168647_, p_168648_, adjustColor(p_168649_), false, p_254170_, Font.DisplayMode.POLYGON_OFFSET, p_168653_
);
p_168646_.accept(font$stringrenderoutput1);
font$stringrenderoutput1.finish();
@@ -235,7 +235,7 @@
int p_273199_
) {
Font.StringRenderOutput font$stringrenderoutput = new Font.StringRenderOutput(
- this, p_272595_, p_273532_, p_272783_, p_273217_, p_273727_, p_273583_, p_272734_, p_273610_, p_273199_
+ p_272595_, p_273532_, p_272783_, p_273217_, p_273727_, p_273583_, p_272734_, p_273610_, p_273199_
);
StringDecomposer.iterateFormatted(p_273765_, Style.EMPTY, font$stringrenderoutput);
return font$stringrenderoutput.finish();
@@ -254,7 +254,7 @@
int p_273371_
) {
Font.StringRenderOutput font$stringrenderoutput = new Font.StringRenderOutput(
- this, p_273392_, p_272632_, p_273541_, p_273200_, p_273774_, p_273312_, p_273276_, p_272625_, p_273371_
+ p_273392_, p_272632_, p_273541_, p_273200_, p_273774_, p_273312_, p_273276_, p_272625_, p_273371_
);
p_273322_.accept(font$stringrenderoutput);
return font$stringrenderoutput.finish();
@@ -351,7 +351,6 @@
}

public StringRenderOutput(
- Font param1,
MultiBufferSource p_181365_,
float p_181366_,
float p_181367_,
@@ -361,11 +360,10 @@
Font.DisplayMode p_181371_,
int p_181372_
) {
- this(var1, p_181365_, p_181366_, p_181367_, p_181368_, 0, p_181369_, p_254510_, p_181371_, p_181372_);
+ this(p_181365_, p_181366_, p_181367_, p_181368_, 0, p_181369_, p_254510_, p_181371_, p_181372_);
}

public StringRenderOutput(
- Font param1,
MultiBufferSource p_379354_,
float p_380215_,
float p_380204_,
@@ -376,7 +374,6 @@
Font.DisplayMode p_380021_,
int p_379625_
) {
- this.this$0 = var1;
this.bufferSource = p_379354_;
this.x = p_380215_;
this.y = p_380204_;
@@ -391,8 +388,8 @@

@Override
public boolean accept(int p_92967_, Style p_92968_, int p_92969_) {
- FontSet fontset = this.this$0.getFontSet(p_92968_.getFont());
- GlyphInfo glyphinfo = fontset.getGlyphInfo(p_92969_, this.this$0.filterFishyGlyphs);
+ FontSet fontset = Font.this.getFontSet(p_92968_.getFont());
+ GlyphInfo glyphinfo = fontset.getGlyphInfo(p_92969_, Font.this.filterFishyGlyphs);
BakedGlyph bakedglyph = p_92968_.isObfuscated() && p_92969_ != 32 ? fontset.getRandomGlyph(glyphinfo) : fontset.getGlyph(p_92969_);
boolean flag = p_92968_.isBold();
TextColor textcolor = p_92968_.getColor();
@@ -401,7 +398,7 @@
float f1 = p_92967_ == 0 ? this.x - 1.0F : this.x;
if (this.backgroundColor != 0) {
BakedGlyph.Effect bakedglyph$effect = new BakedGlyph.Effect(f1, this.y + 9.0F, this.x + f, this.y - 1.0F, -0.01F, this.backgroundColor);
- BakedGlyph bakedglyph1 = this.this$0.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
+ BakedGlyph bakedglyph1 = Font.this.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
VertexConsumer vertexconsumer = this.bufferSource.getBuffer(bakedglyph1.renderType(this.mode));
bakedglyph1.renderEffect(bakedglyph$effect, this.pose, vertexconsumer, this.packedLightCoords);
}
@@ -410,7 +407,7 @@
float f2 = flag ? glyphinfo.getBoldOffset() : 0.0F;
float f4 = this.dropShadow ? glyphinfo.getShadowOffset() : 0.0F;
VertexConsumer vertexconsumer1 = this.bufferSource.getBuffer(bakedglyph.renderType(this.mode));
- this.this$0
+ Font.this
.renderChar(bakedglyph, flag, p_92968_.isItalic(), f2, this.x + f4, this.y + f4, this.pose, vertexconsumer1, i, this.packedLightCoords);
}

@@ -429,7 +426,7 @@

public float finish() {
if (this.effects != null) {
- BakedGlyph bakedglyph = this.this$0.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
+ BakedGlyph bakedglyph = Font.this.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
VertexConsumer vertexconsumer = this.bufferSource.getBuffer(bakedglyph.renderType(this.mode));

for (BakedGlyph.Effect bakedglyph$effect : this.effects) {
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java
+++ b/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java
@@ -74,15 +74,14 @@
);
break;
case ShapelessCraftingRecipeDisplay shapelesscraftingrecipedisplay:
- label15: {
List<Slot> list = this.menu.getInputGridSlots();
int i = Math.min(shapelesscraftingrecipedisplay.ingredients().size(), list.size());

for (int j = 0; j < i; j++) {
p_379930_.setInput(list.get(j), p_379430_, shapelesscraftingrecipedisplay.ingredients().get(j));
}
- break label15;
- }
+ break;
+ default:
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java
+++ b/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java
@@ -207,7 +207,6 @@
);
break;
case ShapelessCraftingRecipeDisplay shapelesscraftingrecipedisplay:
- label19: {
List<SlotDisplay> list1 = shapelesscraftingrecipedisplay.ingredients();

for (int i = 0; i < list1.size(); i++) {
@@ -216,8 +215,8 @@
list.add(createGridPos(i % 3, i / 3, list2));
}
}
- break label19;
- }
+ break;
+ default:
}

return list;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java
+++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java
@@ -308,7 +308,7 @@
@@ -314,7 +314,7 @@
public Component describePreset() {
return Optional.ofNullable(this.preset)
.flatMap(Holder::unwrapKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
@@ -372,24 +372,23 @@

@OnlyIn(Dist.CLIENT)
class WorldTemplateList extends RealmsObjectSelectionList<RealmsSelectWorldTemplateScreen.Entry> {
class WorldTemplateList extends ObjectSelectionList<RealmsSelectWorldTemplateScreen.Entry> {
- public WorldTemplateList(RealmsSelectWorldTemplateScreen param1) {
- this(var1, Collections.emptyList());
+ public WorldTemplateList() {
+ this(Collections.emptyList());
}

- public WorldTemplateList(Iterable<WorldTemplate> param1, Iterable p_313798_) {
- super(var1.width, var1.height - 33 - var1.getHeaderHeight(), var1.getHeaderHeight(), 46);
- super(Minecraft.getInstance(), var1.width, var1.height - 33 - var1.getHeaderHeight(), var1.getHeaderHeight(), 46);
- this.this$0 = var1;
+ public WorldTemplateList(Iterable<WorldTemplate> p_313798_) {
+ super(RealmsSelectWorldTemplateScreen.this.width, RealmsSelectWorldTemplateScreen.this.height - 33 - RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), 46);
+ super(Minecraft.getInstance(), RealmsSelectWorldTemplateScreen.this.width, RealmsSelectWorldTemplateScreen.this.height - 33 - RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), RealmsSelectWorldTemplateScreen.this.getHeaderHeight(), 46);
p_313798_.forEach(this::addEntry);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
--- a/net/minecraft/client/gui/Font.java
+++ b/net/minecraft/client/gui/Font.java
@@ -141,7 +141,7 @@
) {
int i = adjustColor(p_168650_);
Font.StringRenderOutput font$stringrenderoutput = new Font.StringRenderOutput(
- this, p_168652_, 0.0F, 0.0F, i, false, p_254170_, Font.DisplayMode.NORMAL, p_168653_
+ p_168652_, 0.0F, 0.0F, i, false, p_254170_, Font.DisplayMode.NORMAL, p_168653_
);

for (int j = -1; j <= 1; j++) {
@@ -164,7 +164,7 @@
}

Font.StringRenderOutput font$stringrenderoutput1 = new Font.StringRenderOutput(
- this, p_168652_, p_168647_, p_168648_, adjustColor(p_168649_), false, p_254170_, Font.DisplayMode.POLYGON_OFFSET, p_168653_
+ p_168652_, p_168647_, p_168648_, adjustColor(p_168649_), false, p_254170_, Font.DisplayMode.POLYGON_OFFSET, p_168653_
);
p_168646_.accept(font$stringrenderoutput1);
font$stringrenderoutput1.finish();
@@ -238,7 +238,7 @@
int p_273199_
) {
Font.StringRenderOutput font$stringrenderoutput = new Font.StringRenderOutput(
- this, p_272595_, p_273532_, p_272783_, p_273217_, p_273727_, p_273583_, p_272734_, p_273610_, p_273199_
+ p_272595_, p_273532_, p_272783_, p_273217_, p_273727_, p_273583_, p_272734_, p_273610_, p_273199_
);
StringDecomposer.iterateFormatted(p_273765_, Style.EMPTY, font$stringrenderoutput);
return font$stringrenderoutput.finish();
@@ -257,7 +257,7 @@
int p_273371_
) {
Font.StringRenderOutput font$stringrenderoutput = new Font.StringRenderOutput(
- this, p_273392_, p_272632_, p_273541_, p_273200_, p_273774_, p_273312_, p_273276_, p_272625_, p_273371_
+ p_273392_, p_272632_, p_273541_, p_273200_, p_273774_, p_273312_, p_273276_, p_272625_, p_273371_
);
p_273322_.accept(font$stringrenderoutput);
return font$stringrenderoutput.finish();
@@ -356,7 +356,6 @@
}

public StringRenderOutput(
- Font param1,
MultiBufferSource p_181365_,
float p_181366_,
float p_181367_,
@@ -366,11 +365,10 @@
Font.DisplayMode p_181371_,
int p_181372_
) {
- this(var1, p_181365_, p_181366_, p_181367_, p_181368_, 0, p_181369_, p_254510_, p_181371_, p_181372_);
+ this(p_181365_, p_181366_, p_181367_, p_181368_, 0, p_181369_, p_254510_, p_181371_, p_181372_);
}

public StringRenderOutput(
- Font param1,
MultiBufferSource p_379354_,
float p_380215_,
float p_380204_,
@@ -381,7 +379,6 @@
Font.DisplayMode p_380021_,
int p_379625_
) {
- this.this$0 = var1;
this.bufferSource = p_379354_;
this.x = p_380215_;
this.y = p_380204_;
@@ -396,8 +393,8 @@

@Override
public boolean accept(int p_92967_, Style p_92968_, int p_92969_) {
- FontSet fontset = this.this$0.getFontSet(p_92968_.getFont());
- GlyphInfo glyphinfo = fontset.getGlyphInfo(p_92969_, this.this$0.filterFishyGlyphs);
+ FontSet fontset = Font.this.getFontSet(p_92968_.getFont());
+ GlyphInfo glyphinfo = fontset.getGlyphInfo(p_92969_, Font.this.filterFishyGlyphs);
BakedGlyph bakedglyph = p_92968_.isObfuscated() && p_92969_ != 32 ? fontset.getRandomGlyph(glyphinfo) : fontset.getGlyph(p_92969_);
boolean flag = p_92968_.isBold();
TextColor textcolor = p_92968_.getColor();
@@ -406,7 +403,7 @@
float f1 = p_92967_ == 0 ? this.x - 1.0F : this.x;
if (this.backgroundColor != 0) {
BakedGlyph.Effect bakedglyph$effect = new BakedGlyph.Effect(f1, this.y + 9.0F, this.x + f, this.y - 1.0F, -0.01F, this.backgroundColor);
- BakedGlyph bakedglyph1 = this.this$0.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
+ BakedGlyph bakedglyph1 = Font.this.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
VertexConsumer vertexconsumer = this.bufferSource.getBuffer(bakedglyph1.renderType(this.mode));
bakedglyph1.renderEffect(bakedglyph$effect, this.pose, vertexconsumer, this.packedLightCoords);
}
@@ -415,7 +412,7 @@
float f2 = flag ? glyphinfo.getBoldOffset() : 0.0F;
float f4 = this.dropShadow ? glyphinfo.getShadowOffset() : 0.0F;
VertexConsumer vertexconsumer1 = this.bufferSource.getBuffer(bakedglyph.renderType(this.mode));
- this.this$0
+ Font.this
.renderChar(bakedglyph, flag, p_92968_.isItalic(), f2, this.x + f4, this.y + f4, this.pose, vertexconsumer1, i, this.packedLightCoords);
}

@@ -434,7 +431,7 @@

public float finish() {
if (this.effects != null) {
- BakedGlyph bakedglyph = this.this$0.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
+ BakedGlyph bakedglyph = Font.this.getFontSet(Style.DEFAULT_FONT).whiteGlyph();
VertexConsumer vertexconsumer = this.bufferSource.getBuffer(bakedglyph.renderType(this.mode));

for (BakedGlyph.Effect bakedglyph$effect : this.effects) {
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java
+++ b/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java
@@ -77,15 +77,14 @@
);
break;
case ShapelessCraftingRecipeDisplay shapelesscraftingrecipedisplay:
- label15: {
List<Slot> list = this.menu.getInputGridSlots();
int i = Math.min(shapelesscraftingrecipedisplay.ingredients().size(), list.size());

for (int j = 0; j < i; j++) {
p_379930_.setInput(list.get(j), p_379430_, shapelesscraftingrecipedisplay.ingredients().get(j));
}
- break label15;
- }
+ break;
+ default:
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java
+++ b/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java
@@ -211,7 +211,6 @@
);
break;
case ShapelessCraftingRecipeDisplay shapelesscraftingrecipedisplay:
- label19: {
List<SlotDisplay> list1 = shapelesscraftingrecipedisplay.ingredients();

for (int i = 0; i < list1.size(); i++) {
@@ -220,8 +219,8 @@
list.add(createGridPos(i % 3, i / 3, list2));
}
}
- break label19;
- }
+ break;
+ default:
}

return list;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java
+++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java
@@ -313,7 +313,7 @@
@@ -319,7 +319,7 @@
public Component describePreset() {
return Optional.ofNullable(this.preset)
.flatMap(Holder::unwrapKey)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/advancements/critereon/PlayerPredicate.java
+++ b/net/minecraft/advancements/critereon/PlayerPredicate.java
@@ -242,11 +242,11 @@
@@ -245,11 +245,11 @@
private static <T> MapCodec<PlayerPredicate.StatMatcher<T>> createTypedCodec(StatType<T> p_299086_) {
return RecordCodecBuilder.mapCodec(
p_337389_ -> p_337389_.group(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/Commands.java
+++ b/net/minecraft/commands/Commands.java
@@ -377,7 +377,7 @@
@@ -379,7 +379,7 @@
) {
for (CommandNode<CommandSourceStack> commandnode : p_82113_.getChildren()) {
if (commandnode.canUse(p_82115_)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/synchronization/SuggestionProviders.java
+++ b/net/minecraft/commands/synchronization/SuggestionProviders.java
@@ -49,7 +49,7 @@
@@ -45,7 +45,7 @@
throw new IllegalArgumentException("A command suggestion provider is already registered with the name " + p_121659_);
} else {
PROVIDERS_BY_NAME.put(p_121659_, p_121660_);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/core/registries/BuiltInRegistries.java
+++ b/net/minecraft/core/registries/BuiltInRegistries.java
@@ -316,7 +316,7 @@
@@ -322,7 +322,7 @@
Bootstrap.checkBootstrapCalled(() -> "registry " + p_259230_);
ResourceLocation resourcelocation = p_259230_.location();
LOADERS.put(resourcelocation, () -> p_259210_.run(p_260327_));
Expand Down
Loading

0 comments on commit f0ef275

Please sign in to comment.