MinecraftForge / ForgeFlower

Forge's modifications to FernFlower. Fixing various bugs/inconsistencies. Main Repo: https://github.com/MinecraftForge/FernFlower
Apache License 2.0
80 stars 44 forks source link

Rebase on to latest commit for FernFlower #114

Closed coehlrich closed 2 years ago

coehlrich commented 2 years ago

FernFlower has had a major refactor since the last time there was a rebase including a transition from ints to enums and fields to getters, GenericType and VarType now implement a common interface. the getCastTypeName method now takes a list of TypeAnnotationWriteHelpers.

the source version argument defaults to -1 then is converted to class file versions by adding 44 and for each class is which of the argument or the class file version is higher.

22w11a diff without nested names and whitespace changes 22w11a diff without nested names (23014 lines) complete 22w11a diff (57712 lines) 22w11a diff/1.16.5 diff with -sjv=16 based on https://github.com/MinecraftForge/ForgeFlower/pull/114/commits/bec2e0ff43e6f7696541cd8360c6134e4290b171

(Also adds support for sealed classes but Mojang doesn't currently use sealed classes)

zml2008 commented 2 years ago

Thank you for this PR! The rebase itself looks good to me.

Could you split out the patch to add a Java version parameter into another PR? I think it needs a bit more work before it's useful. Most notably:

zml2008 commented 2 years ago
Diff from the latest commit (1.18.2): ```diff diff -r -u3 -N a/com/mojang/blaze3d/platform/InputConstants.java b/com/mojang/blaze3d/platform/InputConstants.java --- a/com/mojang/blaze3d/platform/InputConstants.java 2022-05-24 17:47:14.000000000 -0700 +++ b/com/mojang/blaze3d/platform/InputConstants.java 2022-05-25 22:50:12.000000000 -0700 @@ -316,7 +316,7 @@ } public Key getOrCreate(int $$0) { - return this.map.computeIfAbsent($$0, (Int2ObjectFunction)(($$0x) -> { + return this.map.computeIfAbsent($$0, (Int2ObjectFunction)(($$0x) -> { int $$1 = $$0x; if (this == MOUSE) { $$1 = $$0x + 1; diff -r -u3 -N a/net/minecraft/advancements/critereon/MinMaxBounds.java b/net/minecraft/advancements/critereon/MinMaxBounds.java --- a/net/minecraft/advancements/critereon/MinMaxBounds.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/advancements/critereon/MinMaxBounds.java 2022-05-25 22:50:12.000000000 -0700 @@ -61,7 +61,7 @@ } } - protected static > R fromJson(@Nullable JsonElement $$0, R $$1, BiFunction $$2, MinMaxBounds.BoundsFactory $$3) { + protected static > R fromJson(@Nullable JsonElement $$0, R $$1, BiFunction $$2, BoundsFactory $$3) { if ($$0 != null && !$$0.isJsonNull()) { if (GsonHelper.isNumberValue($$0)) { T $$4 = (T)($$2.apply($$0, "value")); @@ -77,7 +77,7 @@ } } - protected static > R fromReader(StringReader $$0, MinMaxBounds.BoundsFromReaderFactory $$1, Function $$2, Supplier $$3, Function $$4) throws CommandSyntaxException { + protected static > R fromReader(StringReader $$0, BoundsFromReaderFactory $$1, Function $$2, Supplier $$3, Function $$4) throws CommandSyntaxException { if (!$$0.canRead()) { throw ERROR_EMPTY.createWithContext($$0); } else { diff -r -u3 -N a/net/minecraft/advancements/CriterionTrigger.java b/net/minecraft/advancements/CriterionTrigger.java --- a/net/minecraft/advancements/CriterionTrigger.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/advancements/CriterionTrigger.java 2022-05-25 22:50:12.000000000 -0700 @@ -8,9 +8,9 @@ public interface CriterionTrigger { ResourceLocation getId(); - void addPlayerListener(PlayerAdvancements var1, CriterionTrigger.Listener var2); + void addPlayerListener(PlayerAdvancements var1, Listener var2); - void removePlayerListener(PlayerAdvancements var1, CriterionTrigger.Listener var2); + void removePlayerListener(PlayerAdvancements var1, Listener var2); void removePlayerListeners(PlayerAdvancements var1); @@ -39,7 +39,7 @@ if (this == $$0) { return true; } else if ($$0 != null && this.getClass() == $$0.getClass()) { - CriterionTrigger.Listener $$1 = (Listener)$$0; + Listener $$1 = (Listener)$$0; if (!this.trigger.equals($$1.trigger)) { return false; } else { diff -r -u3 -N a/net/minecraft/client/CycleOption.java b/net/minecraft/client/CycleOption.java --- a/net/minecraft/client/CycleOption.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/CycleOption.java 2022-05-25 22:50:12.000000000 -0700 @@ -11,43 +11,43 @@ import net.minecraft.util.FormattedCharSequence; public class CycleOption extends Option { - private final CycleOption.OptionSetter setter; + private final OptionSetter setter; private final Function getter; private final Supplier> buttonSetup; private Function> tooltip = ($$0x) -> ($$0) -> ImmutableList.of(); - private CycleOption(String $$0, Function $$1, CycleOption.OptionSetter $$2, Supplier> $$3) { + private CycleOption(String $$0, Function $$1, OptionSetter $$2, Supplier> $$3) { super($$0); this.getter = $$1; this.setter = $$2; this.buttonSetup = $$3; } - public static CycleOption create(String $$0, List $$1, Function $$2, Function $$3, CycleOption.OptionSetter $$4) { + public static CycleOption create(String $$0, List $$1, Function $$2, Function $$3, OptionSetter $$4) { return new CycleOption<>($$0, $$3, $$4, () -> CycleButton.builder($$2).withValues($$1)); } - public static CycleOption create(String $$0, Supplier> $$1, Function $$2, Function $$3, CycleOption.OptionSetter $$4) { + public static CycleOption create(String $$0, Supplier> $$1, Function $$2, Function $$3, OptionSetter $$4) { return new CycleOption<>($$0, $$3, $$4, () -> CycleButton.builder($$2).withValues((List)$$1.get())); } - public static CycleOption create(String $$0, List $$1, List $$2, BooleanSupplier $$3, Function $$4, Function $$5, CycleOption.OptionSetter $$6) { + public static CycleOption create(String $$0, List $$1, List $$2, BooleanSupplier $$3, Function $$4, Function $$5, OptionSetter $$6) { return new CycleOption<>($$0, $$5, $$6, () -> CycleButton.builder($$4).withValues($$3, $$1, $$2)); } - public static CycleOption create(String $$0, T[] $$1, Function $$2, Function $$3, CycleOption.OptionSetter $$4) { + public static CycleOption create(String $$0, T[] $$1, Function $$2, Function $$3, OptionSetter $$4) { return new CycleOption<>($$0, $$3, $$4, () -> CycleButton.builder($$2).withValues($$1)); } - public static CycleOption createBinaryOption(String $$0, Component $$1, Component $$2, Function $$3, CycleOption.OptionSetter $$4) { + public static CycleOption createBinaryOption(String $$0, Component $$1, Component $$2, Function $$3, OptionSetter $$4) { return new CycleOption($$0, $$3, $$4, () -> CycleButton.booleanBuilder($$1, $$2)); } - public static CycleOption createOnOff(String $$0, Function $$1, CycleOption.OptionSetter $$2) { + public static CycleOption createOnOff(String $$0, Function $$1, OptionSetter $$2) { return new CycleOption($$0, $$1, $$2, CycleButton::onOffBuilder); } - public static CycleOption createOnOff(String $$0, Component $$1, Function $$2, CycleOption.OptionSetter $$3) { + public static CycleOption createOnOff(String $$0, Component $$1, Function $$2, OptionSetter $$3) { return createOnOff($$0, $$2, $$3).setTooltip(($$1x) -> { List $$2 = $$1x.font.split($$1, 200); return ($$1xx) -> $$2; diff -r -u3 -N a/net/minecraft/client/gui/components/AbstractSelectionList.java b/net/minecraft/client/gui/components/AbstractSelectionList.java --- a/net/minecraft/client/gui/components/AbstractSelectionList.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/components/AbstractSelectionList.java 2022-05-25 22:50:12.000000000 -0700 @@ -513,7 +513,7 @@ return this.hovered; } - void bindEntryToSelf(AbstractSelectionList.Entry $$0) { + void bindEntryToSelf(Entry $$0) { $$0.list = this; } @@ -528,7 +528,7 @@ } - public abstract static class Entry> implements GuiEventListener { + public abstract static class Entry> implements GuiEventListener { /** @deprecated */ @Deprecated AbstractSelectionList list; diff -r -u3 -N a/net/minecraft/client/gui/components/ContainerObjectSelectionList.java b/net/minecraft/client/gui/components/ContainerObjectSelectionList.java --- a/net/minecraft/client/gui/components/ContainerObjectSelectionList.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/components/ContainerObjectSelectionList.java 2022-05-25 22:50:12.000000000 -0700 @@ -52,7 +52,7 @@ $$0.add(NarratedElementType.USAGE, (Component)(new TranslatableComponent("narration.component_list.usage"))); } - public abstract static class Entry> extends AbstractSelectionList.Entry implements ContainerEventHandler { + public abstract static class Entry> extends AbstractSelectionList.Entry implements ContainerEventHandler { @Nullable private GuiEventListener focused; @Nullable diff -r -u3 -N a/net/minecraft/client/gui/components/CycleButton.java b/net/minecraft/client/gui/components/CycleButton.java --- a/net/minecraft/client/gui/components/CycleButton.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/components/CycleButton.java 2022-05-25 22:50:12.000000000 -0700 @@ -21,14 +21,14 @@ private final Component name; private int index; private T value; - private final CycleButton.ValueListSupplier values; + private final ValueListSupplier values; private final Function valueStringifier; private final Function, MutableComponent> narrationProvider; - private final CycleButton.OnValueChange onValueChange; - private final CycleButton.TooltipSupplier tooltipSupplier; + private final OnValueChange onValueChange; + private final TooltipSupplier tooltipSupplier; private final boolean displayOnlyValue; - CycleButton(int $$0, int $$1, int $$2, int $$3, Component $$4, Component $$5, int $$6, T $$7, CycleButton.ValueListSupplier $$8, Function $$9, Function, MutableComponent> $$10, CycleButton.OnValueChange $$11, CycleButton.TooltipSupplier $$12, boolean $$13) { + CycleButton(int $$0, int $$1, int $$2, int $$3, Component $$4, Component $$5, int $$6, T $$7, ValueListSupplier $$8, Function $$9, Function, MutableComponent> $$10, OnValueChange $$11, TooltipSupplier $$12, boolean $$13) { super($$0, $$1, $$2, $$3, $$4); this.name = $$5; this.index = $$6; @@ -127,19 +127,19 @@ return (List)this.tooltipSupplier.apply(this.value); } - public static CycleButton.Builder builder(Function $$0) { + public static Builder builder(Function $$0) { return new Builder<>($$0); } - public static CycleButton.Builder booleanBuilder(Component $$0, Component $$1) { + public static Builder booleanBuilder(Component $$0, Component $$1) { return (new Builder(($$2) -> $$2 ? $$0 : $$1)).withValues(BOOLEAN_OPTIONS); } - public static CycleButton.Builder onOffBuilder() { + public static Builder onOffBuilder() { return (new Builder(($$0) -> $$0 ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF)).withValues(BOOLEAN_OPTIONS); } - public static CycleButton.Builder onOffBuilder(boolean $$0) { + public static Builder onOffBuilder(boolean $$0) { return onOffBuilder().withInitialValue((T)$$0); } @@ -148,41 +148,41 @@ @Nullable private T initialValue; private final Function valueStringifier; - private CycleButton.TooltipSupplier tooltipSupplier = ($$0x) -> ImmutableList.of(); + private TooltipSupplier tooltipSupplier = ($$0x) -> ImmutableList.of(); private Function, MutableComponent> narrationProvider = CycleButton::createDefaultNarrationMessage; - private CycleButton.ValueListSupplier values = CycleButton.ValueListSupplier.create(ImmutableList.of()); + private ValueListSupplier values = CycleButton.ValueListSupplier.create(ImmutableList.of()); private boolean displayOnlyValue; public Builder(Function $$0) { this.valueStringifier = $$0; } - public CycleButton.Builder withValues(List $$0) { + public Builder withValues(List $$0) { this.values = CycleButton.ValueListSupplier.create($$0); return this; } @SafeVarargs - public final CycleButton.Builder withValues(T... $$0) { + public final Builder withValues(T... $$0) { return this.withValues(ImmutableList.copyOf($$0)); } - public CycleButton.Builder withValues(List $$0, List $$1) { + public Builder withValues(List $$0, List $$1) { this.values = CycleButton.ValueListSupplier.create(CycleButton.DEFAULT_ALT_LIST_SELECTOR, $$0, $$1); return this; } - public CycleButton.Builder withValues(BooleanSupplier $$0, List $$1, List $$2) { + public Builder withValues(BooleanSupplier $$0, List $$1, List $$2) { this.values = CycleButton.ValueListSupplier.create($$0, $$1, $$2); return this; } - public CycleButton.Builder withTooltip(CycleButton.TooltipSupplier $$0) { + public Builder withTooltip(TooltipSupplier $$0) { this.tooltipSupplier = $$0; return this; } - public CycleButton.Builder withInitialValue(T $$0) { + public Builder withInitialValue(T $$0) { this.initialValue = $$0; int $$1 = this.values.getDefaultList().indexOf($$0); if ($$1 != -1) { @@ -192,12 +192,12 @@ return this; } - public CycleButton.Builder withCustomNarration(Function, MutableComponent> $$0) { + public Builder withCustomNarration(Function, MutableComponent> $$0) { this.narrationProvider = $$0; return this; } - public CycleButton.Builder displayOnlyValue() { + public Builder displayOnlyValue() { this.displayOnlyValue = true; return this; } @@ -207,7 +207,7 @@ }); } - public CycleButton create(int $$0, int $$1, int $$2, int $$3, Component $$4, CycleButton.OnValueChange $$5) { + public CycleButton create(int $$0, int $$1, int $$2, int $$3, Component $$4, OnValueChange $$5) { List $$6 = this.values.getDefaultList(); if ($$6.isEmpty()) { throw new IllegalStateException("No values for cycle button"); @@ -233,9 +233,9 @@ List getDefaultList(); - static CycleButton.ValueListSupplier create(List $$0) { + static ValueListSupplier create(List $$0) { final List $$1 = ImmutableList.copyOf($$0); - return new CycleButton.ValueListSupplier() { + return new ValueListSupplier() { public List getSelectedList() { return $$1; } @@ -246,10 +246,10 @@ }; } - static CycleButton.ValueListSupplier create(final BooleanSupplier $$0, List $$1, List $$2) { + static ValueListSupplier create(final BooleanSupplier $$0, List $$1, List $$2) { final List $$3 = ImmutableList.copyOf($$1); final List $$4 = ImmutableList.copyOf($$2); - return new CycleButton.ValueListSupplier() { + return new ValueListSupplier() { public List getSelectedList() { return $$0.getAsBoolean() ? $$4 : $$3; } diff -r -u3 -N a/net/minecraft/client/gui/components/ObjectSelectionList.java b/net/minecraft/client/gui/components/ObjectSelectionList.java --- a/net/minecraft/client/gui/components/ObjectSelectionList.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/components/ObjectSelectionList.java 2022-05-25 22:50:12.000000000 -0700 @@ -49,7 +49,7 @@ } - public abstract static class Entry> extends AbstractSelectionList.Entry implements NarrationSupplier { + public abstract static class Entry> extends AbstractSelectionList.Entry implements NarrationSupplier { public boolean changeFocus(boolean $$0) { return false; } diff -r -u3 -N a/net/minecraft/client/gui/components/toasts/ToastComponent.java b/net/minecraft/client/gui/components/toasts/ToastComponent.java --- a/net/minecraft/client/gui/components/toasts/ToastComponent.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/components/toasts/ToastComponent.java 2022-05-25 22:50:12.000000000 -0700 @@ -14,7 +14,7 @@ public class ToastComponent extends GuiComponent { private static final int VISIBLE_TOASTS = 5; final Minecraft minecraft; - private final ToastComponent.ToastInstance[] visible = new ToastInstance[5]; + private final ToastInstance[] visible = new ToastInstance[5]; private final Deque queued = Queues.newArrayDeque(); public ToastComponent(Minecraft $$0) { @@ -24,7 +24,7 @@ public void render(PoseStack $$0) { if (!this.minecraft.options.hideGui) { for(int $$1 = 0; $$1 < this.visible.length; ++$$1) { - ToastComponent.ToastInstance $$2 = this.visible[$$1]; + ToastInstance $$2 = this.visible[$$1]; if ($$2 != null && $$2.render(this.minecraft.getWindow().getGuiScaledWidth(), $$1, $$0)) { this.visible[$$1] = null; } @@ -39,7 +39,7 @@ @Nullable public T getToast(Class $$0, Object $$1) { - for(ToastComponent.ToastInstance $$2 : this.visible) { + for(ToastInstance $$2 : this.visible) { if ($$2 != null && $$0.isAssignableFrom($$2.getToast().getClass()) && $$2.getToast().getToken().equals($$1)) { return (T)$$2.getToast(); } diff -r -u3 -N a/net/minecraft/client/gui/screens/MenuScreens.java b/net/minecraft/client/gui/screens/MenuScreens.java --- a/net/minecraft/client/gui/screens/MenuScreens.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/screens/MenuScreens.java 2022-05-25 22:50:12.000000000 -0700 @@ -34,13 +34,13 @@ public class MenuScreens { private static final Logger LOGGER = LogUtils.getLogger(); - private static final Map, MenuScreens.ScreenConstructor> SCREENS = Maps., MenuScreens.ScreenConstructor>newHashMap(); + private static final Map, ScreenConstructor> SCREENS = Maps., ScreenConstructor>newHashMap(); public static void create(@Nullable MenuType $$0, Minecraft $$1, int $$2, Component $$3) { if ($$0 == null) { LOGGER.warn("Trying to open invalid screen with name: {}", $$3.getString()); } else { - MenuScreens.ScreenConstructor $$4 = getConstructor($$0); + ScreenConstructor $$4 = getConstructor($$0); if ($$4 == null) { LOGGER.warn("Failed to create screen for menu type: {}", (Object)Registry.MENU.getKey($$0)); } else { @@ -50,12 +50,12 @@ } @Nullable - private static MenuScreens.ScreenConstructor getConstructor(MenuType $$0) { + private static ScreenConstructor getConstructor(MenuType $$0) { return (ScreenConstructor)SCREENS.get($$0); } - private static > void register(MenuType $$0, MenuScreens.ScreenConstructor $$1) { - MenuScreens.ScreenConstructor $$2 = (ScreenConstructor)SCREENS.put($$0, $$1); + private static > void register(MenuType $$0, ScreenConstructor $$1) { + ScreenConstructor $$2 = (ScreenConstructor)SCREENS.put($$0, $$1); if ($$2 != null) { throw new IllegalStateException("Duplicate registration for " + Registry.MENU.getKey($$0)); } diff -r -u3 -N a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java --- a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java 2022-05-25 22:50:12.000000000 -0700 @@ -223,7 +223,7 @@ this.addEntry($$0, ($$0x, $$1xx, $$2x, $$3) -> EditGameRulesScreen.this.new IntegerRuleEntry($$0x, $$1xx, $$2x, $$3)); } - private > void addEntry(GameRules.Key $$0, EditGameRulesScreen.EntryFactory $$1x) { + private > void addEntry(GameRules.Key $$0, EntryFactory $$1x) { Component $$2 = new TranslatableComponent($$0.getDescriptionId()); Component $$3 = (new TextComponent($$0.getId())).withStyle(ChatFormatting.YELLOW); T $$4 = $$1.getRule($$0); diff -r -u3 -N a/net/minecraft/client/particle/ParticleEngine.java b/net/minecraft/client/particle/ParticleEngine.java --- a/net/minecraft/client/particle/ParticleEngine.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/particle/ParticleEngine.java 2022-05-25 22:50:12.000000000 -0700 @@ -176,7 +176,7 @@ this.providers.put(Registry.PARTICLE_TYPE.getId($$0), $$1); } - private void register(ParticleType $$0, ParticleEngine.SpriteParticleRegistration $$1) { + private void register(ParticleType $$0, SpriteParticleRegistration $$1) { MutableSpriteSet $$2 = new MutableSpriteSet(); this.spriteSets.put(Registry.PARTICLE_TYPE.getKey($$0), $$2); this.providers.put(Registry.PARTICLE_TYPE.getId($$0), $$1.create($$2)); diff -r -u3 -N a/net/minecraft/client/renderer/chunk/RenderRegionCache.java b/net/minecraft/client/renderer/chunk/RenderRegionCache.java --- a/net/minecraft/client/renderer/chunk/RenderRegionCache.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/renderer/chunk/RenderRegionCache.java 2022-05-25 22:50:12.000000000 -0700 @@ -23,7 +23,7 @@ for(int $$9 = $$4; $$9 <= $$6; ++$$9) { for(int $$10 = $$5; $$10 <= $$7; ++$$10) { - $$8[$$9 - $$4][$$10 - $$5] = this.chunkInfoCache.computeIfAbsent(ChunkPos.asLong($$9, $$10), (Long2ObjectFunction)(($$1x) -> new ChunkInfo($$0.getChunk(ChunkPos.getX($$1x), ChunkPos.getZ($$1x))))); + $$8[$$9 - $$4][$$10 - $$5] = this.chunkInfoCache.computeIfAbsent(ChunkPos.asLong($$9, $$10), (Long2ObjectFunction)(($$1x) -> new ChunkInfo($$0.getChunk(ChunkPos.getX($$1x), ChunkPos.getZ($$1x))))); } } diff -r -u3 -N a/net/minecraft/client/searchtree/SearchRegistry.java b/net/minecraft/client/searchtree/SearchRegistry.java --- a/net/minecraft/client/searchtree/SearchRegistry.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/client/searchtree/SearchRegistry.java 2022-05-25 22:50:12.000000000 -0700 @@ -8,10 +8,10 @@ import net.minecraft.world.item.ItemStack; public class SearchRegistry implements ResourceManagerReloadListener { - public static final SearchRegistry.Key CREATIVE_NAMES = new Key<>(); - public static final SearchRegistry.Key CREATIVE_TAGS = new Key<>(); - public static final SearchRegistry.Key RECIPE_COLLECTIONS = new Key<>(); - private final Map, MutableSearchTree> searchTrees = Maps., MutableSearchTree>newHashMap(); + public static final Key CREATIVE_NAMES = new Key<>(); + public static final Key CREATIVE_TAGS = new Key<>(); + public static final Key RECIPE_COLLECTIONS = new Key<>(); + private final Map, MutableSearchTree> searchTrees = Maps., MutableSearchTree>newHashMap(); public void onResourceManagerReload(ResourceManager $$0) { for(MutableSearchTree $$1 : this.searchTrees.values()) { @@ -20,11 +20,11 @@ } - public void register(SearchRegistry.Key $$0, MutableSearchTree $$1) { + public void register(Key $$0, MutableSearchTree $$1) { this.searchTrees.put($$0, $$1); } - public MutableSearchTree getTree(SearchRegistry.Key $$0) { + public MutableSearchTree getTree(Key $$0) { return (MutableSearchTree)this.searchTrees.get($$0); } diff -r -u3 -N a/net/minecraft/commands/arguments/ResourceOrTagLocationArgument.java b/net/minecraft/commands/arguments/ResourceOrTagLocationArgument.java --- a/net/minecraft/commands/arguments/ResourceOrTagLocationArgument.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/commands/arguments/ResourceOrTagLocationArgument.java 2022-05-25 22:50:12.000000000 -0700 @@ -27,7 +27,7 @@ import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature; -public class ResourceOrTagLocationArgument implements ArgumentType> { +public class ResourceOrTagLocationArgument implements ArgumentType> { private static final Collection EXAMPLES = Arrays.asList("foo", "foo:bar", "012", "#skeletons", "#minecraft:skeletons"); private static final DynamicCommandExceptionType ERROR_INVALID_BIOME = new DynamicCommandExceptionType(($$0) -> new TranslatableComponent("commands.locatebiome.invalid", $$0)); private static final DynamicCommandExceptionType ERROR_INVALID_STRUCTURE = new DynamicCommandExceptionType(($$0) -> new TranslatableComponent("commands.locate.invalid", $$0)); @@ -41,21 +41,21 @@ return new ResourceOrTagLocationArgument<>($$0); } - private static ResourceOrTagLocationArgument.Result getRegistryType(CommandContext $$0, String $$1, ResourceKey> $$2, DynamicCommandExceptionType $$3) throws CommandSyntaxException { - ResourceOrTagLocationArgument.Result $$4 = $$0.getArgument($$1, Result.class); - Optional> $$5 = $$4.cast($$2); + private static Result getRegistryType(CommandContext $$0, String $$1, ResourceKey> $$2, DynamicCommandExceptionType $$3) throws CommandSyntaxException { + Result $$4 = $$0.getArgument($$1, Result.class); + Optional> $$5 = $$4.cast($$2); return (Result)$$5.orElseThrow(() -> $$3.create($$4)); } - public static ResourceOrTagLocationArgument.Result getBiome(CommandContext $$0, String $$1) throws CommandSyntaxException { + public static Result getBiome(CommandContext $$0, String $$1) throws CommandSyntaxException { return getRegistryType($$0, $$1, Registry.BIOME_REGISTRY, ERROR_INVALID_BIOME); } - public static ResourceOrTagLocationArgument.Result> getStructureFeature(CommandContext $$0, String $$1) throws CommandSyntaxException { + public static Result> getStructureFeature(CommandContext $$0, String $$1) throws CommandSyntaxException { return getRegistryType($$0, $$1, Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY, ERROR_INVALID_STRUCTURE); } - public ResourceOrTagLocationArgument.Result parse(StringReader $$0) throws CommandSyntaxException { + public Result parse(StringReader $$0) throws CommandSyntaxException { if ($$0.canRead() && $$0.peek() == '#') { int $$1 = $$0.getCursor(); @@ -86,12 +86,12 @@ return EXAMPLES; } - static record ResourceResult(ResourceKey key) implements ResourceOrTagLocationArgument.Result { + static record ResourceResult(ResourceKey key) implements Result { public Either, TagKey> unwrap() { return Either.left(this.key); } - public Optional> cast(ResourceKey> $$0) { + public Optional> cast(ResourceKey> $$0) { return this.key.cast($$0).map(ResourceResult::new); } @@ -107,7 +107,7 @@ public interface Result extends Predicate> { Either, TagKey> unwrap(); - Optional> cast(ResourceKey> var1); + Optional> cast(ResourceKey> var1); String asPrintable(); } @@ -127,12 +127,12 @@ } } - static record TagResult(TagKey key) implements ResourceOrTagLocationArgument.Result { + static record TagResult(TagKey key) implements Result { public Either, TagKey> unwrap() { return Either.right(this.key); } - public Optional> cast(ResourceKey> $$0) { + public Optional> cast(ResourceKey> $$0) { return this.key.cast($$0).map(TagResult::new); } diff -r -u3 -N a/net/minecraft/commands/synchronization/ArgumentTypes.java b/net/minecraft/commands/synchronization/ArgumentTypes.java --- a/net/minecraft/commands/synchronization/ArgumentTypes.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/commands/synchronization/ArgumentTypes.java 2022-05-25 22:50:12.000000000 -0700 @@ -64,8 +64,8 @@ public class ArgumentTypes { private static final Logger LOGGER = LogUtils.getLogger(); - private static final Map, ArgumentTypes.Entry> BY_CLASS = Maps.newHashMap(); - private static final Map> BY_NAME = Maps.>newHashMap(); + private static final Map, Entry> BY_CLASS = Maps.newHashMap(); + private static final Map> BY_NAME = Maps.>newHashMap(); public static > void register(String $$0, Class $$1, ArgumentSerializer $$2) { ResourceLocation $$3 = new ResourceLocation($$0); @@ -74,7 +74,7 @@ } else if (BY_NAME.containsKey($$3)) { throw new IllegalArgumentException("'" + $$3 + "' is already a registered serializer!"); } else { - ArgumentTypes.Entry $$4 = new Entry<>($$2, $$3); + Entry $$4 = new Entry<>($$2, $$3); BY_CLASS.put($$1, $$4); BY_NAME.put($$3, $$4); } @@ -134,17 +134,17 @@ } @Nullable - private static ArgumentTypes.Entry get(ResourceLocation $$0) { + private static Entry get(ResourceLocation $$0) { return (Entry)BY_NAME.get($$0); } @Nullable - private static ArgumentTypes.Entry get(ArgumentType $$0) { + private static Entry get(ArgumentType $$0) { return (Entry)BY_CLASS.get($$0.getClass()); } public static > void serialize(FriendlyByteBuf $$0, T $$1) { - ArgumentTypes.Entry $$2 = get($$1); + Entry $$2 = get($$1); if ($$2 == null) { LOGGER.error("Could not serialize {} ({}) - will not be sent to client!", $$1, $$1.getClass()); $$0.writeResourceLocation(new ResourceLocation("")); @@ -157,7 +157,7 @@ @Nullable public static ArgumentType deserialize(FriendlyByteBuf $$0) { ResourceLocation $$1 = $$0.readResourceLocation(); - ArgumentTypes.Entry $$2 = get($$1); + Entry $$2 = get($$1); if ($$2 == null) { LOGGER.error("Could not deserialize {}", (Object)$$1); return null; @@ -167,7 +167,7 @@ } private static > void serializeToJson(JsonObject $$0, T $$1) { - ArgumentTypes.Entry $$2 = get($$1); + Entry $$2 = get($$1); if ($$2 == null) { LOGGER.error("Could not serialize argument {} ({})!", $$1, $$1.getClass()); $$0.addProperty("type", "unknown"); diff -r -u3 -N a/net/minecraft/core/Holder.java b/net/minecraft/core/Holder.java --- a/net/minecraft/core/Holder.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/core/Holder.java 2022-05-25 22:50:12.000000000 -0700 @@ -109,13 +109,13 @@ this.value = $$3; } - public static Holder.Reference createStandAlone(Registry $$0, ResourceKey $$1) { + public static Reference createStandAlone(Registry $$0, ResourceKey $$1) { return new Reference<>(Holder.Reference.Type.STAND_ALONE, $$0, $$1, (T)null); } /** @deprecated */ @Deprecated - public static Holder.Reference createIntrusive(Registry $$0, @Nullable T $$1) { + public static Reference createIntrusive(Registry $$0, @Nullable T $$1) { return new Reference<>(Holder.Reference.Type.INTRUSIVE, $$0, (ResourceKey)null, $$1); } diff -r -u3 -N a/net/minecraft/core/HolderSet.java b/net/minecraft/core/HolderSet.java --- a/net/minecraft/core/HolderSet.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/core/HolderSet.java 2022-05-25 22:50:12.000000000 -0700 @@ -30,27 +30,26 @@ boolean isValidInRegistry(Registry var1); @SafeVarargs - static HolderSet.Direct direct(Holder... $$0) { + static Direct direct(Holder... $$0) { return new Direct<>(List.of($$0)); } - static HolderSet.Direct direct(List> $$0) { + static Direct direct(List> $$0) { return new Direct<>(List.copyOf($$0)); } @SafeVarargs - static HolderSet.Direct direct(Function> $$0, E... $$1) { + static Direct direct(Function> $$0, E... $$1) { return direct(Stream.of($$1).map($$0).toList()); } - static HolderSet.Direct direct(Function> $$0, List $$1) { + static Direct direct(Function> $$0, List $$1) { return direct($$1.stream().map($$0).toList()); } - public static class Direct extends HolderSet.ListBacked { + public static class Direct extends ListBacked { private final List> contents; - @Nullable - private Set> contentsSet; + private @Nullable Set> contentsSet; Direct(List> $$0) { this.contents = $$0; @@ -88,8 +87,7 @@ return this.contents().spliterator(); } - @NotNull - public Iterator> iterator() { + public @NotNull Iterator> iterator() { return this.contents().iterator(); } @@ -110,7 +108,7 @@ } } - public static class Named extends HolderSet.ListBacked { + public static class Named extends ListBacked { private final Registry registry; private final TagKey key; private List> contents = List.of(); diff -r -u3 -N a/net/minecraft/core/RegistryAccess.java b/net/minecraft/core/RegistryAccess.java --- a/net/minecraft/core/RegistryAccess.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/core/RegistryAccess.java 2022-05-25 22:50:12.000000000 -0700 @@ -42,8 +42,8 @@ public interface RegistryAccess { Logger LOGGER = LogUtils.getLogger(); - Map>, RegistryAccess.RegistryData> REGISTRIES = Util.make(() -> { - ImmutableMap.Builder>, RegistryAccess.RegistryData> $$0 = ImmutableMap.builder(); + Map>, RegistryData> REGISTRIES = Util.make(() -> { + ImmutableMap.Builder>, RegistryData> $$0 = ImmutableMap.builder(); put($$0, Registry.DIMENSION_TYPE_REGISTRY, DimensionType.DIRECT_CODEC, DimensionType.DIRECT_CODEC); put($$0, Registry.BIOME_REGISTRY, Biome.DIRECT_CODEC, Biome.NETWORK_CODEC); put($$0, Registry.CONFIGURED_CARVER_REGISTRY, ConfiguredWorldCarver.DIRECT_CODEC); @@ -76,29 +76,29 @@ return (Registry)this.registry($$0).orElseThrow(() -> new IllegalStateException("Missing registry: " + $$0)); } - private static void put(ImmutableMap.Builder>, RegistryAccess.RegistryData> $$0, ResourceKey> $$1, Codec $$2) { + private static void put(ImmutableMap.Builder>, RegistryData> $$0, ResourceKey> $$1, Codec $$2) { $$0.put($$1, new RegistryData($$1, $$2, (Codec)null)); } - private static void put(ImmutableMap.Builder>, RegistryAccess.RegistryData> $$0, ResourceKey> $$1, Codec $$2, Codec $$3) { + private static void put(ImmutableMap.Builder>, RegistryData> $$0, ResourceKey> $$1, Codec $$2, Codec $$3) { $$0.put($$1, new RegistryData($$1, $$2, $$3)); } - static Iterable> knownRegistries() { + static Iterable> knownRegistries() { return REGISTRIES.values(); } - Stream> ownedRegistries(); + Stream> ownedRegistries(); - private static Stream> globalRegistries() { + private static Stream> globalRegistries() { return Registry.REGISTRY.holders().map(RegistryEntry::fromHolder); } - default Stream> registries() { + default Stream> registries() { return Stream.concat(this.ownedRegistries(), globalRegistries()); } - default Stream> networkSafeRegistries() { + default Stream> networkSafeRegistries() { return Stream.concat(this.ownedNetworkableRegistries(), globalRegistries()); } @@ -113,7 +113,7 @@ return $$0.xmap(ImmutableRegistryAccess::new, ($$0x) -> (Map)$$0x.ownedNetworkableRegistries().collect(ImmutableMap.toImmutableMap(($$0) -> $$0.key(), ($$0) -> $$0.value()))); } - private Stream> ownedNetworkableRegistries() { + private Stream> ownedNetworkableRegistries() { return this.ownedRegistries().filter(($$0) -> ((RegistryData)REGISTRIES.get($$0.key)).sendToClient()); } @@ -136,7 +136,7 @@ return $$1.getOptional($$0); } - public Stream> ownedRegistries() { + public Stream> ownedRegistries() { return $$0.entrySet().stream().map(RegistryEntry::fromMapEntry); } }; @@ -146,7 +146,7 @@ Writable $$0 = blankWriteable(); RegistryResourceAccess.InMemoryStorage $$1 = new RegistryResourceAccess.InMemoryStorage(); - for(Map.Entry>, RegistryAccess.RegistryData> $$2 : REGISTRIES.entrySet()) { + for(Map.Entry>, RegistryData> $$2 : REGISTRIES.entrySet()) { if (!((ResourceKey)$$2.getKey()).equals(Registry.DIMENSION_TYPE_REGISTRY)) { addBuiltinElements($$1, (RegistryData)$$2.getValue()); } @@ -156,7 +156,7 @@ return DimensionType.registerBuiltin($$0); } - private static void addBuiltinElements(RegistryResourceAccess.InMemoryStorage $$0, RegistryAccess.RegistryData $$1) { + private static void addBuiltinElements(RegistryResourceAccess.InMemoryStorage $$0, RegistryData $$1) { ResourceKey> $$2 = $$1.key(); Registry $$3 = BuiltinRegistries.ACCESS.registryOrThrow($$2); @@ -171,13 +171,13 @@ static void load(Writable $$0, DynamicOps $$1, RegistryLoader $$2) { RegistryLoader.Bound $$3 = $$2.bind($$0); - for(RegistryAccess.RegistryData $$4 : REGISTRIES.values()) { + for(RegistryData $$4 : REGISTRIES.values()) { readRegistry($$1, $$3, $$4); } } - private static void readRegistry(DynamicOps $$0, RegistryLoader.Bound $$1, RegistryAccess.RegistryData $$2) { + private static void readRegistry(DynamicOps $$0, RegistryLoader.Bound $$1, RegistryData $$2) { DataResult> $$3 = $$1.overrideRegistryFromResources($$2.key(), $$2.codec(), $$0); $$3.error().ifPresent(($$0x) -> { throw new JsonParseException("Error loading registry data: " + $$0x.message()); @@ -217,7 +217,7 @@ this.registries = Map.copyOf($$0); } - ImmutableRegistryAccess(Stream> $$0) { + ImmutableRegistryAccess(Stream> $$0) { this.registries = (Map)$$0.collect(ImmutableMap.toImmutableMap(RegistryEntry::key, RegistryEntry::value)); } @@ -225,7 +225,7 @@ return Optional.ofNullable((Registry)this.registries.get($$0)).map(($$0x) -> $$0x); } - public Stream> ownedRegistries() { + public Stream> ownedRegistries() { return this.registries.entrySet().stream().map(RegistryEntry::fromMapEntry); } } @@ -237,19 +237,19 @@ } public static record RegistryEntry(ResourceKey> key, Registry value) { - private static > RegistryAccess.RegistryEntry fromMapEntry(Map.Entry>, R> $$0) { + private static > RegistryEntry fromMapEntry(Map.Entry>, R> $$0) { return fromUntyped((ResourceKey)$$0.getKey(), (Registry)$$0.getValue()); } - private static RegistryAccess.RegistryEntry fromHolder(Holder.Reference> $$0) { + private static RegistryEntry fromHolder(Holder.Reference> $$0) { return fromUntyped($$0.key(), $$0.value()); } - private static RegistryAccess.RegistryEntry fromUntyped(ResourceKey> $$0, Registry $$1) { + private static RegistryEntry fromUntyped(ResourceKey> $$0, Registry $$1) { return new RegistryEntry<>($$0, $$1); } - private RegistryAccess.RegistryEntry freeze() { + private RegistryEntry freeze() { return new RegistryEntry<>(this.key, this.value.freeze()); } } @@ -277,7 +277,7 @@ return Optional.ofNullable((WritableRegistry)this.registries.get($$0)).map(($$0x) -> $$0x); } - public Stream> ownedRegistries() { + public Stream> ownedRegistries() { return this.registries.entrySet().stream().map(RegistryEntry::fromMapEntry); } } diff -r -u3 -N a/net/minecraft/core/RegistryCodecs.java b/net/minecraft/core/RegistryCodecs.java --- a/net/minecraft/core/RegistryCodecs.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/core/RegistryCodecs.java 2022-05-25 22:50:12.000000000 -0700 @@ -22,7 +22,7 @@ import net.minecraft.resources.ResourceLocation; public class RegistryCodecs { - private static MapCodec> withNameAndId(ResourceKey> $$0, MapCodec $$1) { + private static MapCodec> withNameAndId(ResourceKey> $$0, MapCodec $$1) { return RecordCodecBuilder.mapCodec(($$2) -> $$2.group(ResourceLocation.CODEC.xmap(ResourceKey.elementKey($$0), ResourceKey::location).fieldOf("name").forGetter(RegistryEntry::key), Codec.INT.fieldOf("id").forGetter(RegistryEntry::id), $$1.forGetter(RegistryEntry::value)).apply($$2, RegistryEntry::new)); } @@ -30,13 +30,13 @@ return withNameAndId($$0, $$2.fieldOf("element")).codec().listOf().xmap(($$2x) -> { WritableRegistry $$3 = new MappedRegistry<>($$0, $$1, (Function>)null); - for(RegistryCodecs.RegistryEntry $$4 : $$2x) { + for(RegistryEntry $$4 : $$2x) { $$3.registerMapping($$4.id(), $$4.key(), $$4.value(), $$1); } return $$3; }, ($$0x) -> { - ImmutableList.Builder> $$1 = ImmutableList.builder(); + ImmutableList.Builder> $$1 = ImmutableList.builder(); for(T $$2 : $$0x) { $$1.add(new RegistryEntry((ResourceKey)$$0x.getResourceKey($$2).get(), $$0x.getId($$2), $$2)); diff -r -u3 -N a/net/minecraft/core/Registry.java b/net/minecraft/core/Registry.java --- a/net/minecraft/core/Registry.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/core/Registry.java 2022-05-25 22:50:12.000000000 -0700 @@ -270,35 +270,35 @@ }); } - private static Registry registerSimple(ResourceKey> $$0, Registry.RegistryBootstrap $$1) { + private static Registry registerSimple(ResourceKey> $$0, RegistryBootstrap $$1) { return registerSimple($$0, Lifecycle.experimental(), $$1); } - private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Registry.RegistryBootstrap $$2) { + private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, RegistryBootstrap $$2) { return registerDefaulted($$0, $$1, Lifecycle.experimental(), $$2); } - private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Function> $$2, Registry.RegistryBootstrap $$3) { + private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Function> $$2, RegistryBootstrap $$3) { return registerDefaulted($$0, $$1, Lifecycle.experimental(), $$2, $$3); } - private static Registry registerSimple(ResourceKey> $$0, Lifecycle $$1, Registry.RegistryBootstrap $$2) { + private static Registry registerSimple(ResourceKey> $$0, Lifecycle $$1, RegistryBootstrap $$2) { return internalRegister($$0, new MappedRegistry<>($$0, $$1, (Function>)null), $$2, $$1); } - private static Registry registerSimple(ResourceKey> $$0, Lifecycle $$1, Function> $$2, Registry.RegistryBootstrap $$3) { + private static Registry registerSimple(ResourceKey> $$0, Lifecycle $$1, Function> $$2, RegistryBootstrap $$3) { return internalRegister($$0, new MappedRegistry<>($$0, $$1, $$2), $$3, $$1); } - private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Lifecycle $$2, Registry.RegistryBootstrap $$3) { + private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Lifecycle $$2, RegistryBootstrap $$3) { return internalRegister($$0, new DefaultedRegistry<>($$1, $$0, $$2, (Function>)null), $$3, $$2); } - private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Lifecycle $$2, Function> $$3, Registry.RegistryBootstrap $$4) { + private static DefaultedRegistry registerDefaulted(ResourceKey> $$0, String $$1, Lifecycle $$2, Function> $$3, RegistryBootstrap $$4) { return internalRegister($$0, new DefaultedRegistry<>($$1, $$0, $$2, $$3), $$4, $$2); } - private static > R internalRegister(ResourceKey> $$0, R $$1, Registry.RegistryBootstrap $$2, Lifecycle $$3) { + private static > R internalRegister(ResourceKey> $$0, R $$1, RegistryBootstrap $$2, Lifecycle $$3) { ResourceLocation $$4 = $$0.location(); LOADERS.put($$4, (Supplier)() -> $$2.run($$1)); WRITABLE_REGISTRY.register($$0, $$1, $$3); diff -r -u3 -N a/net/minecraft/data/models/blockstates/PropertyDispatch.java b/net/minecraft/data/models/blockstates/PropertyDispatch.java --- a/net/minecraft/data/models/blockstates/PropertyDispatch.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/data/models/blockstates/PropertyDispatch.java 2022-05-25 22:50:12.000000000 -0700 @@ -43,23 +43,23 @@ abstract List> getDefinedProperties(); - public static > PropertyDispatch.C1 property(Property $$0) { + public static > C1 property(Property $$0) { return new C1<>($$0); } - public static , T2 extends Comparable> PropertyDispatch.C2 properties(Property $$0, Property $$1) { + public static , T2 extends Comparable> C2 properties(Property $$0, Property $$1) { return new C2<>($$0, $$1); } - public static , T2 extends Comparable, T3 extends Comparable> PropertyDispatch.C3 properties(Property $$0, Property $$1, Property $$2) { + public static , T2 extends Comparable, T3 extends Comparable> C3 properties(Property $$0, Property $$1, Property $$2) { return new C3<>($$0, $$1, $$2); } - public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable> PropertyDispatch.C4 properties(Property $$0, Property $$1, Property $$2, Property $$3) { + public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable> C4 properties(Property $$0, Property $$1, Property $$2, Property $$3) { return new C4<>($$0, $$1, $$2, $$3); } - public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable, T5 extends Comparable> PropertyDispatch.C5 properties(Property $$0, Property $$1, Property $$2, Property $$3, Property $$4) { + public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable, T5 extends Comparable> C5 properties(Property $$0, Property $$1, Property $$2, Property $$3, Property $$4) { return new C5<>($$0, $$1, $$2, $$3, $$4); } @@ -74,13 +74,13 @@ return ImmutableList.of(this.property1); } - public PropertyDispatch.C1 select(T1 $$0, List $$1) { + public C1 select(T1 $$0, List $$1) { Selector $$2 = Selector.of(this.property1.value($$0)); this.putValue($$2, $$1); return this; } - public PropertyDispatch.C1 select(T1 $$0, Variant $$1) { + public C1 select(T1 $$0, Variant $$1) { return this.select($$0, Collections.singletonList($$1)); } @@ -108,13 +108,13 @@ return ImmutableList.of(this.property1, this.property2); } - public PropertyDispatch.C2 select(T1 $$0, T2 $$1, List $$2) { + public C2 select(T1 $$0, T2 $$1, List $$2) { Selector $$3 = Selector.of(this.property1.value($$0), this.property2.value($$1)); this.putValue($$3, $$2); return this; } - public PropertyDispatch.C2 select(T1 $$0, T2 $$1, Variant $$2) { + public C2 select(T1 $$0, T2 $$1, Variant $$2) { return this.select($$0, $$1, Collections.singletonList($$2)); } @@ -144,22 +144,22 @@ return ImmutableList.of(this.property1, this.property2, this.property3); } - public PropertyDispatch.C3 select(T1 $$0, T2 $$1, T3 $$2, List $$3) { + public C3 select(T1 $$0, T2 $$1, T3 $$2, List $$3) { Selector $$4 = Selector.of(this.property1.value($$0), this.property2.value($$1), this.property3.value($$2)); this.putValue($$4, $$3); return this; } - public PropertyDispatch.C3 select(T1 $$0, T2 $$1, T3 $$2, Variant $$3) { + public C3 select(T1 $$0, T2 $$1, T3 $$2, Variant $$3) { return this.select($$0, $$1, $$2, Collections.singletonList($$3)); } - public PropertyDispatch generate(PropertyDispatch.TriFunction $$0) { + public PropertyDispatch generate(TriFunction $$0) { this.property1.getPossibleValues().forEach(($$1) -> this.property2.getPossibleValues().forEach(($$2) -> this.property3.getPossibleValues().forEach(($$3) -> this.select((T1)$$1, (T2)$$2, (T3)$$3, $$0.apply($$1, $$2, $$3))))); return this; } - public PropertyDispatch generateList(PropertyDispatch.TriFunction> $$0) { + public PropertyDispatch generateList(TriFunction> $$0) { this.property1.getPossibleValues().forEach(($$1) -> this.property2.getPossibleValues().forEach(($$2) -> this.property3.getPossibleValues().forEach(($$3) -> this.select((T1)$$1, (T2)$$2, (T3)$$3, (List)$$0.apply($$1, $$2, $$3))))); return this; } @@ -182,22 +182,22 @@ return ImmutableList.of(this.property1, this.property2, this.property3, this.property4); } - public PropertyDispatch.C4 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, List $$4) { + public C4 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, List $$4) { Selector $$5 = Selector.of(this.property1.value($$0), this.property2.value($$1), this.property3.value($$2), this.property4.value($$3)); this.putValue($$5, $$4); return this; } - public PropertyDispatch.C4 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, Variant $$4) { + public C4 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, Variant $$4) { return this.select($$0, $$1, $$2, $$3, Collections.singletonList($$4)); } - public PropertyDispatch generate(PropertyDispatch.QuadFunction $$0) { + public PropertyDispatch generate(QuadFunction $$0) { this.property1.getPossibleValues().forEach(($$1) -> this.property2.getPossibleValues().forEach(($$2) -> this.property3.getPossibleValues().forEach(($$3) -> this.property4.getPossibleValues().forEach(($$4) -> this.select((T1)$$1, (T2)$$2, (T3)$$3, (T4)$$4, $$0.apply($$1, $$2, $$3, $$4)))))); return this; } - public PropertyDispatch generateList(PropertyDispatch.QuadFunction> $$0) { + public PropertyDispatch generateList(QuadFunction> $$0) { this.property1.getPossibleValues().forEach(($$1) -> this.property2.getPossibleValues().forEach(($$2) -> this.property3.getPossibleValues().forEach(($$3) -> this.property4.getPossibleValues().forEach(($$4) -> this.select((T1)$$1, (T2)$$2, (T3)$$3, (T4)$$4, (List)$$0.apply($$1, $$2, $$3, $$4)))))); return this; } @@ -222,22 +222,22 @@ return ImmutableList.of(this.property1, this.property2, this.property3, this.property4, this.property5); } - public PropertyDispatch.C5 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, List $$5) { + public C5 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, List $$5) { Selector $$6 = Selector.of(this.property1.value($$0), this.property2.value($$1), this.property3.value($$2), this.property4.value($$3), this.property5.value($$4)); this.putValue($$6, $$5); return this; } - public PropertyDispatch.C5 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, Variant $$5) { + public C5 select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, Variant $$5) { return this.select($$0, $$1, $$2, $$3, $$4, Collections.singletonList($$5)); } - public PropertyDispatch generate(PropertyDispatch.PentaFunction $$0) { + public PropertyDispatch generate(PentaFunction $$0) { this.property1.getPossibleValues().forEach(($$1) -> this.property2.getPossibleValues().forEach(($$2) -> this.property3.getPossibleValues().forEach(($$3) -> this.property4.getPossibleValues().forEach(($$4) -> this.property5.getPossibleValues().forEach(($$5) -> this.select((T1)$$1, (T2)$$2, (T3)$$3, (T4)$$4, (T5)$$5, $$0.apply($$1, $$2, $$3, $$4, $$5))))))); return this; } - public PropertyDispatch generateList(PropertyDispatch.PentaFunction> $$0) { + public PropertyDispatch generateList(PentaFunction> $$0) { this.property1.getPossibleValues().forEach(($$1) -> this.property2.getPossibleValues().forEach(($$2) -> this.property3.getPossibleValues().forEach(($$3) -> this.property4.getPossibleValues().forEach(($$4) -> this.property5.getPossibleValues().forEach(($$5) -> this.select((T1)$$1, (T2)$$2, (T3)$$3, (T4)$$4, (T5)$$5, (List)$$0.apply($$1, $$2, $$3, $$4, $$5))))))); return this; } diff -r -u3 -N a/net/minecraft/data/tags/TagsProvider.java b/net/minecraft/data/tags/TagsProvider.java --- a/net/minecraft/data/tags/TagsProvider.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/data/tags/TagsProvider.java 2022-05-25 22:50:12.000000000 -0700 @@ -92,7 +92,7 @@ return this.generator.getOutputFolder().resolve("data/" + $$0.getNamespace() + "/" + TagManager.getTagDir($$1) + "/" + $$0.getPath() + ".json"); } - protected TagsProvider.TagAppender tag(TagKey $$0) { + protected TagAppender tag(TagKey $$0) { Tag.Builder $$1 = this.getOrCreateRawBuilder($$0); return new TagAppender<>($$1, this.registry, "vanilla"); } @@ -112,13 +112,13 @@ this.source = $$2; } - public TagsProvider.TagAppender add(T $$0) { + public TagAppender add(T $$0) { this.builder.addElement(this.registry.getKey($$0), this.source); return this; } @SafeVarargs - public final TagsProvider.TagAppender add(ResourceKey... $$0) { + public final TagAppender add(ResourceKey... $$0) { for(ResourceKey $$1 : $$0) { this.builder.addElement($$1.location(), this.source); } @@ -126,23 +126,23 @@ return this; } - public TagsProvider.TagAppender addOptional(ResourceLocation $$0) { + public TagAppender addOptional(ResourceLocation $$0) { this.builder.addOptionalElement($$0, this.source); return this; } - public TagsProvider.TagAppender addTag(TagKey $$0) { + public TagAppender addTag(TagKey $$0) { this.builder.addTag($$0.location(), this.source); return this; } - public TagsProvider.TagAppender addOptionalTag(ResourceLocation $$0) { + public TagAppender addOptionalTag(ResourceLocation $$0) { this.builder.addOptionalTag($$0, this.source); return this; } @SafeVarargs - public final TagsProvider.TagAppender add(T... $$0) { + public final TagAppender add(T... $$0) { Stream.of($$0).map(this.registry::getKey).forEach(($$0x) -> this.builder.addElement($$0x, this.source)); return this; } diff -r -u3 -N a/net/minecraft/network/chat/FormattedText.java b/net/minecraft/network/chat/FormattedText.java --- a/net/minecraft/network/chat/FormattedText.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/network/chat/FormattedText.java 2022-05-25 22:50:12.000000000 -0700 @@ -8,26 +8,26 @@ public interface FormattedText { Optional STOP_ITERATION = Optional.of(Unit.INSTANCE); FormattedText EMPTY = new FormattedText() { - public Optional visit(FormattedText.ContentConsumer $$0) { + public Optional visit(ContentConsumer $$0) { return Optional.empty(); } - public Optional visit(FormattedText.StyledContentConsumer $$0, Style $$1) { + public Optional visit(StyledContentConsumer $$0, Style $$1) { return Optional.empty(); } }; - Optional visit(FormattedText.ContentConsumer var1); + Optional visit(ContentConsumer var1); - Optional visit(FormattedText.StyledContentConsumer var1, Style var2); + Optional visit(StyledContentConsumer var1, Style var2); static FormattedText of(final String $$0) { return new FormattedText() { - public Optional visit(FormattedText.ContentConsumer $$0x) { + public Optional visit(ContentConsumer $$0x) { return $$0.accept($$0); } - public Optional visit(FormattedText.StyledContentConsumer $$0x, Style $$1) { + public Optional visit(StyledContentConsumer $$0x, Style $$1) { return $$0.accept($$1, $$0); } }; @@ -35,11 +35,11 @@ static FormattedText of(final String $$0, final Style $$1) { return new FormattedText() { - public Optional visit(FormattedText.ContentConsumer $$0x) { + public Optional visit(ContentConsumer $$0x) { return $$0.accept($$0); } - public Optional visit(FormattedText.StyledContentConsumer $$0x, Style $$1x) { + public Optional visit(StyledContentConsumer $$0x, Style $$1x) { return $$0.accept($$1.applyTo($$1), $$0); } }; @@ -51,7 +51,7 @@ static FormattedText composite(final List $$0) { return new FormattedText() { - public Optional visit(FormattedText.ContentConsumer $$0x) { + public Optional visit(ContentConsumer $$0x) { for(FormattedText $$1 : $$0) { Optional $$2 = $$1.visit($$0); if ($$2.isPresent()) { @@ -62,7 +62,7 @@ return Optional.empty(); } - public Optional visit(FormattedText.StyledContentConsumer $$0x, Style $$1) { + public Optional visit(StyledContentConsumer $$0x, Style $$1) { for(FormattedText $$2 : $$0) { Optional $$3 = $$2.visit($$0, $$1); if ($$3.isPresent()) { diff -r -u3 -N a/net/minecraft/network/chat/HoverEvent.java b/net/minecraft/network/chat/HoverEvent.java --- a/net/minecraft/network/chat/HoverEvent.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/network/chat/HoverEvent.java 2022-05-25 22:50:12.000000000 -0700 @@ -25,20 +25,20 @@ public class HoverEvent { static final Logger LOGGER = LogUtils.getLogger(); - private final HoverEvent.Action action; + private final Action action; private final Object value; - public HoverEvent(HoverEvent.Action $$0, T $$1) { + public HoverEvent(Action $$0, T $$1) { this.action = $$0; this.value = $$1; } - public HoverEvent.Action getAction() { + public Action getAction() { return this.action; } @Nullable - public T getValue(HoverEvent.Action $$0) { + public T getValue(Action $$0) { return (T)(this.action == $$0 ? $$0.cast(this.value) : null); } @@ -68,7 +68,7 @@ if ($$1 == null) { return null; } else { - HoverEvent.Action $$2 = HoverEvent.Action.getByName($$1); + Action $$2 = HoverEvent.Action.getByName($$1); if ($$2 == null) { return null; } else { @@ -91,10 +91,10 @@ } public static class Action { - public static final HoverEvent.Action SHOW_TEXT = new Action<>("show_text", true, Component.Serializer::fromJson, Component.Serializer::toJsonTree, Function.identity()); - public static final HoverEvent.Action SHOW_ITEM = new Action<>("show_item", true, ItemStackInfo::create, ItemStackInfo::serialize, ItemStackInfo::create); - public static final HoverEvent.Action SHOW_ENTITY = new Action<>("show_entity", true, EntityTooltipInfo::create, EntityTooltipInfo::serialize, EntityTooltipInfo::create); - private static final Map> LOOKUP = (Map)Stream.of(SHOW_TEXT, SHOW_ITEM, SHOW_ENTITY).collect(ImmutableMap.toImmutableMap(Action::getName, ($$0) -> $$0)); + public static final Action SHOW_TEXT = new Action<>("show_text", true, Component.Serializer::fromJson, Component.Serializer::toJsonTree, Function.identity()); + public static final Action SHOW_ITEM = new Action<>("show_item", true, ItemStackInfo::create, ItemStackInfo::serialize, ItemStackInfo::create); + public static final Action SHOW_ENTITY = new Action<>("show_entity", true, EntityTooltipInfo::create, EntityTooltipInfo::serialize, EntityTooltipInfo::create); + private static final Map> LOOKUP = (Map)Stream.of(SHOW_TEXT, SHOW_ITEM, SHOW_ENTITY).collect(ImmutableMap.toImmutableMap(Action::getName, ($$0) -> $$0)); private final String name; private final boolean allowFromServer; private final Function argDeserializer; @@ -118,7 +118,7 @@ } @Nullable - public static HoverEvent.Action getByName(String $$0) { + public static Action getByName(String $$0) { return (Action)LOOKUP.get($$0); } diff -r -u3 -N a/net/minecraft/network/ConnectionProtocol.java b/net/minecraft/network/ConnectionProtocol.java --- a/net/minecraft/network/ConnectionProtocol.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/network/ConnectionProtocol.java 2022-05-25 22:50:12.000000000 -0700 @@ -190,7 +190,7 @@ private static final ConnectionProtocol[] LOOKUP = new ConnectionProtocol[4]; private static final Map>, ConnectionProtocol> PROTOCOL_BY_PACKET = Maps.newHashMap(); private final int id; - private final Map> flows; + private final Map> flows; private static ProtocolBuilder protocol() { return new ProtocolBuilder(); @@ -209,7 +209,7 @@ @VisibleForDebug public Int2ObjectMap>> getPacketsByIds(PacketFlow $$0) { Int2ObjectMap>> $$1 = new Int2ObjectOpenHashMap(); - ConnectionProtocol.PacketSet $$2 = (PacketSet)this.flows.get($$0); + PacketSet $$2 = (PacketSet)this.flows.get($$0); if ($$2 == null) { return Int2ObjectMaps.emptyMap(); } else { @@ -260,7 +260,7 @@ final Object2IntMap>> classToId = Util.make(new Object2IntOpenHashMap(), ($$0) -> $$0.defaultReturnValue(-1)); private final List>> idToDeserializer = Lists.newArrayList(); - public

> ConnectionProtocol.PacketSet addPacket(Class

$$0, Function $$1) { + public

> PacketSet addPacket(Class

$$0, Function $$1) { int $$2 = this.idToDeserializer.size(); int $$3 = this.classToId.put($$0, $$2); if ($$3 != -1) { @@ -291,9 +291,9 @@ } static class ProtocolBuilder { - final Map> flows = Maps.newEnumMap(PacketFlow.class); + final Map> flows = Maps.newEnumMap(PacketFlow.class); - public ProtocolBuilder addFlow(PacketFlow $$0, ConnectionProtocol.PacketSet $$1) { + public ProtocolBuilder addFlow(PacketFlow $$0, PacketSet $$1) { this.flows.put($$0, $$1); return this; } diff -r -u3 -N a/net/minecraft/network/syncher/SynchedEntityData.java b/net/minecraft/network/syncher/SynchedEntityData.java --- a/net/minecraft/network/syncher/SynchedEntityData.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/network/syncher/SynchedEntityData.java 2022-05-25 22:50:12.000000000 -0700 @@ -27,7 +27,7 @@ private static final int EOF_MARKER = 255; private static final int MAX_ID_VALUE = 254; private final Entity entity; - private final Int2ObjectMap> itemsById = new Int2ObjectOpenHashMap<>(); + private final Int2ObjectMap> itemsById = new Int2ObjectOpenHashMap<>(); private final ReadWriteLock lock = new ReentrantReadWriteLock(); private boolean isEmpty = true; private boolean isDirty; @@ -87,17 +87,17 @@ } private void createDataItem(EntityDataAccessor $$0, T $$1) { - SynchedEntityData.DataItem $$2 = new DataItem<>($$0, $$1); + DataItem $$2 = new DataItem<>($$0, $$1); this.lock.writeLock().lock(); this.itemsById.put($$0.getId(), $$2); this.isEmpty = false; this.lock.writeLock().unlock(); } - private SynchedEntityData.DataItem getItem(EntityDataAccessor $$0) { + private DataItem getItem(EntityDataAccessor $$0) { this.lock.readLock().lock(); - SynchedEntityData.DataItem $$1; + DataItem $$1; try { $$1 = this.itemsById.get($$0.getId()); } catch (Throwable var9) { @@ -117,7 +117,7 @@ } public void set(EntityDataAccessor $$0, T $$1) { - SynchedEntityData.DataItem $$2 = this.getItem($$0); + DataItem $$2 = this.getItem($$0); if (ObjectUtils.notEqual($$1, $$2.getValue())) { $$2.setValue($$1); this.entity.onSyncedDataUpdated($$0); @@ -131,9 +131,9 @@ return this.isDirty; } - public static void pack(@Nullable List> $$0, FriendlyByteBuf $$1) { + public static void pack(@Nullable List> $$0, FriendlyByteBuf $$1) { if ($$0 != null) { - for(SynchedEntityData.DataItem $$2 : $$0) { + for(DataItem $$2 : $$0) { writeDataItem($$1, $$2); } } @@ -142,16 +142,16 @@ } @Nullable - public List> packDirty() { - List> $$0 = null; + public List> packDirty() { + List> $$0 = null; if (this.isDirty) { this.lock.readLock().lock(); - for(SynchedEntityData.DataItem $$1 : this.itemsById.values()) { + for(DataItem $$1 : this.itemsById.values()) { if ($$1.isDirty()) { $$1.setDirty(false); if ($$0 == null) { - $$0 = Lists.>newArrayList(); + $$0 = Lists.>newArrayList(); } $$0.add($$1.copy()); @@ -166,13 +166,13 @@ } @Nullable - public List> getAll() { - List> $$0 = null; + public List> getAll() { + List> $$0 = null; this.lock.readLock().lock(); - for(SynchedEntityData.DataItem $$1 : this.itemsById.values()) { + for(DataItem $$1 : this.itemsById.values()) { if ($$0 == null) { - $$0 = Lists.>newArrayList(); + $$0 = Lists.>newArrayList(); } $$0.add($$1.copy()); @@ -182,7 +182,7 @@ return $$0; } - private static void writeDataItem(FriendlyByteBuf $$0, SynchedEntityData.DataItem $$1) { + private static void writeDataItem(FriendlyByteBuf $$0, DataItem $$1) { EntityDataAccessor $$2 = $$1.getAccessor(); int $$3 = EntityDataSerializers.getSerializedId($$2.getSerializer()); if ($$3 < 0) { @@ -195,13 +195,13 @@ } @Nullable - public static List> unpack(FriendlyByteBuf $$0) { - List> $$1 = null; + public static List> unpack(FriendlyByteBuf $$0) { + List> $$1 = null; int $$2; while(($$2 = $$0.readUnsignedByte()) != 255) { if ($$1 == null) { - $$1 = Lists.>newArrayList(); + $$1 = Lists.>newArrayList(); } int $$3 = $$0.readVarInt(); @@ -216,16 +216,16 @@ return $$1; } - private static SynchedEntityData.DataItem genericHelper(FriendlyByteBuf $$0, int $$1, EntityDataSerializer $$2) { + private static DataItem genericHelper(FriendlyByteBuf $$0, int $$1, EntityDataSerializer $$2) { return new DataItem<>($$2.createAccessor($$1), $$2.read($$0)); } - public void assignValues(List> $$0) { + public void assignValues(List> $$0) { this.lock.writeLock().lock(); try { - for(SynchedEntityData.DataItem $$1 : $$0) { - SynchedEntityData.DataItem $$2 = this.itemsById.get($$1.getAccessor().getId()); + for(DataItem $$1 : $$0) { + DataItem $$2 = this.itemsById.get($$1.getAccessor().getId()); if ($$2 != null) { this.assignValue($$2, $$1); this.entity.onSyncedDataUpdated($$1.getAccessor()); @@ -238,7 +238,7 @@ this.isDirty = true; } - private void assignValue(SynchedEntityData.DataItem $$0, SynchedEntityData.DataItem $$1) { + private void assignValue(DataItem $$0, DataItem $$1) { if (!Objects.equals($$1.accessor.getSerializer(), $$0.accessor.getSerializer())) { throw new IllegalStateException(String.format("Invalid entity data item type for field %d on entity %s: old=%s(%s), new=%s(%s)", $$0.accessor.getId(), this.entity, $$0.value, $$0.value.getClass(), $$1.value, $$1.value.getClass())); } else { @@ -254,7 +254,7 @@ this.isDirty = false; this.lock.readLock().lock(); - for(SynchedEntityData.DataItem $$0 : this.itemsById.values()) { + for(DataItem $$0 : this.itemsById.values()) { $$0.setDirty(false); } @@ -292,7 +292,7 @@ this.dirty = $$0; } - public SynchedEntityData.DataItem copy() { + public DataItem copy() { return new DataItem<>(this.accessor, this.accessor.getSerializer().copy(this.value)); } } diff -r -u3 -N a/net/minecraft/resources/RegistryLoader.java b/net/minecraft/resources/RegistryLoader.java --- a/net/minecraft/resources/RegistryLoader.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/resources/RegistryLoader.java 2022-05-25 22:50:12.000000000 -0700 @@ -17,7 +17,7 @@ public class RegistryLoader { private final RegistryResourceAccess resources; - private final Map>, RegistryLoader.ReadCache> readCache = new IdentityHashMap(); + private final Map>, ReadCache> readCache = new IdentityHashMap(); RegistryLoader(RegistryResourceAccess $$0) { this.resources = $$0; @@ -35,7 +35,7 @@ } DataResult> overrideElementFromResources(WritableRegistry $$0, ResourceKey> $$1, Codec $$2, ResourceKey $$3, DynamicOps $$4) { - RegistryLoader.ReadCache $$5 = this.readCache($$1); + ReadCache $$5 = this.readCache($$1); DataResult> $$6 = (DataResult)$$5.values.get($$3); if ($$6 != null) { return $$6; @@ -66,7 +66,7 @@ } } - private RegistryLoader.ReadCache readCache(ResourceKey> $$0) { + private ReadCache readCache(ResourceKey> $$0) { return (ReadCache)this.readCache.computeIfAbsent($$0, ($$0x) -> new ReadCache()); } diff -r -u3 -N a/net/minecraft/resources/RegistryResourceAccess.java b/net/minecraft/resources/RegistryResourceAccess.java --- a/net/minecraft/resources/RegistryResourceAccess.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/resources/RegistryResourceAccess.java 2022-05-25 22:50:12.000000000 -0700 @@ -32,7 +32,7 @@ public interface RegistryResourceAccess { Collection> listResources(ResourceKey> var1); - Optional>> parseElement(DynamicOps var1, ResourceKey> var2, ResourceKey var3, Decoder var4); + Optional>> parseElement(DynamicOps var1, ResourceKey> var2, ResourceKey var3, Decoder var4); static RegistryResourceAccess forResourceManager(final ResourceManager $$0) { return new RegistryResourceAccess() { @@ -49,7 +49,7 @@ return $$2; } - public Optional>> parseElement(DynamicOps $$0x, ResourceKey> $$1, ResourceKey $$2, Decoder $$3) { + public Optional>> parseElement(DynamicOps $$0x, ResourceKey> $$1, ResourceKey $$2, Decoder $$3) { ResourceLocation $$4 = elementPath($$1, $$2); if (!$$0.hasResource($$4)) { return Optional.empty(); @@ -131,7 +131,7 @@ return (Collection)this.entries.keySet().stream().flatMap(($$1) -> $$1.cast($$0).stream()).collect(Collectors.toList()); } - public Optional>> parseElement(DynamicOps $$0, ResourceKey> $$1, ResourceKey $$2, Decoder $$3) { + public Optional>> parseElement(DynamicOps $$0, ResourceKey> $$1, ResourceKey $$2, Decoder $$3) { Entry $$4 = (Entry)this.entries.get($$2); return $$4 == null ? Optional.of(DataResult.error("Unknown element: " + $$2)) : Optional.of($$3.parse($$0, $$4.data).setLifecycle($$4.lifecycle).map(($$1x) -> RegistryResourceAccess.ParsedEntry.createWithId((int)$$1x, $$4.id))); } @@ -141,11 +141,11 @@ } public static record ParsedEntry(E value, OptionalInt fixedId) { - public static RegistryResourceAccess.ParsedEntry createWithoutId(E $$0) { + public static ParsedEntry createWithoutId(E $$0) { return new ParsedEntry<>($$0, OptionalInt.empty()); } - public static RegistryResourceAccess.ParsedEntry createWithId(E $$0, int $$1) { + public static ParsedEntry createWithId(E $$0, int $$1) { return new ParsedEntry<>($$0, OptionalInt.of($$1)); } } diff -r -u3 -N a/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java b/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java --- a/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java 2022-05-25 22:50:12.000000000 -0700 @@ -39,22 +39,22 @@ return this.mailbox.hasWork() || this.queues.values().stream().anyMatch(ChunkTaskPriorityQueue::hasWork); } - public static ChunkTaskPriorityQueueSorter.Message message(Function, T> $$0, long $$1, IntSupplier $$2) { + public static Message message(Function, T> $$0, long $$1, IntSupplier $$2) { return new Message<>($$0, $$1, $$2); } - public static ChunkTaskPriorityQueueSorter.Message message(Runnable $$0, long $$1, IntSupplier $$2) { + public static Message message(Runnable $$0, long $$1, IntSupplier $$2) { return new Message(($$1x) -> () -> { $$0.run(); $$1x.tell(Unit.INSTANCE); }, $$1, $$2); } - public static ChunkTaskPriorityQueueSorter.Message message(ChunkHolder $$0, Runnable $$1) { + public static Message message(ChunkHolder $$0, Runnable $$1) { return message($$1, $$0.getPos().toLong(), $$0::getQueueLevel); } - public static ChunkTaskPriorityQueueSorter.Message message(ChunkHolder $$0, Function, T> $$1) { + public static Message message(ChunkHolder $$0, Function, T> $$1) { return message($$1, $$0.getPos().toLong(), $$0::getQueueLevel); } @@ -62,7 +62,7 @@ return new Release($$0, $$1, $$2); } - public ProcessorHandle> getProcessor(ProcessorHandle $$0, boolean $$1) { + public ProcessorHandle> getProcessor(ProcessorHandle $$0, boolean $$1) { return (ProcessorHandle)this.mailbox.ask(($$2) -> new StrictQueue.IntRunnable(0, () -> { this.getQueue($$0); $$2.tell(ProcessorHandle.of("chunk priority sorter around " + $$0.name(), ($$2x) -> this.submit($$0, $$2x.task, $$2x.pos, $$2x.level, $$1))); diff -r -u3 -N a/net/minecraft/server/packs/resources/SimpleReloadInstance.java b/net/minecraft/server/packs/resources/SimpleReloadInstance.java --- a/net/minecraft/server/packs/resources/SimpleReloadInstance.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/server/packs/resources/SimpleReloadInstance.java 2022-05-25 22:50:12.000000000 -0700 @@ -28,7 +28,7 @@ return new SimpleReloadInstance($$2, $$3, $$0, $$1, ($$1x, $$2x, $$3x, $$4x, $$5) -> $$3x.reload($$1x, $$2x, InactiveProfiler.INSTANCE, InactiveProfiler.INSTANCE, $$2, $$5), $$4); } - protected SimpleReloadInstance(Executor $$0, final Executor $$1, ResourceManager $$2, List $$3, SimpleReloadInstance.StateFactory $$4, CompletableFuture $$5) { + protected SimpleReloadInstance(Executor $$0, final Executor $$1, ResourceManager $$2, List $$3, StateFactory $$4, CompletableFuture $$5) { this.listenerCount = $$3.size(); this.startedTaskCounter.incrementAndGet(); $$5.thenRun(this.doneTaskCounter::incrementAndGet); diff -r -u3 -N a/net/minecraft/tags/TagManager.java b/net/minecraft/tags/TagManager.java --- a/net/minecraft/tags/TagManager.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/tags/TagManager.java 2022-05-25 22:50:12.000000000 -0700 @@ -17,13 +17,13 @@ public class TagManager implements PreparableReloadListener { private static final Map>, String> CUSTOM_REGISTRY_DIRECTORIES = Map.of(Registry.BLOCK_REGISTRY, "tags/blocks", Registry.ENTITY_TYPE_REGISTRY, "tags/entity_types", Registry.FLUID_REGISTRY, "tags/fluids", Registry.GAME_EVENT_REGISTRY, "tags/game_events", Registry.ITEM_REGISTRY, "tags/items"); private final RegistryAccess registryAccess; - private List> results = List.of(); + private List> results = List.of(); public TagManager(RegistryAccess $$0) { this.registryAccess = $$0; } - public List> getResult() { + public List> getResult() { return this.results; } @@ -33,11 +33,11 @@ } public CompletableFuture reload(PreparableReloadListener.PreparationBarrier $$0, ResourceManager $$1, ProfilerFiller $$2, ProfilerFiller $$3, Executor $$4, Executor $$5) { - List>> $$6 = this.registryAccess.registries().map(($$2x) -> this.createLoader($$1, $$4, $$2x)).toList(); + List>> $$6 = this.registryAccess.registries().map(($$2x) -> this.createLoader($$1, $$4, $$2x)).toList(); return CompletableFuture.allOf((CompletableFuture[])$$6.toArray(($$0x) -> new CompletableFuture[$$0x])).thenCompose($$0::wait).thenAcceptAsync(($$1x) -> this.results = (List)$$6.stream().map(CompletableFuture::join).collect(Collectors.toUnmodifiableList()), $$5); } - private CompletableFuture> createLoader(ResourceManager $$0, Executor $$1, RegistryAccess.RegistryEntry $$2) { + private CompletableFuture> createLoader(ResourceManager $$0, Executor $$1, RegistryAccess.RegistryEntry $$2) { ResourceKey> $$3 = $$2.key(); Registry $$4 = $$2.value(); TagLoader> $$5 = new TagLoader<>(($$2x) -> $$4.getHolder(ResourceKey.create($$3, $$2x)), getTagDir($$3)); diff -r -u3 -N a/net/minecraft/tags/TagNetworkSerialization.java b/net/minecraft/tags/TagNetworkSerialization.java --- a/net/minecraft/tags/TagNetworkSerialization.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/tags/TagNetworkSerialization.java 2022-05-25 22:50:12.000000000 -0700 @@ -40,7 +40,7 @@ return new NetworkPayload($$1); } - public static void deserializeTagsFromNetwork(ResourceKey> $$0, Registry $$1, NetworkPayload $$2, TagNetworkSerialization.TagOutput $$3) { + public static void deserializeTagsFromNetwork(ResourceKey> $$0, Registry $$1, NetworkPayload $$2, TagOutput $$3) { $$2.tags.forEach(($$3x, $$4) -> { TagKey $$5 = TagKey.create($$0, $$3x); List> $$6 = $$4.intStream().mapToObj($$1::getHolder).flatMap(Optional::stream).toList(); diff -r -u3 -N a/net/minecraft/util/CubicSpline.java b/net/minecraft/util/CubicSpline.java --- a/net/minecraft/util/CubicSpline.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/util/CubicSpline.java 2022-05-25 22:50:12.000000000 -0700 @@ -22,7 +22,7 @@ float max(); - CubicSpline mapAll(CubicSpline.CoordinateVisitor var1); + CubicSpline mapAll(CoordinateVisitor var1); static Codec> codec(Codec> $$0) { MutableObject>> $$1 = new MutableObject<>(); @@ -32,7 +32,7 @@ return new Point((float)$$0, $$1xx, (float)$$2); })); - Codec> $$3 = RecordCodecBuilder.create(($$2x) -> $$2x.group($$0.fieldOf("coordinate").forGetter(Multipoint::coordinate), ExtraCodecs.nonEmptyList($$2.listOf()).fieldOf("points").forGetter(($$0x) -> IntStream.range(0, $$0x.locations.length).mapToObj(($$1) -> new Point($$0x.locations()[$$1], (CubicSpline)$$0x.values().get($$1), $$0x.derivatives()[$$1])).toList())).apply($$2x, ($$0x, $$1) -> { + Codec> $$3 = RecordCodecBuilder.create(($$2x) -> $$2x.group($$0.fieldOf("coordinate").forGetter(Multipoint::coordinate), ExtraCodecs.nonEmptyList($$2.listOf()).fieldOf("points").forGetter(($$0x) -> IntStream.range(0, $$0x.locations.length).mapToObj(($$1) -> new Point($$0x.locations()[$$1], (CubicSpline)$$0x.values().get($$1), $$0x.derivatives()[$$1])).toList())).apply($$2x, ($$0x, $$1) -> { float[] $$2 = new float[$$1.size()]; ImmutableList.Builder> $$3 = ImmutableList.builder(); float[] $$4 = new float[$$1.size()]; @@ -48,7 +48,7 @@ })); $$1.setValue(Codec.either(Codec.FLOAT, $$3).xmap(($$0x) -> $$0x.map(Constant::new, ($$0) -> $$0), ($$0x) -> { Either var10000; - if ($$0x instanceof CubicSpline.Constant $$1) { + if ($$0x instanceof Constant $$1) { var10000 = Either.left($$1.value()); } else { var10000 = Either.right((Multipoint)$$0x); @@ -63,11 +63,11 @@ return new Constant<>($$0); } - static CubicSpline.Builder builder(ToFloatFunction $$0) { + static Builder builder(ToFloatFunction $$0) { return new Builder<>($$0); } - static CubicSpline.Builder builder(ToFloatFunction $$0, ToFloatFunction $$1) { + static Builder builder(ToFloatFunction $$0, ToFloatFunction $$1) { return new Builder<>($$0, $$1); } @@ -87,11 +87,11 @@ this.valueTransformer = $$1; } - public CubicSpline.Builder addPoint(float $$0, float $$1, float $$2) { + public Builder addPoint(float $$0, float $$1, float $$2) { return this.addPoint($$0, new Constant<>(this.valueTransformer.apply((C)$$1)), $$2); } - public CubicSpline.Builder addPoint(float $$0, CubicSpline $$1, float $$2) { + public Builder addPoint(float $$0, CubicSpline $$1, float $$2) { if (!this.locations.isEmpty() && $$0 <= this.locations.getFloat(this.locations.size() - 1)) { throw new IllegalArgumentException("Please register points in ascending order"); } else { @@ -129,7 +129,7 @@ return this.value; } - public CubicSpline mapAll(CubicSpline.CoordinateVisitor $$0) { + public CubicSpline mapAll(CoordinateVisitor $$0) { return this; } } @@ -192,7 +192,7 @@ return (float)this.values().stream().mapToDouble(CubicSpline::max).max().orElseThrow(); } - public CubicSpline mapAll(CubicSpline.CoordinateVisitor $$0) { + public CubicSpline mapAll(CoordinateVisitor $$0) { return new Multipoint<>($$0.visit(this.coordinate), this.locations, this.values().stream().map(($$1) -> $$1.mapAll($$0)).toList(), this.derivatives); } } diff -r -u3 -N a/net/minecraft/util/ExtraCodecs.java b/net/minecraft/util/ExtraCodecs.java --- a/net/minecraft/util/ExtraCodecs.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/util/ExtraCodecs.java 2022-05-25 22:50:12.000000000 -0700 @@ -218,7 +218,7 @@ if (this == $$0) { return true; } else if ($$0 != null && this.getClass() == $$0.getClass()) { - ExtraCodecs.EitherCodec $$1 = (EitherCodec)$$0; + EitherCodec $$1 = (EitherCodec)$$0; return Objects.equals(this.first, $$1.first) && Objects.equals(this.second, $$1.second); } else { return false; @@ -277,7 +277,7 @@ if (this == $$0) { return true; } else if ($$0 != null && this.getClass() == $$0.getClass()) { - ExtraCodecs.XorCodec $$1 = (XorCodec)$$0; + XorCodec $$1 = (XorCodec)$$0; return Objects.equals(this.first, $$1.first) && Objects.equals(this.second, $$1.second); } else { return false; diff -r -u3 -N a/net/minecraft/util/profiling/metrics/MetricSampler.java b/net/minecraft/util/profiling/metrics/MetricSampler.java --- a/net/minecraft/util/profiling/metrics/MetricSampler.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/util/profiling/metrics/MetricSampler.java 2022-05-25 22:50:12.000000000 -0700 @@ -41,7 +41,7 @@ return builder($$0, $$1, $$3, $$2).build(); } - public static MetricSampler.MetricSamplerBuilder builder(String $$0, MetricCategory $$1, ToDoubleFunction $$2, T $$3) { + public static MetricSamplerBuilder builder(String $$0, MetricCategory $$1, ToDoubleFunction $$2, T $$3) { return new MetricSamplerBuilder<>($$0, $$1, $$2, $$3); } @@ -142,12 +142,12 @@ this.context = $$3; } - public MetricSampler.MetricSamplerBuilder withBeforeTick(Consumer $$0) { + public MetricSamplerBuilder withBeforeTick(Consumer $$0) { this.beforeTick = () -> $$0.accept(this.context); return this; } - public MetricSampler.MetricSamplerBuilder withThresholdAlert(ThresholdTest $$0) { + public MetricSamplerBuilder withThresholdAlert(ThresholdTest $$0) { this.thresholdTest = $$0; return this; } diff -r -u3 -N a/net/minecraft/util/random/SimpleWeightedRandomList.java b/net/minecraft/util/random/SimpleWeightedRandomList.java --- a/net/minecraft/util/random/SimpleWeightedRandomList.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/util/random/SimpleWeightedRandomList.java 2022-05-25 22:50:12.000000000 -0700 @@ -20,7 +20,7 @@ super($$0); } - public static SimpleWeightedRandomList.Builder builder() { + public static Builder builder() { return new Builder<>(); } @@ -39,7 +39,7 @@ public static class Builder { private final ImmutableList.Builder> result = ImmutableList.builder(); - public SimpleWeightedRandomList.Builder add(E $$0, int $$1) { + public Builder add(E $$0, int $$1) { this.result.add(WeightedEntry.wrap($$0, $$1)); return this; } diff -r -u3 -N a/net/minecraft/util/random/WeightedEntry.java b/net/minecraft/util/random/WeightedEntry.java --- a/net/minecraft/util/random/WeightedEntry.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/util/random/WeightedEntry.java 2022-05-25 22:50:12.000000000 -0700 @@ -6,7 +6,7 @@ public interface WeightedEntry { Weight getWeight(); - static WeightedEntry.Wrapper wrap(T $$0, int $$1) { + static Wrapper wrap(T $$0, int $$1) { return new Wrapper<>($$0, Weight.of($$1)); } @@ -43,7 +43,7 @@ return this.weight; } - public static Codec> codec(Codec $$0) { + public static Codec> codec(Codec $$0) { return RecordCodecBuilder.create(($$1) -> $$1.group($$0.fieldOf("data").forGetter(Wrapper::getData), Weight.CODEC.fieldOf("weight").forGetter(Wrapper::getWeight)).apply($$1, Wrapper::new)); } } diff -r -u3 -N a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java --- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java 2022-05-25 22:50:12.000000000 -0700 @@ -92,7 +92,7 @@ }); } else { for(BlockPos $$8 : $$5) { - this.batchCache.computeIfAbsent($$8.asLong(), (Long2ObjectFunction)(($$2x) -> new JitteredLinearRetry($$1.level.random, $$2))); + this.batchCache.computeIfAbsent($$8.asLong(), (Long2ObjectFunction)(($$2x) -> new JitteredLinearRetry($$1.level.random, $$2))); } } diff -r -u3 -N a/net/minecraft/world/entity/ai/behavior/ShufflingList.java b/net/minecraft/world/entity/ai/behavior/ShufflingList.java --- a/net/minecraft/world/entity/ai/behavior/ShufflingList.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/ai/behavior/ShufflingList.java 2022-05-25 22:50:12.000000000 -0700 @@ -12,15 +12,15 @@ import java.util.stream.Stream; public class ShufflingList { - protected final List> entries; + protected final List> entries; private final Random random = new Random(); public ShufflingList() { - this.entries = Lists.>newArrayList(); + this.entries = Lists.>newArrayList(); } - private ShufflingList(List> $$0) { - this.entries = Lists.>newArrayList($$0); + private ShufflingList(List> $$0) { + this.entries = Lists.>newArrayList($$0); } public static Codec> codec(Codec $$0) { @@ -76,14 +76,14 @@ return this.weight + ":" + this.data; } - public static Codec> codec(final Codec $$0) { - return new Codec>() { - public DataResult, T>> decode(DynamicOps $$0x, T $$1) { + public static Codec> codec(final Codec $$0) { + return new Codec>() { + public DataResult, T>> decode(DynamicOps $$0x, T $$1) { Dynamic $$2 = new Dynamic<>($$0, $$1); return $$2.get("data").flatMap($$0::parse).map(($$1x) -> new WeightedEntry<>($$1x, $$2.get("weight").asInt(1))).map(($$1x) -> Pair.of($$1x, $$0.empty())); } - public DataResult encode(ShufflingList.WeightedEntry $$0x, DynamicOps $$1, T $$2) { + public DataResult encode(WeightedEntry $$0x, DynamicOps $$1, T $$2) { return $$1.mapBuilder().add("weight", $$1.createInt($$0.weight)).add("data", $$0.encodeStart($$1, $$0.data)).build($$2); } }; diff -r -u3 -N a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java --- a/net/minecraft/world/entity/ai/Brain.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/ai/Brain.java 2022-05-25 22:50:12.000000000 -0700 @@ -53,7 +53,7 @@ private Activity defaultActivity = Activity.IDLE; private long lastScheduleUpdate = -9999L; - public static Brain.Provider provider(Collection> $$0, Collection>> $$1) { + public static Provider provider(Collection> $$0, Collection>> $$1) { return new Provider<>($$0, $$1); } @@ -65,17 +65,17 @@ } public DataResult> decode(DynamicOps $$0x, MapLike $$1x) { - MutableObject>>> $$2 = new MutableObject<>(DataResult.success(ImmutableList.builder())); + MutableObject>>> $$2 = new MutableObject<>(DataResult.success(ImmutableList.builder())); $$1.entries().forEach(($$2xx) -> { DataResult> $$3 = Registry.MEMORY_MODULE_TYPE.byNameCodec().parse($$0, (T)$$2xx.getFirst()); - DataResult> $$4 = $$3.flatMap(($$2xxx) -> this.captureRead($$2xxx, $$0, (T)$$2xx.getSecond())); + DataResult> $$4 = $$3.flatMap(($$2xxx) -> this.captureRead($$2xxx, $$0, (T)$$2xx.getSecond())); $$2.setValue($$2.getValue().apply2(ImmutableList.Builder::add, $$4)); }); - ImmutableList> $$3 = (ImmutableList)$$2.getValue().resultOrPartial(Brain.LOGGER::error).map(ImmutableList.Builder::build).orElseGet(ImmutableList::of); + ImmutableList> $$3 = (ImmutableList)$$2.getValue().resultOrPartial(Brain.LOGGER::error).map(ImmutableList.Builder::build).orElseGet(ImmutableList::of); return DataResult.success(new Brain<>($$0, $$1, $$3, $$2::getValue)); } - private DataResult> captureRead(MemoryModuleType $$0x, DynamicOps $$1x, T $$2x) { + private DataResult> captureRead(MemoryModuleType $$0x, DynamicOps $$1x, T $$2x) { return ((DataResult)$$0.getCodec().map(DataResult::success).orElseGet(() -> DataResult.error("No codec for memory: " + $$0))).flatMap(($$2xx) -> $$2xx.parse($$1, $$2)).map(($$1xx) -> new MemoryValue<>($$0, Optional.of($$1xx))); } @@ -87,7 +87,7 @@ return $$2.getValue(); } - public Brain(Collection> $$0, Collection>> $$1, ImmutableList> $$2, Supplier>> $$3) { + public Brain(Collection> $$0, Collection>> $$1, ImmutableList> $$2, Supplier>> $$3) { this.codec = $$3; for(MemoryModuleType $$4 : $$0) { @@ -104,7 +104,7 @@ } } - for(Brain.MemoryValue $$8 : $$2) { + for(MemoryValue $$8 : $$2) { $$8.setMemoryInternal(this); } @@ -114,7 +114,7 @@ return ((Codec)this.codec.get()).encodeStart($$0, this); } - Stream> memories() { + Stream> memories() { return this.memories.entrySet().stream().map(($$0) -> Brain.MemoryValue.createUnchecked((MemoryModuleType)$$0.getKey(), (Optional)$$0.getValue())); } @@ -437,7 +437,7 @@ private final MemoryModuleType type; private final Optional> value; - static Brain.MemoryValue createUnchecked(MemoryModuleType $$0, Optional> $$1) { + static MemoryValue createUnchecked(MemoryModuleType $$0, Optional> $$1) { return new MemoryValue<>($$0, $$1); } diff -r -u3 -N a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java --- a/net/minecraft/world/entity/animal/Cat.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/animal/Cat.java 2022-05-25 22:50:14.000000000 -0700 @@ -106,7 +106,7 @@ $$0.put(9, new ResourceLocation("textures/entity/cat/jellie.png")); $$0.put(10, new ResourceLocation("textures/entity/cat/all_black.png")); }); - private Cat.CatAvoidEntityGoal avoidPlayersGoal; + private CatAvoidEntityGoal avoidPlayersGoal; @Nullable private TemptGoal temptGoal; private float lieDownAmount; diff -r -u3 -N a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java --- a/net/minecraft/world/entity/animal/Ocelot.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/animal/Ocelot.java 2022-05-25 22:50:14.000000000 -0700 @@ -56,7 +56,7 @@ private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON); private static final EntityDataAccessor DATA_TRUSTING = SynchedEntityData.defineId(Ocelot.class, EntityDataSerializers.BOOLEAN); @Nullable - private Ocelot.OcelotAvoidEntityGoal ocelotAvoidPlayersGoal; + private OcelotAvoidEntityGoal ocelotAvoidPlayersGoal; @Nullable private OcelotTemptGoal temptGoal; diff -r -u3 -N a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java --- a/net/minecraft/world/entity/EntityType.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/EntityType.java 2022-05-25 22:50:12.000000000 -0700 @@ -266,7 +266,7 @@ public static final EntityType ZOMBIFIED_PIGLIN = register("zombified_piglin", EntityType.Builder.of(ZombifiedPiglin::new, MobCategory.MONSTER).fireImmune().sized(0.6F, 1.95F).clientTrackingRange(8)); public static final EntityType PLAYER = register("player", EntityType.Builder.createNothing(MobCategory.MISC).noSave().noSummon().sized(0.6F, 1.8F).clientTrackingRange(32).updateInterval(2)); public static final EntityType FISHING_BOBBER = register("fishing_bobber", EntityType.Builder.of(FishingHook::new, MobCategory.MISC).noSave().noSummon().sized(0.25F, 0.25F).clientTrackingRange(4).updateInterval(5)); - private final EntityType.EntityFactory factory; + private final EntityFactory factory; private final MobCategory category; private final ImmutableSet immuneTo; private final boolean serialize; @@ -283,7 +283,7 @@ private ResourceLocation lootTable; private final EntityDimensions dimensions; - private static EntityType register(String $$0, EntityType.Builder $$1) { + private static EntityType register(String $$0, Builder $$1) { return Registry.register(Registry.ENTITY_TYPE, $$0, $$1.build($$0)); } @@ -295,7 +295,7 @@ return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse($$0)); } - public EntityType(EntityType.EntityFactory $$0, MobCategory $$1, boolean $$2, boolean $$3, boolean $$4, boolean $$5, ImmutableSet $$6, EntityDimensions $$7, int $$8, int $$9) { + public EntityType(EntityFactory $$0, MobCategory $$1, boolean $$2, boolean $$3, boolean $$4, boolean $$5, ImmutableSet $$6, EntityDimensions $$7, int $$8, int $$9) { this.factory = $$0; this.category = $$1; this.canSpawnFarFromPlayer = $$5; @@ -567,7 +567,7 @@ } public static class Builder { - private final EntityType.EntityFactory factory; + private final EntityFactory factory; private final MobCategory category; private ImmutableSet immuneTo = ImmutableSet.of(); private boolean serialize = true; @@ -578,56 +578,56 @@ private int updateInterval = 3; private EntityDimensions dimensions = EntityDimensions.scalable(0.6F, 1.8F); - private Builder(EntityType.EntityFactory $$0, MobCategory $$1) { + private Builder(EntityFactory $$0, MobCategory $$1) { this.factory = $$0; this.category = $$1; this.canSpawnFarFromPlayer = $$1 == MobCategory.CREATURE || $$1 == MobCategory.MISC; } - public static EntityType.Builder of(EntityType.EntityFactory $$0, MobCategory $$1) { + public static Builder of(EntityFactory $$0, MobCategory $$1) { return new Builder<>($$0, $$1); } - public static EntityType.Builder createNothing(MobCategory $$0) { + public static Builder createNothing(MobCategory $$0) { return new Builder<>(($$0x, $$1) -> (T)null, $$0); } - public EntityType.Builder sized(float $$0, float $$1) { + public Builder sized(float $$0, float $$1) { this.dimensions = EntityDimensions.scalable($$0, $$1); return this; } - public EntityType.Builder noSummon() { + public Builder noSummon() { this.summon = false; return this; } - public EntityType.Builder noSave() { + public Builder noSave() { this.serialize = false; return this; } - public EntityType.Builder fireImmune() { + public Builder fireImmune() { this.fireImmune = true; return this; } - public EntityType.Builder immuneTo(Block... $$0) { + public Builder immuneTo(Block... $$0) { this.immuneTo = ImmutableSet.copyOf($$0); return this; } - public EntityType.Builder canSpawnFarFromPlayer() { + public Builder canSpawnFarFromPlayer() { this.canSpawnFarFromPlayer = true; return this; } - public EntityType.Builder clientTrackingRange(int $$0) { + public Builder clientTrackingRange(int $$0) { this.clientTrackingRange = $$0; return this; } - public EntityType.Builder updateInterval(int $$0) { + public Builder updateInterval(int $$0) { this.updateInterval = $$0; return this; } diff -r -u3 -N a/net/minecraft/world/entity/SpawnPlacements.java b/net/minecraft/world/entity/SpawnPlacements.java --- a/net/minecraft/world/entity/SpawnPlacements.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/entity/SpawnPlacements.java 2022-05-25 22:50:12.000000000 -0700 @@ -41,7 +41,7 @@ public class SpawnPlacements { private static final Map, Data> DATA_BY_TYPE = Maps., Data>newHashMap(); - private static void register(EntityType $$0, Type $$1, Heightmap.Types $$2, SpawnPlacements.SpawnPredicate $$3) { + private static void register(EntityType $$0, Type $$1, Heightmap.Types $$2, SpawnPredicate $$3) { Data $$4 = (Data)DATA_BY_TYPE.put($$0, new Data($$2, $$1, $$3)); if ($$4 != null) { throw new IllegalStateException("Duplicate registration for type " + Registry.ENTITY_TYPE.getKey($$0)); @@ -139,9 +139,9 @@ static class Data { final Heightmap.Types heightMap; final Type placement; - final SpawnPlacements.SpawnPredicate predicate; + final SpawnPredicate predicate; - public Data(Heightmap.Types $$0, Type $$1, SpawnPlacements.SpawnPredicate $$2) { + public Data(Heightmap.Types $$0, Type $$1, SpawnPredicate $$2) { this.heightMap = $$0; this.placement = $$1; this.predicate = $$2; diff -r -u3 -N a/net/minecraft/world/inventory/MenuType.java b/net/minecraft/world/inventory/MenuType.java --- a/net/minecraft/world/inventory/MenuType.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/inventory/MenuType.java 2022-05-25 22:50:14.000000000 -0700 @@ -28,13 +28,13 @@ public static final MenuType SMOKER = register("smoker", SmokerMenu::new); public static final MenuType CARTOGRAPHY_TABLE = register("cartography_table", CartographyTableMenu::new); public static final MenuType STONECUTTER = register("stonecutter", StonecutterMenu::new); - private final MenuType.MenuSupplier constructor; + private final MenuSupplier constructor; - private static MenuType register(String $$0, MenuType.MenuSupplier $$1) { + private static MenuType register(String $$0, MenuSupplier $$1) { return Registry.register(Registry.MENU, $$0, new MenuType<>($$1)); } - private MenuType(MenuType.MenuSupplier $$0) { + private MenuType(MenuSupplier $$0) { this.constructor = $$0; } diff -r -u3 -N a/net/minecraft/world/item/alchemy/PotionBrewing.java b/net/minecraft/world/item/alchemy/PotionBrewing.java --- a/net/minecraft/world/item/alchemy/PotionBrewing.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/item/alchemy/PotionBrewing.java 2022-05-25 22:50:14.000000000 -0700 @@ -12,8 +12,8 @@ public class PotionBrewing { public static final int BREWING_TIME_SECONDS = 20; - private static final List> POTION_MIXES = Lists.>newArrayList(); - private static final List> CONTAINER_MIXES = Lists.>newArrayList(); + private static final List> POTION_MIXES = Lists.>newArrayList(); + private static final List> CONTAINER_MIXES = Lists.>newArrayList(); private static final List ALLOWED_CONTAINERS = Lists.newArrayList(); private static final Predicate ALLOWED_CONTAINER = ($$0) -> { for(Ingredient $$1 : ALLOWED_CONTAINERS) { @@ -78,7 +78,7 @@ int $$3 = 0; for(int $$4 = CONTAINER_MIXES.size(); $$3 < $$4; ++$$3) { - PotionBrewing.Mix $$5 = (Mix)CONTAINER_MIXES.get($$3); + Mix $$5 = (Mix)CONTAINER_MIXES.get($$3); if ($$5.from == $$2 && $$5.ingredient.test($$1)) { return true; } @@ -92,7 +92,7 @@ int $$3 = 0; for(int $$4 = POTION_MIXES.size(); $$3 < $$4; ++$$3) { - PotionBrewing.Mix $$5 = (Mix)POTION_MIXES.get($$3); + Mix $$5 = (Mix)POTION_MIXES.get($$3); if ($$5.from == $$2 && $$5.ingredient.test($$1)) { return true; } @@ -108,7 +108,7 @@ int $$4 = 0; for(int $$5 = CONTAINER_MIXES.size(); $$4 < $$5; ++$$4) { - PotionBrewing.Mix $$6 = (Mix)CONTAINER_MIXES.get($$4); + Mix $$6 = (Mix)CONTAINER_MIXES.get($$4); if ($$6.from == $$3 && $$6.ingredient.test($$0)) { return PotionUtils.setPotion(new ItemStack($$6.to), $$2); } @@ -117,7 +117,7 @@ $$4 = 0; for(int $$8 = POTION_MIXES.size(); $$4 < $$8; ++$$4) { - PotionBrewing.Mix $$9 = (Mix)POTION_MIXES.get($$4); + Mix $$9 = (Mix)POTION_MIXES.get($$4); if ($$9.from == $$2 && $$9.ingredient.test($$0)) { return PotionUtils.setPotion(new ItemStack($$3), $$9.to); } diff -r -u3 -N a/net/minecraft/world/item/crafting/Ingredient.java b/net/minecraft/world/item/crafting/Ingredient.java --- a/net/minecraft/world/item/crafting/Ingredient.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/item/crafting/Ingredient.java 2022-05-25 22:50:14.000000000 -0700 @@ -36,7 +36,7 @@ @Nullable private IntList stackingIds; - private Ingredient(Stream $$0) { + private Ingredient(Stream $$0) { this.values = (Value[])$$0.toArray(($$0x) -> new Value[$$0x]); } @@ -109,7 +109,7 @@ return this.values.length == 0 && (this.itemStacks == null || this.itemStacks.length == 0) && (this.stackingIds == null || this.stackingIds.isEmpty()); } - private static Ingredient fromValues(Stream $$0) { + private static Ingredient fromValues(Stream $$0) { Ingredient $$1 = new Ingredient($$0); return $$1.values.length == 0 ? EMPTY : $$1; } diff -r -u3 -N a/net/minecraft/world/item/crafting/SimpleCookingSerializer.java b/net/minecraft/world/item/crafting/SimpleCookingSerializer.java --- a/net/minecraft/world/item/crafting/SimpleCookingSerializer.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/item/crafting/SimpleCookingSerializer.java 2022-05-25 22:50:14.000000000 -0700 @@ -11,9 +11,9 @@ public class SimpleCookingSerializer implements RecipeSerializer { private final int defaultCookingTime; - private final SimpleCookingSerializer.CookieBaker factory; + private final CookieBaker factory; - public SimpleCookingSerializer(SimpleCookingSerializer.CookieBaker $$0, int $$1) { + public SimpleCookingSerializer(CookieBaker $$0, int $$1) { this.defaultCookingTime = $$1; this.factory = $$0; } diff -r -u3 -N a/net/minecraft/world/item/crafting/SingleItemRecipe.java b/net/minecraft/world/item/crafting/SingleItemRecipe.java --- a/net/minecraft/world/item/crafting/SingleItemRecipe.java 2022-05-24 17:47:14.000000000 -0700 +++ b/net/minecraft/world/item/crafting/SingleItemRecipe.java 2022-05-25 22:50:14.000000000 -0700 @@ -61,9 +61,9 @@ } public static class Serializer implements RecipeSerializer { - final SingleItemRecipe.Serializer.SingleItemMaker factory; + final SingleItemMaker factory; - protected Serializer(SingleItemRecipe.Serializer.SingleItemMaker $$0) { + protected Serializer(SingleItemMaker $$0) { this.factory = $$0; } diff -r -u3 -N a/net/minecraft/world/level/biome/Climate.java b/net/minecraft/world/level/biome/Climate.java --- a/net/minecraft/world/level/biome/Climate.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/biome/Climate.java 2022-05-25 22:50:14.000000000 -0700 @@ -57,7 +57,7 @@ } interface DistanceMetric { - long distance(Climate.RTree.Node var1, long[] var2); + long distance(RTree.Node var1, long[] var2); } public static record Parameter(long min, long max) { @@ -106,7 +106,7 @@ public static class ParameterList { private final List> values; - private final Climate.RTree index; + private final RTree index; public ParameterList(List> $$0) { this.values = $$0; @@ -144,7 +144,7 @@ return this.findValueIndex($$0, RTree.Node::distance); } - protected T findValueIndex(TargetPoint $$0, Climate.DistanceMetric $$1) { + protected T findValueIndex(TargetPoint $$0, DistanceMetric $$1) { return this.index.search($$0, $$1); } } @@ -163,14 +163,14 @@ protected static final class RTree { private static final int CHILDREN_PER_NODE = 10; - private final Climate.RTree.Node root; - private final ThreadLocal> lastResult = new ThreadLocal(); + private final Node root; + private final ThreadLocal> lastResult = new ThreadLocal(); - private RTree(Climate.RTree.Node $$0) { + private RTree(Node $$0) { this.root = $$0; } - public static Climate.RTree create(List> $$0) { + public static RTree create(List> $$0) { if ($$0.isEmpty()) { throw new IllegalArgumentException("Need at least one value to build the search tree."); } else { @@ -178,13 +178,13 @@ if ($$1 != 7) { throw new IllegalStateException("Expecting parameter space to be 7, got " + $$1); } else { - List> $$2 = (List)$$0.stream().map(($$0x) -> new Leaf<>((ParameterPoint)$$0x.getFirst(), $$0x.getSecond())).collect(Collectors.toCollection(ArrayList::new)); + List> $$2 = (List)$$0.stream().map(($$0x) -> new Leaf<>((ParameterPoint)$$0x.getFirst(), $$0x.getSecond())).collect(Collectors.toCollection(ArrayList::new)); return new RTree<>(build($$1, $$2)); } } } - private static Climate.RTree.Node build(int $$0, List> $$1) { + private static Node build(int $$0, List> $$1) { if ($$1.isEmpty()) { throw new IllegalStateException("Need at least one child to build a node"); } else if ($$1.size() == 1) { @@ -204,14 +204,14 @@ } else { long $$2 = Long.MAX_VALUE; int $$3 = -1; - List> $$4 = null; + List> $$4 = null; for(int $$5 = 0; $$5 < $$0; ++$$5) { sort($$1, $$0, $$5, false); - List> $$6 = bucketize($$1); + List> $$6 = bucketize($$1); long $$7 = 0L; - for(Climate.RTree.SubTree $$8 : $$6) { + for(SubTree $$8 : $$6) { $$7 += cost($$8.parameterSpace); } @@ -227,8 +227,8 @@ } } - private static void sort(List> $$0, int $$1, int $$2, boolean $$3) { - Comparator> $$4 = comparator($$2, $$3); + private static void sort(List> $$0, int $$1, int $$2, boolean $$3) { + Comparator> $$4 = comparator($$2, $$3); for(int $$5 = 1; $$5 < $$1; ++$$5) { $$4 = $$4.thenComparing(comparator(($$2 + $$5) % $$1, $$3)); @@ -237,7 +237,7 @@ $$0.sort($$4); } - private static Comparator> comparator(int $$0, boolean $$1) { + private static Comparator> comparator(int $$0, boolean $$1) { return Comparator.comparingLong(($$2) -> { Parameter $$3 = $$2.parameterSpace[$$0]; long $$4 = ($$3.min() + $$3.max()) / 2L; @@ -245,16 +245,16 @@ }); } - private static List> bucketize(List> $$0) { - List> $$1 = Lists.>newArrayList(); - List> $$2 = Lists.>newArrayList(); + private static List> bucketize(List> $$0) { + List> $$1 = Lists.>newArrayList(); + List> $$2 = Lists.>newArrayList(); int $$3 = (int)Math.pow(10.0D, Math.floor(Math.log((double)$$0.size() - 0.01D) / Math.log(10.0D))); - for(Climate.RTree.Node $$4 : $$0) { + for(Node $$4 : $$0) { $$2.add($$4); if ($$2.size() >= $$3) { $$1.add(new SubTree($$2)); - $$2 = Lists.>newArrayList(); + $$2 = Lists.>newArrayList(); } } @@ -275,7 +275,7 @@ return $$1; } - static List buildParameterSpace(List> $$0) { + static List buildParameterSpace(List> $$0) { if ($$0.isEmpty()) { throw new IllegalArgumentException("SubTree needs at least one child"); } else { @@ -286,7 +286,7 @@ $$2.add((Object)null); } - for(Climate.RTree.Node $$4 : $$0) { + for(Node $$4 : $$0) { for(int $$5 = 0; $$5 < 7; ++$$5) { $$2.set($$5, $$4.parameterSpace[$$5].span((Parameter)$$2.get($$5))); } @@ -296,14 +296,14 @@ } } - public T search(TargetPoint $$0, Climate.DistanceMetric $$1) { + public T search(TargetPoint $$0, DistanceMetric $$1) { long[] $$2 = $$0.toParameterArray(); - Climate.RTree.Leaf $$3 = this.root.search($$2, (Leaf)this.lastResult.get(), $$1); + Leaf $$3 = this.root.search($$2, (Leaf)this.lastResult.get(), $$1); this.lastResult.set($$3); return $$3.value; } - static final class Leaf extends Climate.RTree.Node { + static final class Leaf extends Node { final T value; Leaf(ParameterPoint $$0, T $$1) { @@ -311,7 +311,7 @@ this.value = $$1; } - protected Climate.RTree.Leaf search(long[] $$0, @Nullable Climate.RTree.Leaf $$1, Climate.DistanceMetric $$2) { + protected Leaf search(long[] $$0, @Nullable Leaf $$1, DistanceMetric $$2) { return this; } } @@ -323,7 +323,7 @@ this.parameterSpace = (Parameter[])$$0.toArray(new Parameter[0]); } - protected abstract Climate.RTree.Leaf search(long[] var1, @Nullable Climate.RTree.Leaf var2, Climate.DistanceMetric var3); + protected abstract Leaf search(long[] var1, @Nullable Leaf var2, DistanceMetric var3); protected long distance(long[] $$0) { long $$1 = 0L; @@ -340,26 +340,26 @@ } } - static final class SubTree extends Climate.RTree.Node { - final Climate.RTree.Node[] children; + static final class SubTree extends Node { + final Node[] children; - protected SubTree(List> $$0) { + protected SubTree(List> $$0) { this(Climate.RTree.buildParameterSpace($$0), $$0); } - protected SubTree(List $$0, List> $$1) { + protected SubTree(List $$0, List> $$1) { super($$0); this.children = (Node[])$$1.toArray(new Node[0]); } - protected Climate.RTree.Leaf search(long[] $$0, @Nullable Climate.RTree.Leaf $$1, Climate.DistanceMetric $$2) { + protected Leaf search(long[] $$0, @Nullable Leaf $$1, DistanceMetric $$2) { long $$3 = $$1 == null ? Long.MAX_VALUE : $$2.distance($$1, $$0); - Climate.RTree.Leaf $$4 = $$1; + Leaf $$4 = $$1; - for(Climate.RTree.Node $$5 : this.children) { + for(Node $$5 : this.children) { long $$6 = $$2.distance($$5, $$0); if ($$3 > $$6) { - Climate.RTree.Leaf $$7 = $$5.search($$0, $$4, $$2); + Leaf $$7 = $$5.search($$0, $$4, $$2); long $$8 = $$5 == $$7 ? $$6 : $$2.distance($$7, $$0); if ($$3 > $$8) { $$3 = $$8; diff -r -u3 -N a/net/minecraft/world/level/block/DoubleBlockCombiner.java b/net/minecraft/world/level/block/DoubleBlockCombiner.java --- a/net/minecraft/world/level/block/DoubleBlockCombiner.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/block/DoubleBlockCombiner.java 2022-05-25 22:50:14.000000000 -0700 @@ -11,7 +11,7 @@ import net.minecraft.world.level.block.state.properties.DirectionProperty; public class DoubleBlockCombiner { - public static DoubleBlockCombiner.NeighborCombineResult combineWithNeigbour(BlockEntityType $$0, Function $$1, Function $$2, DirectionProperty $$3, BlockState $$4, LevelAccessor $$5, BlockPos $$6, BiPredicate $$7) { + public static NeighborCombineResult combineWithNeigbour(BlockEntityType $$0, Function $$1, Function $$2, DirectionProperty $$3, BlockState $$4, LevelAccessor $$5, BlockPos $$6, BiPredicate $$7) { S $$8 = $$0.getBlockEntity($$5, $$6); if ($$8 == null) { return Combiner::acceptNone; @@ -62,9 +62,9 @@ } public interface NeighborCombineResult { - T apply(DoubleBlockCombiner.Combiner var1); + T apply(Combiner var1); - public static final class Double implements DoubleBlockCombiner.NeighborCombineResult { + public static final class Double implements NeighborCombineResult { private final S first; private final S second; @@ -73,19 +73,19 @@ this.second = $$1; } - public T apply(DoubleBlockCombiner.Combiner $$0) { + public T apply(Combiner $$0) { return $$0.acceptDouble(this.first, this.second); } } - public static final class Single implements DoubleBlockCombiner.NeighborCombineResult { + public static final class Single implements NeighborCombineResult { private final S single; public Single(S $$0) { this.single = $$0; } - public T apply(DoubleBlockCombiner.Combiner $$0) { + public T apply(Combiner $$0) { return $$0.acceptSingle(this.single); } } diff -r -u3 -N a/net/minecraft/world/level/block/entity/BlockEntityType.java b/net/minecraft/world/level/block/entity/BlockEntityType.java --- a/net/minecraft/world/level/block/entity/BlockEntityType.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/block/entity/BlockEntityType.java 2022-05-25 22:50:14.000000000 -0700 @@ -53,7 +53,7 @@ public static final BlockEntityType CAMPFIRE = register("campfire", BlockEntityType.Builder.of(CampfireBlockEntity::new, Blocks.CAMPFIRE, Blocks.SOUL_CAMPFIRE)); public static final BlockEntityType BEEHIVE = register("beehive", BlockEntityType.Builder.of(BeehiveBlockEntity::new, Blocks.BEE_NEST, Blocks.BEEHIVE)); public static final BlockEntityType SCULK_SENSOR = register("sculk_sensor", BlockEntityType.Builder.of(SculkSensorBlockEntity::new, Blocks.SCULK_SENSOR)); - private final BlockEntityType.BlockEntitySupplier factory; + private final BlockEntitySupplier factory; private final Set validBlocks; private final Type dataType; @@ -62,7 +62,7 @@ return Registry.BLOCK_ENTITY_TYPE.getKey($$0); } - private static BlockEntityType register(String $$0, BlockEntityType.Builder $$1) { + private static BlockEntityType register(String $$0, Builder $$1) { if ($$1.validBlocks.isEmpty()) { LOGGER.warn("Block entity type {} requires at least one valid block to be defined!", $$0); } @@ -71,7 +71,7 @@ return Registry.register(Registry.BLOCK_ENTITY_TYPE, $$0, $$1.build($$2)); } - public BlockEntityType(BlockEntityType.BlockEntitySupplier $$0, Set $$1, Type $$2) { + public BlockEntityType(BlockEntitySupplier $$0, Set $$1, Type $$2) { this.factory = $$0; this.validBlocks = $$1; this.dataType = $$2; @@ -98,15 +98,15 @@ } public static final class Builder { - private final BlockEntityType.BlockEntitySupplier factory; + private final BlockEntitySupplier factory; final Set validBlocks; - private Builder(BlockEntityType.BlockEntitySupplier $$0, Set $$1) { + private Builder(BlockEntitySupplier $$0, Set $$1) { this.factory = $$0; this.validBlocks = $$1; } - public static BlockEntityType.Builder of(BlockEntityType.BlockEntitySupplier $$0, Block... $$1) { + public static Builder of(BlockEntitySupplier $$0, Block... $$1) { return new Builder<>($$0, ImmutableSet.copyOf($$1)); } diff -r -u3 -N a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java --- a/net/minecraft/world/level/block/state/BlockBehaviour.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java 2022-05-25 22:50:14.000000000 -0700 @@ -869,7 +869,7 @@ ResourceLocation drops; boolean canOcclude = true; boolean isAir; - BlockBehaviour.StateArgumentPredicate> isValidSpawn = ($$0x, $$1x, $$2, $$3) -> $$0x.isFaceSturdy($$1x, $$2, Direction.UP) && $$0x.getLightEmission() < 14; + StateArgumentPredicate> isValidSpawn = ($$0x, $$1x, $$2, $$3) -> $$0x.isFaceSturdy($$1x, $$2, Direction.UP) && $$0x.getLightEmission() < 14; StatePredicate isRedstoneConductor = ($$0x, $$1x, $$2) -> $$0x.getMaterial().isSolidBlocking() && $$0x.isCollisionShapeFullBlock($$1x, $$2); StatePredicate isSuffocating = ($$0x, $$1x, $$2) -> this.material.blocksMotion() && $$0x.isCollisionShapeFullBlock($$1x, $$2); StatePredicate isViewBlocking = this.isSuffocating; @@ -995,7 +995,7 @@ return this; } - public Properties isValidSpawn(BlockBehaviour.StateArgumentPredicate> $$0) { + public Properties isValidSpawn(StateArgumentPredicate> $$0) { this.isValidSpawn = $$0; return this; } diff -r -u3 -N a/net/minecraft/world/level/block/state/properties/Property.java b/net/minecraft/world/level/block/state/properties/Property.java --- a/net/minecraft/world/level/block/state/properties/Property.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/block/state/properties/Property.java 2022-05-25 22:50:14.000000000 -0700 @@ -16,22 +16,22 @@ @Nullable private Integer hashCode; private final Codec codec = Codec.STRING.comapFlatMap(($$0x) -> (DataResult)this.getValue($$0x).map(DataResult::success).orElseGet(() -> DataResult.error("Unable to read property: " + this + " with value: " + $$0x)), this::getName); - private final Codec> valueCodec = this.codec.xmap(this::value, Value::value); + private final Codec> valueCodec = this.codec.xmap(this::value, Value::value); protected Property(String $$0, Class $$1) { this.clazz = $$1; this.name = $$0; } - public Property.Value value(T $$0) { + public Value value(T $$0) { return new Value<>(this, $$0); } - public Property.Value value(StateHolder $$0) { + public Value value(StateHolder $$0) { return new Value<>(this, $$0.getValue(this)); } - public Stream> getAllValues() { + public Stream> getAllValues() { return this.getPossibleValues().stream().map(this::value); } @@ -39,7 +39,7 @@ return this.codec; } - public Codec> valueCodec() { + public Codec> valueCodec() { return this.valueCodec; } diff -r -u3 -N a/net/minecraft/world/level/block/state/StateDefinition.java b/net/minecraft/world/level/block/state/StateDefinition.java --- a/net/minecraft/world/level/block/state/StateDefinition.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/block/state/StateDefinition.java 2022-05-25 22:50:14.000000000 -0700 @@ -30,7 +30,7 @@ private final ImmutableSortedMap> propertiesByName; private final ImmutableList states; - protected StateDefinition(Function $$0, O $$1, StateDefinition.Factory $$2, Map> $$3) { + protected StateDefinition(Function $$0, O $$1, Factory $$2, Map> $$3) { this.owner = $$1; this.propertiesByName = ImmutableSortedMap.copyOf($$3); Supplier $$4 = () -> (StateHolder)$$0.apply($$1); @@ -105,7 +105,7 @@ this.owner = $$0; } - public StateDefinition.Builder add(Property... $$0) { + public Builder add(Property... $$0) { for(Property $$1 : $$0) { this.validateProperty($$1); this.properties.put($$1.getName(), $$1); @@ -137,7 +137,7 @@ } } - public StateDefinition create(Function $$0, StateDefinition.Factory $$1) { + public StateDefinition create(Function $$0, Factory $$1) { return new StateDefinition<>($$0, this.owner, $$1, this.properties); } } diff -r -u3 -N a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java --- a/net/minecraft/world/level/chunk/PalettedContainer.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/chunk/PalettedContainer.java 2022-05-25 22:50:14.000000000 -0700 @@ -27,7 +27,7 @@ private static final int MIN_PALETTE_BITS = 0; private final PaletteResize dummyPaletteResize = ($$0x, $$1x) -> 0; private final IdMap registry; - private volatile PalettedContainer.Data data; + private volatile Data data; private final Strategy strategy; private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer"); @@ -43,13 +43,13 @@ return RecordCodecBuilder.create(($$2x) -> $$2x.group($$1.mapResult(ExtraCodecs.orElsePartial($$3)).listOf().fieldOf("palette").forGetter(DiscData::paletteEntries), Codec.LONG_STREAM.optionalFieldOf("data").forGetter(DiscData::storage)).apply($$2x, DiscData::new)).comapFlatMap(($$2x) -> read($$0, $$2, $$2x), ($$2x) -> $$2x.write($$0, $$2)); } - public PalettedContainer(IdMap $$0, Strategy $$1, PalettedContainer.Configuration $$2, BitStorage $$3, List $$4) { + public PalettedContainer(IdMap $$0, Strategy $$1, Configuration $$2, BitStorage $$3, List $$4) { this.registry = $$0; this.strategy = $$1; this.data = new Data<>($$2, $$3, $$2.factory().create($$2.bits(), $$0, this, $$4)); } - private PalettedContainer(IdMap $$0, Strategy $$1, PalettedContainer.Data $$2) { + private PalettedContainer(IdMap $$0, Strategy $$1, Data $$2) { this.registry = $$0; this.strategy = $$1; this.data = $$2; @@ -58,18 +58,18 @@ public PalettedContainer(IdMap $$0, T $$1, Strategy $$2) { this.strategy = $$2; this.registry = $$0; - this.data = this.createOrReuseData((PalettedContainer.Data)null, 0); + this.data = this.createOrReuseData((Data)null, 0); this.data.palette.idFor($$1); } - private PalettedContainer.Data createOrReuseData(@Nullable PalettedContainer.Data $$0, int $$1) { - PalettedContainer.Configuration $$2 = this.strategy.getConfiguration(this.registry, $$1); + private Data createOrReuseData(@Nullable Data $$0, int $$1) { + Configuration $$2 = this.strategy.getConfiguration(this.registry, $$1); return $$0 != null && $$2.equals($$0.configuration()) ? $$0 : $$2.createData(this.registry, this, this.strategy.size()); } public int onResize(int $$0, T $$1) { - PalettedContainer.Data $$2 = this.data; - PalettedContainer.Data $$3 = this.createOrReuseData($$2, $$0); + Data $$2 = this.data; + Data $$3 = this.createOrReuseData($$2, $$0); $$3.copyFrom($$2.palette, $$2.storage); this.data = $$3; return $$3.palette.idFor($$1); @@ -119,7 +119,7 @@ } protected T get(int $$0) { - PalettedContainer.Data $$1 = this.data; + Data $$1 = this.data; return $$1.palette.valueFor($$1.storage.get($$0)); } @@ -135,7 +135,7 @@ try { int $$1 = $$0.readByte(); - PalettedContainer.Data $$2 = this.createOrReuseData(this.data, $$1); + Data $$2 = this.createOrReuseData(this.data, $$1); $$2.palette.read($$0); $$0.readLongArray($$2.storage.getRaw()); this.data = $$2; @@ -156,11 +156,11 @@ } - private static DataResult> read(IdMap $$0, Strategy $$1, PalettedContainer.DiscData $$2) { + private static DataResult> read(IdMap $$0, Strategy $$1, DiscData $$2) { List $$3 = $$2.paletteEntries(); int $$4 = $$1.size(); int $$5 = $$1.calculateBitsForSerialization($$0, $$3.size()); - PalettedContainer.Configuration $$6 = $$1.getConfiguration($$0, $$5); + Configuration $$6 = $$1.getConfiguration($$0, $$5); BitStorage $$7; if ($$5 == 0) { $$7 = new ZeroBitStorage($$4); @@ -191,7 +191,7 @@ return DataResult.success(new PalettedContainer<>($$0, $$1, $$6, $$7, $$3)); } - private PalettedContainer.DiscData write(IdMap $$0, Strategy $$1) { + private DiscData write(IdMap $$0, Strategy $$1) { this.acquire(); DiscData var12; @@ -246,7 +246,7 @@ return new PalettedContainer<>(this.registry, this.strategy, new Data<>(this.data.configuration(), this.data.storage().copy(), this.data.palette().copy())); } - public void count(PalettedContainer.CountConsumer $$0) { + public void count(CountConsumer $$0) { if (this.data.palette.getSize() == 1) { $$0.accept(this.data.palette.valueFor(0), this.data.storage.getSize()); } else { @@ -257,7 +257,7 @@ } static record Configuration(Palette.Factory factory, int bits) { - public PalettedContainer.Data createData(IdMap $$0, PaletteResize $$1, int $$2) { + public Data createData(IdMap $$0, PaletteResize $$1, int $$2) { BitStorage $$3 = (BitStorage)(this.bits == 0 ? new ZeroBitStorage($$2) : new SimpleBitStorage(this.bits, $$2)); Palette $$4 = this.factory.create(this.bits, $$0, $$1, List.of()); return new Data<>(this, $$3, $$4); @@ -269,7 +269,7 @@ void accept(T var1, int var2); } - static record Data(PalettedContainer.Configuration configuration, BitStorage storage, Palette palette) { + static record Data(Configuration configuration, BitStorage storage, Palette palette) { public void copyFrom(Palette $$0, BitStorage $$1) { for(int $$2 = 0; $$2 < $$1.getSize(); ++$$2) { T $$3 = $$0.valueFor($$1.get($$2)); @@ -298,7 +298,7 @@ public static final Palette.Factory HASHMAP_PALETTE_FACTORY = HashMapPalette::create; static final Palette.Factory GLOBAL_PALETTE_FACTORY = GlobalPalette::create; public static final Strategy SECTION_STATES = new Strategy(4) { - public PalettedContainer.Configuration getConfiguration(IdMap $$0, int $$1) { + public Configuration getConfiguration(IdMap $$0, int $$1) { Configuration var10000; switch ($$1) { case 0: @@ -324,7 +324,7 @@ } }; public static final Strategy SECTION_BIOMES = new Strategy(2) { - public PalettedContainer.Configuration getConfiguration(IdMap $$0, int $$1) { + public Configuration getConfiguration(IdMap $$0, int $$1) { Configuration var10000; switch ($$1) { case 0: @@ -356,11 +356,11 @@ return ($$1 << this.sizeBits | $$2) << this.sizeBits | $$0; } - public abstract PalettedContainer.Configuration getConfiguration(IdMap var1, int var2); + public abstract Configuration getConfiguration(IdMap var1, int var2); int calculateBitsForSerialization(IdMap $$0, int $$1) { int $$2 = Mth.ceillog2($$1); - PalettedContainer.Configuration $$3 = this.getConfiguration($$0, $$2); + Configuration $$3 = this.getConfiguration($$0, $$2); return $$3.factory() == GLOBAL_PALETTE_FACTORY ? $$2 : $$3.bits(); } } diff -r -u3 -N a/net/minecraft/world/level/chunk/storage/RegionFileVersion.java b/net/minecraft/world/level/chunk/storage/RegionFileVersion.java --- a/net/minecraft/world/level/chunk/storage/RegionFileVersion.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/chunk/storage/RegionFileVersion.java 2022-05-25 22:50:14.000000000 -0700 @@ -19,10 +19,10 @@ public static final RegionFileVersion VERSION_DEFLATE = register(new RegionFileVersion(2, ($$0) -> new FastBufferedInputStream(new InflaterInputStream($$0)), ($$0) -> new BufferedOutputStream(new DeflaterOutputStream($$0)))); public static final RegionFileVersion VERSION_NONE = register(new RegionFileVersion(3, ($$0) -> $$0, ($$0) -> $$0)); private final int id; - private final RegionFileVersion.StreamWrapper inputWrapper; - private final RegionFileVersion.StreamWrapper outputWrapper; + private final StreamWrapper inputWrapper; + private final StreamWrapper outputWrapper; - private RegionFileVersion(int $$0, RegionFileVersion.StreamWrapper $$1, RegionFileVersion.StreamWrapper $$2) { + private RegionFileVersion(int $$0, StreamWrapper $$1, StreamWrapper $$2) { this.id = $$0; this.inputWrapper = $$1; this.outputWrapper = $$2; diff -r -u3 -N a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java --- a/net/minecraft/world/level/GameRules.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/GameRules.java 2022-05-25 22:50:14.000000000 -0700 @@ -27,22 +27,22 @@ public class GameRules { public static final int DEFAULT_RANDOM_TICK_SPEED = 3; static final Logger LOGGER = LogUtils.getLogger(); - private static final Map, GameRules.Type> GAME_RULE_TYPES = Maps.newTreeMap(Comparator.comparing(($$0) -> $$0.id)); - public static final GameRules.Key RULE_DOFIRETICK = register("doFireTick", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_MOBGRIEFING = register("mobGriefing", GameRules.Category.MOBS, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_KEEPINVENTORY = register("keepInventory", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); - public static final GameRules.Key RULE_DOMOBSPAWNING = register("doMobSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DOMOBLOOT = register("doMobLoot", GameRules.Category.DROPS, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DOBLOCKDROPS = register("doTileDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DOENTITYDROPS = register("doEntityDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_COMMANDBLOCKOUTPUT = register("commandBlockOutput", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_NATURAL_REGENERATION = register("naturalRegeneration", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DAYLIGHT = register("doDaylightCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_LOGADMINCOMMANDS = register("logAdminCommands", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_SHOWDEATHMESSAGES = register("showDeathMessages", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_RANDOMTICKING = register("randomTickSpeed", GameRules.Category.UPDATES, GameRules.IntegerValue.create(3)); - public static final GameRules.Key RULE_SENDCOMMANDFEEDBACK = register("sendCommandFeedback", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_REDUCEDDEBUGINFO = register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, ($$0, $$1) -> { + private static final Map, Type> GAME_RULE_TYPES = Maps.newTreeMap(Comparator.comparing(($$0) -> $$0.id)); + public static final Key RULE_DOFIRETICK = register("doFireTick", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); + public static final Key RULE_MOBGRIEFING = register("mobGriefing", GameRules.Category.MOBS, GameRules.BooleanValue.create(true)); + public static final Key RULE_KEEPINVENTORY = register("keepInventory", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); + public static final Key RULE_DOMOBSPAWNING = register("doMobSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); + public static final Key RULE_DOMOBLOOT = register("doMobLoot", GameRules.Category.DROPS, GameRules.BooleanValue.create(true)); + public static final Key RULE_DOBLOCKDROPS = register("doTileDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true)); + public static final Key RULE_DOENTITYDROPS = register("doEntityDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true)); + public static final Key RULE_COMMANDBLOCKOUTPUT = register("commandBlockOutput", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final Key RULE_NATURAL_REGENERATION = register("naturalRegeneration", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + public static final Key RULE_DAYLIGHT = register("doDaylightCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); + public static final Key RULE_LOGADMINCOMMANDS = register("logAdminCommands", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final Key RULE_SHOWDEATHMESSAGES = register("showDeathMessages", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final Key RULE_RANDOMTICKING = register("randomTickSpeed", GameRules.Category.UPDATES, GameRules.IntegerValue.create(3)); + public static final Key RULE_SENDCOMMANDFEEDBACK = register("sendCommandFeedback", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final Key RULE_REDUCEDDEBUGINFO = register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, ($$0, $$1) -> { byte $$2 = (byte)($$1.get() ? 22 : 23); for(ServerPlayer $$3 : $$0.getPlayerList().getPlayers()) { @@ -50,36 +50,36 @@ } })); - public static final GameRules.Key RULE_SPECTATORSGENERATECHUNKS = register("spectatorsGenerateChunks", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_SPAWN_RADIUS = register("spawnRadius", GameRules.Category.PLAYER, GameRules.IntegerValue.create(10)); - public static final GameRules.Key RULE_DISABLE_ELYTRA_MOVEMENT_CHECK = register("disableElytraMovementCheck", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); - public static final GameRules.Key RULE_MAX_ENTITY_CRAMMING = register("maxEntityCramming", GameRules.Category.MOBS, GameRules.IntegerValue.create(24)); - public static final GameRules.Key RULE_WEATHER_CYCLE = register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); - public static final GameRules.Key RULE_MAX_COMMAND_CHAIN_LENGTH = register("maxCommandChainLength", GameRules.Category.MISC, GameRules.IntegerValue.create(65536)); - public static final GameRules.Key RULE_ANNOUNCE_ADVANCEMENTS = register("announceAdvancements", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DISABLE_RAIDS = register("disableRaids", GameRules.Category.MOBS, GameRules.BooleanValue.create(false)); - public static final GameRules.Key RULE_DOINSOMNIA = register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DO_IMMEDIATE_RESPAWN = register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, ($$0, $$1) -> { + public static final Key RULE_SPECTATORSGENERATECHUNKS = register("spectatorsGenerateChunks", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + public static final Key RULE_SPAWN_RADIUS = register("spawnRadius", GameRules.Category.PLAYER, GameRules.IntegerValue.create(10)); + public static final Key RULE_DISABLE_ELYTRA_MOVEMENT_CHECK = register("disableElytraMovementCheck", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); + public static final Key RULE_MAX_ENTITY_CRAMMING = register("maxEntityCramming", GameRules.Category.MOBS, GameRules.IntegerValue.create(24)); + public static final Key RULE_WEATHER_CYCLE = register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); + public static final Key RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false)); + public static final Key RULE_MAX_COMMAND_CHAIN_LENGTH = register("maxCommandChainLength", GameRules.Category.MISC, GameRules.IntegerValue.create(65536)); + public static final Key RULE_ANNOUNCE_ADVANCEMENTS = register("announceAdvancements", GameRules.Category.CHAT, GameRules.BooleanValue.create(true)); + public static final Key RULE_DISABLE_RAIDS = register("disableRaids", GameRules.Category.MOBS, GameRules.BooleanValue.create(false)); + public static final Key RULE_DOINSOMNIA = register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); + public static final Key RULE_DO_IMMEDIATE_RESPAWN = register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, ($$0, $$1) -> { for(ServerPlayer $$2 : $$0.getPlayerList().getPlayers()) { $$2.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.IMMEDIATE_RESPAWN, $$1.get() ? 1.0F : 0.0F)); } })); - public static final GameRules.Key RULE_DROWNING_DAMAGE = register("drowningDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_FALL_DAMAGE = register("fallDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_FIRE_DAMAGE = register("fireDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_FREEZE_DAMAGE = register("freezeDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DO_PATROL_SPAWNING = register("doPatrolSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DO_TRADER_SPAWNING = register("doTraderSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_FORGIVE_DEAD_PLAYERS = register("forgiveDeadPlayers", GameRules.Category.MOBS, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_UNIVERSAL_ANGER = register("universalAnger", GameRules.Category.MOBS, GameRules.BooleanValue.create(false)); - public static final GameRules.Key RULE_PLAYERS_SLEEPING_PERCENTAGE = register("playersSleepingPercentage", GameRules.Category.PLAYER, GameRules.IntegerValue.create(100)); - private final Map, GameRules.Value> rules; - - private static > GameRules.Key register(String $$0, Category $$1, GameRules.Type $$2) { - GameRules.Key $$3 = new Key<>($$0, $$1); - GameRules.Type $$4 = (Type)GAME_RULE_TYPES.put($$3, $$2); + public static final Key RULE_DROWNING_DAMAGE = register("drowningDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + public static final Key RULE_FALL_DAMAGE = register("fallDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + public static final Key RULE_FIRE_DAMAGE = register("fireDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + public static final Key RULE_FREEZE_DAMAGE = register("freezeDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true)); + public static final Key RULE_DO_PATROL_SPAWNING = register("doPatrolSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); + public static final Key RULE_DO_TRADER_SPAWNING = register("doTraderSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); + public static final Key RULE_FORGIVE_DEAD_PLAYERS = register("forgiveDeadPlayers", GameRules.Category.MOBS, GameRules.BooleanValue.create(true)); + public static final Key RULE_UNIVERSAL_ANGER = register("universalAnger", GameRules.Category.MOBS, GameRules.BooleanValue.create(false)); + public static final Key RULE_PLAYERS_SLEEPING_PERCENTAGE = register("playersSleepingPercentage", GameRules.Category.PLAYER, GameRules.IntegerValue.create(100)); + private final Map, Value> rules; + + private static > Key register(String $$0, Category $$1, Type $$2) { + Key $$3 = new Key<>($$0, $$1); + Type $$4 = (Type)GAME_RULE_TYPES.put($$3, $$2); if ($$4 != null) { throw new IllegalStateException("Duplicate game rule registration for " + $$0); } else { @@ -96,11 +96,11 @@ this.rules = (Map)GAME_RULE_TYPES.entrySet().stream().collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, ($$0) -> ((Type)$$0.getValue()).createRule())); } - private GameRules(Map, GameRules.Value> $$0) { + private GameRules(Map, Value> $$0) { this.rules = $$0; } - public > T getRule(GameRules.Key $$0) { + public > T getRule(Key $$0) { return (T)(this.rules.get($$0)); } @@ -122,7 +122,7 @@ GAME_RULE_TYPES.forEach(($$1, $$2) -> callVisitorCap($$0, $$1, $$2)); } - private static > void callVisitorCap(GameRuleTypeVisitor $$0, GameRules.Key $$1, GameRules.Type $$2) { + private static > void callVisitorCap(GameRuleTypeVisitor $$0, Key $$1, Type $$2) { $$0.visit($$1, $$2); $$2.callVisitor($$0, $$1); } @@ -131,32 +131,32 @@ $$0.rules.keySet().forEach(($$2) -> this.assignCap($$2, $$0, $$1)); } - private > void assignCap(GameRules.Key $$0, GameRules $$1, @Nullable MinecraftServer $$2) { + private > void assignCap(Key $$0, GameRules $$1, @Nullable MinecraftServer $$2) { T $$3 = $$1.getRule($$0); this.getRule($$0).setFrom($$3, $$2); } - public boolean getBoolean(GameRules.Key $$0) { + public boolean getBoolean(Key $$0) { return this.getRule($$0).get(); } - public int getInt(GameRules.Key $$0) { + public int getInt(Key $$0) { return this.getRule($$0).get(); } - public static class BooleanValue extends GameRules.Value { + public static class BooleanValue extends Value { private boolean value; - static GameRules.Type create(boolean $$0, BiConsumer $$1) { + static Type create(boolean $$0, BiConsumer $$1) { return new Type<>(BoolArgumentType::bool, ($$1x) -> new BooleanValue($$1x, $$0), $$1, GameRuleTypeVisitor::visitBoolean); } - static GameRules.Type create(boolean $$0) { + static Type create(boolean $$0) { return create($$0, ($$0x, $$1) -> { }); } - public BooleanValue(GameRules.Type $$0, boolean $$1) { + public BooleanValue(Type $$0, boolean $$1) { super($$0); this.value = $$1; } @@ -221,29 +221,29 @@ } public interface GameRuleTypeVisitor { - default > void visit(GameRules.Key $$0, GameRules.Type $$1) { + default > void visit(Key $$0, Type $$1) { } - default void visitBoolean(GameRules.Key $$0, GameRules.Type $$1) { + default void visitBoolean(Key $$0, Type $$1) { } - default void visitInteger(GameRules.Key $$0, GameRules.Type $$1) { + default void visitInteger(Key $$0, Type $$1) { } } - public static class IntegerValue extends GameRules.Value { + public static class IntegerValue extends Value { private int value; - private static GameRules.Type create(int $$0, BiConsumer $$1) { + private static Type create(int $$0, BiConsumer $$1) { return new Type<>(IntegerArgumentType::integer, ($$1x) -> new IntegerValue($$1x, $$0), $$1, GameRuleTypeVisitor::visitInteger); } - static GameRules.Type create(int $$0) { + static Type create(int $$0) { return create($$0, ($$0x, $$1) -> { }); } - public IntegerValue(GameRules.Type $$0, int $$1) { + public IntegerValue(Type $$0, int $$1) { super($$0); this.value = $$1; } @@ -308,7 +308,7 @@ } } - public static final class Key> { + public static final class Key> { final String id; private final Category category; @@ -346,13 +346,13 @@ } } - public static class Type> { + public static class Type> { private final Supplier> argument; - private final Function, T> constructor; + private final Function, T> constructor; final BiConsumer callback; - private final GameRules.VisitorCaller visitorCaller; + private final VisitorCaller visitorCaller; - Type(Supplier> $$0, Function, T> $$1, BiConsumer $$2, GameRules.VisitorCaller $$3) { + Type(Supplier> $$0, Function, T> $$1, BiConsumer $$2, VisitorCaller $$3) { this.argument = $$0; this.constructor = $$1; this.callback = $$2; @@ -367,15 +367,15 @@ return (T)(this.constructor.apply(this)); } - public void callVisitor(GameRuleTypeVisitor $$0, GameRules.Key $$1) { + public void callVisitor(GameRuleTypeVisitor $$0, Key $$1) { this.visitorCaller.call($$0, $$1, this); } } - public abstract static class Value> { - protected final GameRules.Type type; + public abstract static class Value> { + protected final Type type; - public Value(GameRules.Type $$0) { + public Value(Type $$0) { this.type = $$0; } @@ -410,7 +410,7 @@ public abstract void setFrom(T var1, @Nullable MinecraftServer var2); } - interface VisitorCaller> { - void call(GameRuleTypeVisitor var1, GameRules.Key var2, GameRules.Type var3); + interface VisitorCaller> { + void call(GameRuleTypeVisitor var1, Key var2, Type var3); } } diff -r -u3 -N a/net/minecraft/world/level/levelgen/structure/NetherBridgePieces.java b/net/minecraft/world/level/levelgen/structure/NetherBridgePieces.java --- a/net/minecraft/world/level/levelgen/structure/NetherBridgePieces.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/levelgen/structure/NetherBridgePieces.java 2022-05-25 22:50:14.000000000 -0700 @@ -31,7 +31,7 @@ static final PieceWeight[] CASTLE_PIECE_WEIGHTS = new PieceWeight[]{new PieceWeight(CastleSmallCorridorPiece.class, 25, 0, true), new PieceWeight(CastleSmallCorridorCrossingPiece.class, 15, 5), new PieceWeight(CastleSmallCorridorRightTurnPiece.class, 5, 10), new PieceWeight(CastleSmallCorridorLeftTurnPiece.class, 5, 10), new PieceWeight(CastleCorridorStairsPiece.class, 10, 3, true), new PieceWeight(CastleCorridorTBalconyPiece.class, 7, 2), new PieceWeight(CastleStalkRoom.class, 5, 2)}; static NetherBridgePiece findAndCreateBridgePieceFactory(PieceWeight $$0, StructurePieceAccessor $$1, Random $$2, int $$3, int $$4, int $$5, Direction $$6, int $$7) { - Class $$8 = $$0.pieceClass; + Class $$8 = $$0.pieceClass; NetherBridgePiece $$9 = null; if ($$8 == BridgeStraight.class) { $$9 = NetherBridgePieces.BridgeStraight.createPiece($$1, $$2, $$3, $$4, $$5, $$6, $$7); @@ -1030,20 +1030,20 @@ } static class PieceWeight { - public final Class pieceClass; + public final Class pieceClass; public final int weight; public int placeCount; public final int maxPlaceCount; public final boolean allowInRow; - public PieceWeight(Class $$0, int $$1, int $$2, boolean $$3) { + public PieceWeight(Class $$0, int $$1, int $$2, boolean $$3) { this.pieceClass = $$0; this.weight = $$1; this.maxPlaceCount = $$2; this.allowInRow = $$3; } - public PieceWeight(Class $$0, int $$1, int $$2) { + public PieceWeight(Class $$0, int $$1, int $$2) { this($$0, $$1, $$2, false); } diff -r -u3 -N a/net/minecraft/world/level/levelgen/structure/pieces/PieceGenerator.java b/net/minecraft/world/level/levelgen/structure/pieces/PieceGenerator.java --- a/net/minecraft/world/level/levelgen/structure/pieces/PieceGenerator.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/levelgen/structure/pieces/PieceGenerator.java 2022-05-25 22:50:14.000000000 -0700 @@ -9,7 +9,7 @@ @FunctionalInterface public interface PieceGenerator { - void generatePieces(StructurePiecesBuilder var1, PieceGenerator.Context var2); + void generatePieces(StructurePiecesBuilder var1, Context var2); public static record Context(C config, ChunkGenerator chunkGenerator, StructureManager structureManager, ChunkPos chunkPos, LevelHeightAccessor heightAccessor, WorldgenRandom random, long seed) { } diff -r -u3 -N a/net/minecraft/world/level/levelgen/structure/pieces/PieceGeneratorSupplier.java b/net/minecraft/world/level/levelgen/structure/pieces/PieceGeneratorSupplier.java --- a/net/minecraft/world/level/levelgen/structure/pieces/PieceGeneratorSupplier.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/levelgen/structure/pieces/PieceGeneratorSupplier.java 2022-05-25 22:50:14.000000000 -0700 @@ -16,14 +16,14 @@ @FunctionalInterface public interface PieceGeneratorSupplier { - Optional> createGenerator(PieceGeneratorSupplier.Context var1); + Optional> createGenerator(Context var1); - static PieceGeneratorSupplier simple(Predicate> $$0, PieceGenerator $$1) { + static PieceGeneratorSupplier simple(Predicate> $$0, PieceGenerator $$1) { Optional> $$2 = Optional.of($$1); return ($$2x) -> $$0.test($$2x) ? $$2 : Optional.empty(); } - static Predicate> checkForBiomeOnTop(Heightmap.Types $$0) { + static Predicate> checkForBiomeOnTop(Heightmap.Types $$0) { return ($$1) -> $$1.validBiomeOnTop($$0); } diff -r -u3 -N a/net/minecraft/world/level/levelgen/structure/StrongholdPieces.java b/net/minecraft/world/level/levelgen/structure/StrongholdPieces.java --- a/net/minecraft/world/level/levelgen/structure/StrongholdPieces.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/levelgen/structure/StrongholdPieces.java 2022-05-25 22:50:14.000000000 -0700 @@ -49,7 +49,7 @@ } }}; private static List currentPieces; - static Class imposedPiece; + static Class imposedPiece; private static int totalWeight; static final SmoothStoneSelector SMOOTH_STONE_SELECTOR = new SmoothStoneSelector(); @@ -79,7 +79,7 @@ return $$0; } - private static StrongholdPiece findAndCreatePieceFactory(Class $$0, StructurePieceAccessor $$1, Random $$2, int $$3, int $$4, int $$5, @Nullable Direction $$6, int $$7) { + private static StrongholdPiece findAndCreatePieceFactory(Class $$0, StructurePieceAccessor $$1, Random $$2, int $$3, int $$4, int $$5, @Nullable Direction $$6, int $$7) { StrongholdPiece $$8 = null; if ($$0 == Straight.class) { $$8 = StrongholdPieces.Straight.createPiece($$1, $$2, $$3, $$4, $$5, $$6, $$7); @@ -573,12 +573,12 @@ } static class PieceWeight { - public final Class pieceClass; + public final Class pieceClass; public final int weight; public int placeCount; public final int maxPlaceCount; - public PieceWeight(Class $$0, int $$1, int $$2) { + public PieceWeight(Class $$0, int $$1, int $$2) { this.pieceClass = $$0; this.weight = $$1; this.maxPlaceCount = $$2; diff -r -u3 -N a/net/minecraft/world/level/levelgen/SurfaceRules.java b/net/minecraft/world/level/levelgen/SurfaceRules.java --- a/net/minecraft/world/level/levelgen/SurfaceRules.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/levelgen/SurfaceRules.java 2022-05-25 22:50:14.000000000 -0700 @@ -122,7 +122,7 @@ static final Codec CODEC = Codec.unit(INSTANCE); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -136,7 +136,7 @@ static final Codec CODEC = Codec.unit(INSTANCE); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -155,7 +155,7 @@ this.biomeNameTest = Set.copyOf($$0)::contains; } - public Codec codec() { + public Codec codec() { return CODEC; } @@ -200,7 +200,7 @@ this($$0, new StateRule($$0)); } - public Codec codec() { + public Codec codec() { return CODEC; } @@ -216,7 +216,7 @@ public interface ConditionSource extends Function { Codec CODEC = Registry.CONDITION.byNameCodec().dispatch(ConditionSource::codec, Function.identity()); - static Codec bootstrap(Registry> $$0) { + static Codec bootstrap(Registry> $$0) { Registry.register($$0, "biome", SurfaceRules.BiomeConditionSource.CODEC); Registry.register($$0, "noise_threshold", SurfaceRules.NoiseThresholdConditionSource.CODEC); Registry.register($$0, "vertical_gradient", SurfaceRules.VerticalGradientConditionSource.CODEC); @@ -230,7 +230,7 @@ return Registry.register($$0, "stone_depth", SurfaceRules.StoneDepthCheck.CODEC); } - Codec codec(); + Codec codec(); } protected static final class Context { @@ -385,7 +385,7 @@ static final Codec CODEC = Codec.unit(INSTANCE); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -448,7 +448,7 @@ static record NoiseThresholdConditionSource(ResourceKey noise, double minThreshold, double maxThreshold) implements ConditionSource { static final Codec CODEC = RecordCodecBuilder.create(($$0) -> $$0.group(ResourceKey.codec(Registry.NOISE_REGISTRY).fieldOf("noise").forGetter(NoiseThresholdConditionSource::noise), Codec.DOUBLE.fieldOf("min_threshold").forGetter(NoiseThresholdConditionSource::minThreshold), Codec.DOUBLE.fieldOf("max_threshold").forGetter(NoiseThresholdConditionSource::maxThreshold)).apply($$0, NoiseThresholdConditionSource::new)); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -479,7 +479,7 @@ static record NotConditionSource(ConditionSource target) implements ConditionSource { static final Codec CODEC = SurfaceRules.ConditionSource.CODEC.xmap(NotConditionSource::new, NotConditionSource::target).fieldOf("invert").codec(); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -491,14 +491,14 @@ public interface RuleSource extends Function { Codec CODEC = Registry.RULE.byNameCodec().dispatch(RuleSource::codec, Function.identity()); - static Codec bootstrap(Registry> $$0) { + static Codec bootstrap(Registry> $$0) { Registry.register($$0, "bandlands", SurfaceRules.Bandlands.CODEC); Registry.register($$0, "block", SurfaceRules.BlockRuleSource.CODEC); Registry.register($$0, "sequence", SurfaceRules.SequenceRuleSource.CODEC); return Registry.register($$0, "condition", SurfaceRules.TestRuleSource.CODEC); } - Codec codec(); + Codec codec(); } static record SequenceRule(List rules) implements SurfaceRule { @@ -518,7 +518,7 @@ static record SequenceRuleSource(List sequence) implements RuleSource { static final Codec CODEC = SurfaceRules.RuleSource.CODEC.listOf().xmap(SequenceRuleSource::new, SequenceRuleSource::sequence).fieldOf("sequence").codec(); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -548,7 +548,7 @@ static final Codec CODEC = Codec.unit(INSTANCE); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -560,7 +560,7 @@ static record StoneDepthCheck(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType) implements ConditionSource { static final Codec CODEC = RecordCodecBuilder.create(($$0) -> $$0.group(Codec.INT.fieldOf("offset").forGetter(StoneDepthCheck::offset), Codec.BOOL.fieldOf("add_surface_depth").forGetter(StoneDepthCheck::addSurfaceDepth), Codec.INT.fieldOf("secondary_depth_range").forGetter(StoneDepthCheck::secondaryDepthRange), CaveSurface.CODEC.fieldOf("surface_type").forGetter(StoneDepthCheck::surfaceType)).apply($$0, StoneDepthCheck::new)); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -594,7 +594,7 @@ static final Codec CODEC = Codec.unit(INSTANCE); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -613,7 +613,7 @@ static record TestRuleSource(ConditionSource ifTrue, RuleSource thenRun) implements RuleSource { static final Codec CODEC = RecordCodecBuilder.create(($$0) -> $$0.group(SurfaceRules.ConditionSource.CODEC.fieldOf("if_true").forGetter(TestRuleSource::ifTrue), SurfaceRules.RuleSource.CODEC.fieldOf("then_run").forGetter(TestRuleSource::thenRun)).apply($$0, TestRuleSource::new)); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -625,7 +625,7 @@ static record VerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) implements ConditionSource { static final Codec CODEC = RecordCodecBuilder.create(($$0) -> $$0.group(ResourceLocation.CODEC.fieldOf("random_name").forGetter(VerticalGradientConditionSource::randomName), VerticalAnchor.CODEC.fieldOf("true_at_and_below").forGetter(VerticalGradientConditionSource::trueAtAndBelow), VerticalAnchor.CODEC.fieldOf("false_at_and_above").forGetter(VerticalGradientConditionSource::falseAtAndAbove)).apply($$0, VerticalGradientConditionSource::new)); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -660,7 +660,7 @@ static record WaterConditionSource(int offset, int surfaceDepthMultiplier, boolean addStoneDepth) implements ConditionSource { static final Codec CODEC = RecordCodecBuilder.create(($$0) -> $$0.group(Codec.INT.fieldOf("offset").forGetter(WaterConditionSource::offset), Codec.intRange(-20, 20).fieldOf("surface_depth_multiplier").forGetter(WaterConditionSource::surfaceDepthMultiplier), Codec.BOOL.fieldOf("add_stone_depth").forGetter(WaterConditionSource::addStoneDepth)).apply($$0, WaterConditionSource::new)); - public Codec codec() { + public Codec codec() { return CODEC; } @@ -682,7 +682,7 @@ static record YConditionSource(VerticalAnchor anchor, int surfaceDepthMultiplier, boolean addStoneDepth) implements ConditionSource { static final Codec CODEC = RecordCodecBuilder.create(($$0) -> $$0.group(VerticalAnchor.CODEC.fieldOf("anchor").forGetter(YConditionSource::anchor), Codec.intRange(-20, 20).fieldOf("surface_depth_multiplier").forGetter(YConditionSource::surfaceDepthMultiplier), Codec.BOOL.fieldOf("add_stone_depth").forGetter(YConditionSource::addStoneDepth)).apply($$0, YConditionSource::new)); - public Codec codec() { + public Codec codec() { return CODEC; } diff -r -u3 -N a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java --- a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java 2022-05-25 22:50:14.000000000 -0700 @@ -37,7 +37,7 @@ return !this.canRun($$0) ? false : this.composedChildren.expand($$0, $$1); } - public static LootPoolEntryContainer.Serializer createSerializer(final CompositeEntryBase.CompositeEntryConstructor $$0) { + public static LootPoolEntryContainer.Serializer createSerializer(final CompositeEntryConstructor $$0) { return new LootPoolEntryContainer.Serializer() { public void serializeCustom(JsonObject $$0x, T $$1, JsonSerializationContext $$2) { $$0.add("children", $$2.serialize($$1.children)); diff -r -u3 -N a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java --- a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java 2022-05-25 22:50:14.000000000 -0700 @@ -36,7 +36,7 @@ public abstract LootPoolEntryType getType(); - public abstract static class Builder> implements ConditionUserBuilder { + public abstract static class Builder> implements ConditionUserBuilder { private final List conditions = Lists.newArrayList(); protected abstract T getThis(); @@ -54,15 +54,15 @@ return (LootItemCondition[])this.conditions.toArray(new LootItemCondition[0]); } - public AlternativesEntry.Builder otherwise(LootPoolEntryContainer.Builder $$0) { + public AlternativesEntry.Builder otherwise(Builder $$0) { return new AlternativesEntry.Builder(this, $$0); } - public EntryGroup.Builder append(LootPoolEntryContainer.Builder $$0) { + public EntryGroup.Builder append(Builder $$0) { return new EntryGroup.Builder(this, $$0); } - public SequentialEntry.Builder then(LootPoolEntryContainer.Builder $$0) { + public SequentialEntry.Builder then(Builder $$0) { return new SequentialEntry.Builder(this, $$0); } diff -r -u3 -N a/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java b/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java --- a/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java 2022-05-25 22:50:14.000000000 -0700 @@ -59,11 +59,11 @@ } } - public static LootPoolSingletonContainer.Builder simpleBuilder(EntryConstructor $$0) { + public static Builder simpleBuilder(EntryConstructor $$0) { return new DummyBuilder($$0); } - public abstract static class Builder> extends LootPoolEntryContainer.Builder implements FunctionUserBuilder { + public abstract static class Builder> extends LootPoolEntryContainer.Builder implements FunctionUserBuilder { protected int weight = 1; protected int quality = 0; private final List functions = Lists.newArrayList(); @@ -88,7 +88,7 @@ } } - static class DummyBuilder extends LootPoolSingletonContainer.Builder { + static class DummyBuilder extends Builder { private final EntryConstructor constructor; public DummyBuilder(EntryConstructor $$0) { diff -r -u3 -N a/net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java b/net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java --- a/net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/storage/loot/functions/LootItemConditionalFunction.java 2022-05-25 22:50:14.000000000 -0700 @@ -40,11 +40,11 @@ } - protected static LootItemConditionalFunction.Builder simpleBuilder(Function $$0) { + protected static Builder simpleBuilder(Function $$0) { return new DummyBuilder($$0); } - public abstract static class Builder> implements LootItemFunction.Builder, ConditionUserBuilder { + public abstract static class Builder> implements LootItemFunction.Builder, ConditionUserBuilder { private final List conditions = Lists.newArrayList(); public T when(LootItemCondition.Builder $$0) { @@ -63,7 +63,7 @@ } } - static final class DummyBuilder extends LootItemConditionalFunction.Builder { + static final class DummyBuilder extends Builder { private final Function constructor; public DummyBuilder(Function $$0) { diff -r -u3 -N a/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java b/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java --- a/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java 2022-05-25 22:50:14.000000000 -0700 @@ -17,7 +17,7 @@ import net.minecraft.util.GsonHelper; public class GsonAdapterFactory { - public static > GsonAdapterFactory.Builder builder(Registry $$0, String $$1, String $$2, Function $$3) { + public static > Builder builder(Registry $$0, String $$1, String $$2, Function $$3) { return new Builder<>($$0, $$1, $$2, $$3); } @@ -27,7 +27,7 @@ private final String typeKey; private final Function typeGetter; @Nullable - private Pair> inlineType; + private Pair> inlineType; @Nullable private T defaultType; @@ -38,12 +38,12 @@ this.typeGetter = $$3; } - public GsonAdapterFactory.Builder withInlineSerializer(T $$0, GsonAdapterFactory.InlineSerializer $$1) { + public Builder withInlineSerializer(T $$0, InlineSerializer $$1) { this.inlineType = Pair.of($$0, $$1); return this; } - public GsonAdapterFactory.Builder withDefaultType(T $$0) { + public Builder withDefaultType(T $$0) { this.defaultType = $$0; return this; } @@ -67,9 +67,9 @@ @Nullable private final T defaultType; @Nullable - private final Pair> inlineType; + private final Pair> inlineType; - JsonAdapter(Registry $$0, String $$1, String $$2, Function $$3, @Nullable T $$4, @Nullable Pair> $$5) { + JsonAdapter(Registry $$0, String $$1, String $$2, Function $$3, @Nullable T $$4, @Nullable Pair> $$5) { this.registry = $$0; this.elementName = $$1; this.typeKey = $$2; diff -r -u3 -N a/net/minecraft/world/level/timers/TimerQueue.java b/net/minecraft/world/level/timers/TimerQueue.java --- a/net/minecraft/world/level/timers/TimerQueue.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/level/timers/TimerQueue.java 2022-05-25 22:50:14.000000000 -0700 @@ -23,11 +23,11 @@ private static final String TIMER_NAME_TAG = "Name"; private static final String TIMER_TRIGGER_TIME_TAG = "TriggerTime"; private final TimerCallbacks callbacksRegistry; - private final Queue> queue = new PriorityQueue(createComparator()); + private final Queue> queue = new PriorityQueue(createComparator()); private UnsignedLong sequentialId = UnsignedLong.ZERO; - private final Table> events = HashBasedTable.create(); + private final Table> events = HashBasedTable.create(); - private static Comparator> createComparator() { + private static Comparator> createComparator() { return Comparator.comparingLong(($$0) -> $$0.triggerTime).thenComparing(($$0) -> $$0.sequentialId); } @@ -51,7 +51,7 @@ public void tick(T $$0, long $$1) { while(true) { - TimerQueue.Event $$2 = (Event)this.queue.peek(); + Event $$2 = (Event)this.queue.peek(); if ($$2 == null || $$2.triggerTime > $$1) { return; } @@ -65,14 +65,14 @@ public void schedule(String $$0, long $$1, TimerCallback $$2) { if (!this.events.contains($$0, $$1)) { this.sequentialId = this.sequentialId.plus(UnsignedLong.ONE); - TimerQueue.Event $$3 = new Event<>($$1, this.sequentialId, $$0, $$2); + Event $$3 = new Event<>($$1, this.sequentialId, $$0, $$2); this.events.put($$0, $$1, $$3); this.queue.add($$3); } } public int remove(String $$0) { - Collection> $$1 = this.events.row($$0).values(); + Collection> $$1 = this.events.row($$0).values(); $$1.forEach(this.queue::remove); int $$2 = $$1.size(); $$1.clear(); @@ -94,7 +94,7 @@ } - private CompoundTag storeEvent(TimerQueue.Event $$0) { + private CompoundTag storeEvent(Event $$0) { CompoundTag $$1 = new CompoundTag(); $$1.putString("Name", $$0.id); $$1.putLong("TriggerTime", $$0.triggerTime); diff -r -u3 -N a/net/minecraft/world/ticks/LevelTicks.java b/net/minecraft/world/ticks/LevelTicks.java --- a/net/minecraft/world/ticks/LevelTicks.java 2022-05-24 17:47:16.000000000 -0700 +++ b/net/minecraft/world/ticks/LevelTicks.java 2022-05-25 22:50:14.000000000 -0700 @@ -218,7 +218,7 @@ } - private void forContainersInArea(BoundingBox $$0, LevelTicks.PosAndContainerConsumer $$1) { + private void forContainersInArea(BoundingBox $$0, PosAndContainerConsumer $$1) { int $$2 = SectionPos.posToSectionCoord((double)$$0.minX()); int $$3 = SectionPos.posToSectionCoord((double)$$0.minZ()); int $$4 = SectionPos.posToSectionCoord((double)$$0.maxX()); ```

These changes align behavior (and codepaths) between parameterized and non-parameterized type uses, which causes even more shifting

zml2008 commented 2 years ago

Added in a new -qin option to keep inner class imports closer to previous behavior.

There's still some shifting due to the differing whitespace between JB's switch-on-enum implementation and ours, plus control flow changes from instanceof patterns, but the changes are far more minor.

Diff from 1.18.2

zml2008 commented 2 years ago

Thanks for your work on this!