-
-
Notifications
You must be signed in to change notification settings - Fork 48
Rebase on to latest commit for FernFlower #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
match code used before Map.of
|
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:
|
These last few commits exposed some issues with how the generics rework patch was updated, requiring generic cast type writing to be reworked to use the new type annotation-aware structures, shifting some shortname imports.
Diff from the latest commit (1.18.2):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<? extends InputConstants.Key>)(($$0x) -> {
+ return this.map.computeIfAbsent($$0, (Int2ObjectFunction<? extends Key>)(($$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 <T extends Number, R extends MinMaxBounds<T>> R fromJson(@Nullable JsonElement $$0, R $$1, BiFunction<JsonElement, String, T> $$2, MinMaxBounds.BoundsFactory<T, R> $$3) {
+ protected static <T extends Number, R extends MinMaxBounds<T>> R fromJson(@Nullable JsonElement $$0, R $$1, BiFunction<JsonElement, String, T> $$2, BoundsFactory<T, R> $$3) {
if ($$0 != null && !$$0.isJsonNull()) {
if (GsonHelper.isNumberValue($$0)) {
T $$4 = (T)($$2.apply($$0, "value"));
@@ -77,7 +77,7 @@
}
}
- protected static <T extends Number, R extends MinMaxBounds<T>> R fromReader(StringReader $$0, MinMaxBounds.BoundsFromReaderFactory<T, R> $$1, Function<String, T> $$2, Supplier<DynamicCommandExceptionType> $$3, Function<T, T> $$4) throws CommandSyntaxException {
+ protected static <T extends Number, R extends MinMaxBounds<T>> R fromReader(StringReader $$0, BoundsFromReaderFactory<T, R> $$1, Function<String, T> $$2, Supplier<DynamicCommandExceptionType> $$3, Function<T, T> $$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<T extends CriterionTriggerInstance> {
ResourceLocation getId();
- void addPlayerListener(PlayerAdvancements var1, CriterionTrigger.Listener<T> var2);
+ void addPlayerListener(PlayerAdvancements var1, Listener<T> var2);
- void removePlayerListener(PlayerAdvancements var1, CriterionTrigger.Listener<T> var2);
+ void removePlayerListener(PlayerAdvancements var1, Listener<T> 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<T> extends Option {
- private final CycleOption.OptionSetter<T> setter;
+ private final OptionSetter<T> setter;
private final Function<Options, T> getter;
private final Supplier<CycleButton.Builder<T>> buttonSetup;
private Function<Minecraft, CycleButton.TooltipSupplier<T>> tooltip = ($$0x) -> ($$0) -> ImmutableList.of();
- private CycleOption(String $$0, Function<Options, T> $$1, CycleOption.OptionSetter<T> $$2, Supplier<CycleButton.Builder<T>> $$3) {
+ private CycleOption(String $$0, Function<Options, T> $$1, OptionSetter<T> $$2, Supplier<CycleButton.Builder<T>> $$3) {
super($$0);
this.getter = $$1;
this.setter = $$2;
this.buttonSetup = $$3;
}
- public static <T> CycleOption<T> create(String $$0, List<T> $$1, Function<T, Component> $$2, Function<Options, T> $$3, CycleOption.OptionSetter<T> $$4) {
+ public static <T> CycleOption<T> create(String $$0, List<T> $$1, Function<T, Component> $$2, Function<Options, T> $$3, OptionSetter<T> $$4) {
return new CycleOption<>($$0, $$3, $$4, () -> CycleButton.builder($$2).withValues($$1));
}
- public static <T> CycleOption<T> create(String $$0, Supplier<List<T>> $$1, Function<T, Component> $$2, Function<Options, T> $$3, CycleOption.OptionSetter<T> $$4) {
+ public static <T> CycleOption<T> create(String $$0, Supplier<List<T>> $$1, Function<T, Component> $$2, Function<Options, T> $$3, OptionSetter<T> $$4) {
return new CycleOption<>($$0, $$3, $$4, () -> CycleButton.builder($$2).withValues((List)$$1.get()));
}
- public static <T> CycleOption<T> create(String $$0, List<T> $$1, List<T> $$2, BooleanSupplier $$3, Function<T, Component> $$4, Function<Options, T> $$5, CycleOption.OptionSetter<T> $$6) {
+ public static <T> CycleOption<T> create(String $$0, List<T> $$1, List<T> $$2, BooleanSupplier $$3, Function<T, Component> $$4, Function<Options, T> $$5, OptionSetter<T> $$6) {
return new CycleOption<>($$0, $$5, $$6, () -> CycleButton.builder($$4).withValues($$3, $$1, $$2));
}
- public static <T> CycleOption<T> create(String $$0, T[] $$1, Function<T, Component> $$2, Function<Options, T> $$3, CycleOption.OptionSetter<T> $$4) {
+ public static <T> CycleOption<T> create(String $$0, T[] $$1, Function<T, Component> $$2, Function<Options, T> $$3, OptionSetter<T> $$4) {
return new CycleOption<>($$0, $$3, $$4, () -> CycleButton.builder($$2).withValues($$1));
}
- public static CycleOption<Boolean> createBinaryOption(String $$0, Component $$1, Component $$2, Function<Options, Boolean> $$3, CycleOption.OptionSetter<Boolean> $$4) {
+ public static CycleOption<Boolean> createBinaryOption(String $$0, Component $$1, Component $$2, Function<Options, Boolean> $$3, OptionSetter<Boolean> $$4) {
return new CycleOption($$0, $$3, $$4, () -> CycleButton.booleanBuilder($$1, $$2));
}
- public static CycleOption<Boolean> createOnOff(String $$0, Function<Options, Boolean> $$1, CycleOption.OptionSetter<Boolean> $$2) {
+ public static CycleOption<Boolean> createOnOff(String $$0, Function<Options, Boolean> $$1, OptionSetter<Boolean> $$2) {
return new CycleOption($$0, $$1, $$2, CycleButton::onOffBuilder);
}
- public static CycleOption<Boolean> createOnOff(String $$0, Component $$1, Function<Options, Boolean> $$2, CycleOption.OptionSetter<Boolean> $$3) {
+ public static CycleOption<Boolean> createOnOff(String $$0, Component $$1, Function<Options, Boolean> $$2, OptionSetter<Boolean> $$3) {
return createOnOff($$0, $$2, $$3).setTooltip(($$1x) -> {
List<FormattedCharSequence> $$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<E> $$0) {
+ void bindEntryToSelf(Entry<E> $$0) {
$$0.list = this;
}
@@ -528,7 +528,7 @@
}
- public abstract static class Entry<E extends AbstractSelectionList.Entry<E>> implements GuiEventListener {
+ public abstract static class Entry<E extends Entry<E>> implements GuiEventListener {
/** @deprecated */
@Deprecated
AbstractSelectionList<E> 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<E extends ContainerObjectSelectionList.Entry<E>> extends AbstractSelectionList.Entry<E> implements ContainerEventHandler {
+ public abstract static class Entry<E extends Entry<E>> extends AbstractSelectionList.Entry<E> 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<T> values;
+ private final ValueListSupplier<T> values;
private final Function<T, Component> valueStringifier;
private final Function<CycleButton<T>, MutableComponent> narrationProvider;
- private final CycleButton.OnValueChange<T> onValueChange;
- private final CycleButton.TooltipSupplier<T> tooltipSupplier;
+ private final OnValueChange<T> onValueChange;
+ private final TooltipSupplier<T> tooltipSupplier;
private final boolean displayOnlyValue;
- CycleButton(int $$0, int $$1, int $$2, int $$3, Component $$4, Component $$5, int $$6, T $$7, CycleButton.ValueListSupplier<T> $$8, Function<T, Component> $$9, Function<CycleButton<T>, MutableComponent> $$10, CycleButton.OnValueChange<T> $$11, CycleButton.TooltipSupplier<T> $$12, boolean $$13) {
+ CycleButton(int $$0, int $$1, int $$2, int $$3, Component $$4, Component $$5, int $$6, T $$7, ValueListSupplier<T> $$8, Function<T, Component> $$9, Function<CycleButton<T>, MutableComponent> $$10, OnValueChange<T> $$11, TooltipSupplier<T> $$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 <T> CycleButton.Builder<T> builder(Function<T, Component> $$0) {
+ public static <T> Builder<T> builder(Function<T, Component> $$0) {
return new Builder<>($$0);
}
- public static CycleButton.Builder<Boolean> booleanBuilder(Component $$0, Component $$1) {
+ public static Builder<Boolean> booleanBuilder(Component $$0, Component $$1) {
return (new Builder(($$2) -> $$2 ? $$0 : $$1)).withValues(BOOLEAN_OPTIONS);
}
- public static CycleButton.Builder<Boolean> onOffBuilder() {
+ public static Builder<Boolean> onOffBuilder() {
return (new Builder(($$0) -> $$0 ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF)).withValues(BOOLEAN_OPTIONS);
}
- public static CycleButton.Builder<Boolean> onOffBuilder(boolean $$0) {
+ public static Builder<Boolean> onOffBuilder(boolean $$0) {
return onOffBuilder().withInitialValue((T)$$0);
}
@@ -148,41 +148,41 @@
@Nullable
private T initialValue;
private final Function<T, Component> valueStringifier;
- private CycleButton.TooltipSupplier<T> tooltipSupplier = ($$0x) -> ImmutableList.of();
+ private TooltipSupplier<T> tooltipSupplier = ($$0x) -> ImmutableList.of();
private Function<CycleButton<T>, MutableComponent> narrationProvider = CycleButton::createDefaultNarrationMessage;
- private CycleButton.ValueListSupplier<T> values = CycleButton.ValueListSupplier.create(ImmutableList.of());
+ private ValueListSupplier<T> values = CycleButton.ValueListSupplier.create(ImmutableList.of());
private boolean displayOnlyValue;
public Builder(Function<T, Component> $$0) {
this.valueStringifier = $$0;
}
- public CycleButton.Builder<T> withValues(List<T> $$0) {
+ public Builder<T> withValues(List<T> $$0) {
this.values = CycleButton.ValueListSupplier.create($$0);
return this;
}
@SafeVarargs
- public final CycleButton.Builder<T> withValues(T... $$0) {
+ public final Builder<T> withValues(T... $$0) {
return this.withValues(ImmutableList.copyOf($$0));
}
- public CycleButton.Builder<T> withValues(List<T> $$0, List<T> $$1) {
+ public Builder<T> withValues(List<T> $$0, List<T> $$1) {
this.values = CycleButton.ValueListSupplier.create(CycleButton.DEFAULT_ALT_LIST_SELECTOR, $$0, $$1);
return this;
}
- public CycleButton.Builder<T> withValues(BooleanSupplier $$0, List<T> $$1, List<T> $$2) {
+ public Builder<T> withValues(BooleanSupplier $$0, List<T> $$1, List<T> $$2) {
this.values = CycleButton.ValueListSupplier.create($$0, $$1, $$2);
return this;
}
- public CycleButton.Builder<T> withTooltip(CycleButton.TooltipSupplier<T> $$0) {
+ public Builder<T> withTooltip(TooltipSupplier<T> $$0) {
this.tooltipSupplier = $$0;
return this;
}
- public CycleButton.Builder<T> withInitialValue(T $$0) {
+ public Builder<T> 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<T> withCustomNarration(Function<CycleButton<T>, MutableComponent> $$0) {
+ public Builder<T> withCustomNarration(Function<CycleButton<T>, MutableComponent> $$0) {
this.narrationProvider = $$0;
return this;
}
- public CycleButton.Builder<T> displayOnlyValue() {
+ public Builder<T> displayOnlyValue() {
this.displayOnlyValue = true;
return this;
}
@@ -207,7 +207,7 @@
});
}
- public CycleButton<T> create(int $$0, int $$1, int $$2, int $$3, Component $$4, CycleButton.OnValueChange<T> $$5) {
+ public CycleButton<T> create(int $$0, int $$1, int $$2, int $$3, Component $$4, OnValueChange<T> $$5) {
List<T> $$6 = this.values.getDefaultList();
if ($$6.isEmpty()) {
throw new IllegalStateException("No values for cycle button");
@@ -233,9 +233,9 @@
List<T> getDefaultList();
- static <T> CycleButton.ValueListSupplier<T> create(List<T> $$0) {
+ static <T> ValueListSupplier<T> create(List<T> $$0) {
final List<T> $$1 = ImmutableList.copyOf($$0);
- return new CycleButton.ValueListSupplier<T>() {
+ return new ValueListSupplier<T>() {
public List<T> getSelectedList() {
return $$1;
}
@@ -246,10 +246,10 @@
};
}
- static <T> CycleButton.ValueListSupplier<T> create(final BooleanSupplier $$0, List<T> $$1, List<T> $$2) {
+ static <T> ValueListSupplier<T> create(final BooleanSupplier $$0, List<T> $$1, List<T> $$2) {
final List<T> $$3 = ImmutableList.copyOf($$1);
final List<T> $$4 = ImmutableList.copyOf($$2);
- return new CycleButton.ValueListSupplier<T>() {
+ return new ValueListSupplier<T>() {
public List<T> 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<E extends ObjectSelectionList.Entry<E>> extends AbstractSelectionList.Entry<E> implements NarrationSupplier {
+ public abstract static class Entry<E extends Entry<E>> extends AbstractSelectionList.Entry<E> 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<Toast> queued = Queues.<Toast>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 extends Toast> T getToast(Class<? extends T> $$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<MenuType<?>, MenuScreens.ScreenConstructor<?, ?>> SCREENS = Maps.<MenuType<?>, MenuScreens.ScreenConstructor<?, ?>>newHashMap();
+ private static final Map<MenuType<?>, ScreenConstructor<?, ?>> SCREENS = Maps.<MenuType<?>, ScreenConstructor<?, ?>>newHashMap();
public static <T extends AbstractContainerMenu> void create(@Nullable MenuType<T> $$0, Minecraft $$1, int $$2, Component $$3) {
if ($$0 == null) {
LOGGER.warn("Trying to open invalid screen with name: {}", $$3.getString());
} else {
- MenuScreens.ScreenConstructor<T, ?> $$4 = getConstructor($$0);
+ ScreenConstructor<T, ?> $$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 <T extends AbstractContainerMenu> MenuScreens.ScreenConstructor<T, ?> getConstructor(MenuType<T> $$0) {
+ private static <T extends AbstractContainerMenu> ScreenConstructor<T, ?> getConstructor(MenuType<T> $$0) {
return (ScreenConstructor)SCREENS.get($$0);
}
- private static <M extends AbstractContainerMenu, U extends Screen & MenuAccess<M>> void register(MenuType<? extends M> $$0, MenuScreens.ScreenConstructor<M, U> $$1) {
- MenuScreens.ScreenConstructor<?, ?> $$2 = (ScreenConstructor)SCREENS.put($$0, $$1);
+ private static <M extends AbstractContainerMenu, U extends Screen & MenuAccess<M>> void register(MenuType<? extends M> $$0, ScreenConstructor<M, U> $$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 <T extends GameRules.Value<T>> void addEntry(GameRules.Key<T> $$0, EditGameRulesScreen.EntryFactory<T> $$1x) {
+ private <T extends GameRules.Value<T>> void addEntry(GameRules.Key<T> $$0, EntryFactory<T> $$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 <T extends ParticleOptions> void register(ParticleType<T> $$0, ParticleEngine.SpriteParticleRegistration<T> $$1) {
+ private <T extends ParticleOptions> void register(ParticleType<T> $$0, SpriteParticleRegistration<T> $$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<? extends RenderRegionCache.ChunkInfo>)(($$1x) -> new ChunkInfo($$0.getChunk(ChunkPos.getX($$1x), ChunkPos.getZ($$1x)))));
+ $$8[$$9 - $$4][$$10 - $$5] = this.chunkInfoCache.computeIfAbsent(ChunkPos.asLong($$9, $$10), (Long2ObjectFunction<? extends ChunkInfo>)(($$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<ItemStack> CREATIVE_NAMES = new Key<>();
- public static final SearchRegistry.Key<ItemStack> CREATIVE_TAGS = new Key<>();
- public static final SearchRegistry.Key<RecipeCollection> RECIPE_COLLECTIONS = new Key<>();
- private final Map<SearchRegistry.Key<?>, MutableSearchTree<?>> searchTrees = Maps.<SearchRegistry.Key<?>, MutableSearchTree<?>>newHashMap();
+ public static final Key<ItemStack> CREATIVE_NAMES = new Key<>();
+ public static final Key<ItemStack> CREATIVE_TAGS = new Key<>();
+ public static final Key<RecipeCollection> RECIPE_COLLECTIONS = new Key<>();
+ private final Map<Key<?>, MutableSearchTree<?>> searchTrees = Maps.<Key<?>, MutableSearchTree<?>>newHashMap();
public void onResourceManagerReload(ResourceManager $$0) {
for(MutableSearchTree<?> $$1 : this.searchTrees.values()) {
@@ -20,11 +20,11 @@
}
- public <T> void register(SearchRegistry.Key<T> $$0, MutableSearchTree<T> $$1) {
+ public <T> void register(Key<T> $$0, MutableSearchTree<T> $$1) {
this.searchTrees.put($$0, $$1);
}
- public <T> MutableSearchTree<T> getTree(SearchRegistry.Key<T> $$0) {
+ public <T> MutableSearchTree<T> getTree(Key<T> $$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<T> implements ArgumentType<ResourceOrTagLocationArgument.Result<T>> {
+public class ResourceOrTagLocationArgument<T> implements ArgumentType<Result<T>> {
private static final Collection<String> 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 <T> ResourceOrTagLocationArgument.Result<T> getRegistryType(CommandContext<CommandSourceStack> $$0, String $$1, ResourceKey<Registry<T>> $$2, DynamicCommandExceptionType $$3) throws CommandSyntaxException {
- ResourceOrTagLocationArgument.Result<?> $$4 = $$0.getArgument($$1, Result.class);
- Optional<ResourceOrTagLocationArgument.Result<T>> $$5 = $$4.cast($$2);
+ private static <T> Result<T> getRegistryType(CommandContext<CommandSourceStack> $$0, String $$1, ResourceKey<Registry<T>> $$2, DynamicCommandExceptionType $$3) throws CommandSyntaxException {
+ Result<?> $$4 = $$0.getArgument($$1, Result.class);
+ Optional<Result<T>> $$5 = $$4.cast($$2);
return (Result)$$5.orElseThrow(() -> $$3.create($$4));
}
- public static ResourceOrTagLocationArgument.Result<Biome> getBiome(CommandContext<CommandSourceStack> $$0, String $$1) throws CommandSyntaxException {
+ public static Result<Biome> getBiome(CommandContext<CommandSourceStack> $$0, String $$1) throws CommandSyntaxException {
return getRegistryType($$0, $$1, Registry.BIOME_REGISTRY, ERROR_INVALID_BIOME);
}
- public static ResourceOrTagLocationArgument.Result<ConfiguredStructureFeature<?, ?>> getStructureFeature(CommandContext<CommandSourceStack> $$0, String $$1) throws CommandSyntaxException {
+ public static Result<ConfiguredStructureFeature<?, ?>> getStructureFeature(CommandContext<CommandSourceStack> $$0, String $$1) throws CommandSyntaxException {
return getRegistryType($$0, $$1, Registry.CONFIGURED_STRUCTURE_FEATURE_REGISTRY, ERROR_INVALID_STRUCTURE);
}
- public ResourceOrTagLocationArgument.Result<T> parse(StringReader $$0) throws CommandSyntaxException {
+ public Result<T> parse(StringReader $$0) throws CommandSyntaxException {
if ($$0.canRead() && $$0.peek() == '#') {
int $$1 = $$0.getCursor();
@@ -86,12 +86,12 @@
return EXAMPLES;
}
- static record ResourceResult<T>(ResourceKey<T> key) implements ResourceOrTagLocationArgument.Result<T> {
+ static record ResourceResult<T>(ResourceKey<T> key) implements Result<T> {
public Either<ResourceKey<T>, TagKey<T>> unwrap() {
return Either.left(this.key);
}
- public <E> Optional<ResourceOrTagLocationArgument.Result<E>> cast(ResourceKey<? extends Registry<E>> $$0) {
+ public <E> Optional<Result<E>> cast(ResourceKey<? extends Registry<E>> $$0) {
return this.key.cast($$0).map(ResourceResult::new);
}
@@ -107,7 +107,7 @@
public interface Result<T> extends Predicate<Holder<T>> {
Either<ResourceKey<T>, TagKey<T>> unwrap();
- <E> Optional<ResourceOrTagLocationArgument.Result<E>> cast(ResourceKey<? extends Registry<E>> var1);
+ <E> Optional<Result<E>> cast(ResourceKey<? extends Registry<E>> var1);
String asPrintable();
}
@@ -127,12 +127,12 @@
}
}
- static record TagResult<T>(TagKey<T> key) implements ResourceOrTagLocationArgument.Result<T> {
+ static record TagResult<T>(TagKey<T> key) implements Result<T> {
public Either<ResourceKey<T>, TagKey<T>> unwrap() {
return Either.right(this.key);
}
- public <E> Optional<ResourceOrTagLocationArgument.Result<E>> cast(ResourceKey<? extends Registry<E>> $$0) {
+ public <E> Optional<Result<E>> cast(ResourceKey<? extends Registry<E>> $$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<Class<?>, ArgumentTypes.Entry<?>> BY_CLASS = Maps.newHashMap();
- private static final Map<ResourceLocation, ArgumentTypes.Entry<?>> BY_NAME = Maps.<ResourceLocation, ArgumentTypes.Entry<?>>newHashMap();
+ private static final Map<Class<?>, Entry<?>> BY_CLASS = Maps.newHashMap();
+ private static final Map<ResourceLocation, Entry<?>> BY_NAME = Maps.<ResourceLocation, Entry<?>>newHashMap();
public static <T extends ArgumentType<?>> void register(String $$0, Class<T> $$1, ArgumentSerializer<T> $$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<T> $$4 = new Entry<>($$2, $$3);
+ Entry<T> $$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 <T extends ArgumentType<?>> void serialize(FriendlyByteBuf $$0, T $$1) {
- ArgumentTypes.Entry<T> $$2 = get($$1);
+ Entry<T> $$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 <T extends ArgumentType<?>> void serializeToJson(JsonObject $$0, T $$1) {
- ArgumentTypes.Entry<T> $$2 = get($$1);
+ Entry<T> $$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 <T> Holder.Reference<T> createStandAlone(Registry<T> $$0, ResourceKey<T> $$1) {
+ public static <T> Reference<T> createStandAlone(Registry<T> $$0, ResourceKey<T> $$1) {
return new Reference<>(Holder.Reference.Type.STAND_ALONE, $$0, $$1, (T)null);
}
/** @deprecated */
@Deprecated
- public static <T> Holder.Reference<T> createIntrusive(Registry<T> $$0, @Nullable T $$1) {
+ public static <T> Reference<T> createIntrusive(Registry<T> $$0, @Nullable T $$1) {
return new Reference<>(Holder.Reference.Type.INTRUSIVE, $$0, (ResourceKey<T>)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<T> var1);
@SafeVarargs
- static <T> HolderSet.Direct<T> direct(Holder<T>... $$0) {
+ static <T> Direct<T> direct(Holder<T>... $$0) {
return new Direct<>(List.of($$0));
}
- static <T> HolderSet.Direct<T> direct(List<? extends Holder<T>> $$0) {
+ static <T> Direct<T> direct(List<? extends Holder<T>> $$0) {
return new Direct<>(List.copyOf($$0));
}
@SafeVarargs
- static <E, T> HolderSet.Direct<T> direct(Function<E, Holder<T>> $$0, E... $$1) {
+ static <E, T> Direct<T> direct(Function<E, Holder<T>> $$0, E... $$1) {
return direct(Stream.of($$1).map($$0).toList());
}
- static <E, T> HolderSet.Direct<T> direct(Function<E, Holder<T>> $$0, List<E> $$1) {
+ static <E, T> Direct<T> direct(Function<E, Holder<T>> $$0, List<E> $$1) {
return direct($$1.stream().map($$0).toList());
}
- public static class Direct<T> extends HolderSet.ListBacked<T> {
+ public static class Direct<T> extends ListBacked<T> {
private final List<Holder<T>> contents;
- @Nullable
- private Set<Holder<T>> contentsSet;
+ private @Nullable Set<Holder<T>> contentsSet;
Direct(List<Holder<T>> $$0) {
this.contents = $$0;
@@ -88,8 +87,7 @@
return this.contents().spliterator();
}
- @NotNull
- public Iterator<Holder<T>> iterator() {
+ public @NotNull Iterator<Holder<T>> iterator() {
return this.contents().iterator();
}
@@ -110,7 +108,7 @@
}
}
- public static class Named<T> extends HolderSet.ListBacked<T> {
+ public static class Named<T> extends ListBacked<T> {
private final Registry<T> registry;
private final TagKey<T> key;
private List<Holder<T>> 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<ResourceKey<? extends Registry<?>>, RegistryAccess.RegistryData<?>> REGISTRIES = Util.make(() -> {
- ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryAccess.RegistryData<?>> $$0 = ImmutableMap.builder();
+ Map<ResourceKey<? extends Registry<?>>, RegistryData<?>> REGISTRIES = Util.make(() -> {
+ ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, 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 <E> void put(ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryAccess.RegistryData<?>> $$0, ResourceKey<? extends Registry<E>> $$1, Codec<E> $$2) {
+ private static <E> void put(ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryData<?>> $$0, ResourceKey<? extends Registry<E>> $$1, Codec<E> $$2) {
$$0.put($$1, new RegistryData<E>($$1, $$2, (Codec<E>)null));
}
- private static <E> void put(ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryAccess.RegistryData<?>> $$0, ResourceKey<? extends Registry<E>> $$1, Codec<E> $$2, Codec<E> $$3) {
+ private static <E> void put(ImmutableMap.Builder<ResourceKey<? extends Registry<?>>, RegistryData<?>> $$0, ResourceKey<? extends Registry<E>> $$1, Codec<E> $$2, Codec<E> $$3) {
$$0.put($$1, new RegistryData<E>($$1, $$2, $$3));
}
- static Iterable<RegistryAccess.RegistryData<?>> knownRegistries() {
+ static Iterable<RegistryData<?>> knownRegistries() {
return REGISTRIES.values();
}
- Stream<RegistryAccess.RegistryEntry<?>> ownedRegistries();
+ Stream<RegistryEntry<?>> ownedRegistries();
- private static Stream<RegistryAccess.RegistryEntry<Object>> globalRegistries() {
+ private static Stream<RegistryEntry<Object>> globalRegistries() {
return Registry.REGISTRY.holders().map(RegistryEntry::fromHolder);
}
- default Stream<RegistryAccess.RegistryEntry<?>> registries() {
+ default Stream<RegistryEntry<?>> registries() {
return Stream.concat(this.ownedRegistries(), globalRegistries());
}
- default Stream<RegistryAccess.RegistryEntry<?>> networkSafeRegistries() {
+ default Stream<RegistryEntry<?>> 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<RegistryAccess.RegistryEntry<?>> ownedNetworkableRegistries() {
+ private Stream<RegistryEntry<?>> ownedNetworkableRegistries() {
return this.ownedRegistries().filter(($$0) -> ((RegistryData)REGISTRIES.get($$0.key)).sendToClient());
}
@@ -136,7 +136,7 @@
return $$1.getOptional($$0);
}
- public Stream<RegistryAccess.RegistryEntry<?>> ownedRegistries() {
+ public Stream<RegistryEntry<?>> ownedRegistries() {
return $$0.entrySet().stream().map(RegistryEntry::fromMapEntry);
}
};
@@ -146,7 +146,7 @@
Writable $$0 = blankWriteable();
RegistryResourceAccess.InMemoryStorage $$1 = new RegistryResourceAccess.InMemoryStorage();
- for(Map.Entry<ResourceKey<? extends Registry<?>>, RegistryAccess.RegistryData<?>> $$2 : REGISTRIES.entrySet()) {
+ for(Map.Entry<ResourceKey<? extends Registry<?>>, 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 <E> void addBuiltinElements(RegistryResourceAccess.InMemoryStorage $$0, RegistryAccess.RegistryData<E> $$1) {
+ private static <E> void addBuiltinElements(RegistryResourceAccess.InMemoryStorage $$0, RegistryData<E> $$1) {
ResourceKey<? extends Registry<E>> $$2 = $$1.key();
Registry<E> $$3 = BuiltinRegistries.ACCESS.registryOrThrow($$2);
@@ -171,13 +171,13 @@
static void load(Writable $$0, DynamicOps<JsonElement> $$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 <E> void readRegistry(DynamicOps<JsonElement> $$0, RegistryLoader.Bound $$1, RegistryAccess.RegistryData<E> $$2) {
+ private static <E> void readRegistry(DynamicOps<JsonElement> $$0, RegistryLoader.Bound $$1, RegistryData<E> $$2) {
DataResult<? extends Registry<E>> $$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<RegistryAccess.RegistryEntry<?>> $$0) {
+ ImmutableRegistryAccess(Stream<RegistryEntry<?>> $$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<RegistryAccess.RegistryEntry<?>> ownedRegistries() {
+ public Stream<RegistryEntry<?>> ownedRegistries() {
return this.registries.entrySet().stream().map(RegistryEntry::fromMapEntry);
}
}
@@ -237,19 +237,19 @@
}
public static record RegistryEntry<T>(ResourceKey<? extends Registry<T>> key, Registry<T> value) {
- private static <T, R extends Registry<? extends T>> RegistryAccess.RegistryEntry<T> fromMapEntry(Map.Entry<? extends ResourceKey<? extends Registry<?>>, R> $$0) {
+ private static <T, R extends Registry<? extends T>> RegistryEntry<T> fromMapEntry(Map.Entry<? extends ResourceKey<? extends Registry<?>>, R> $$0) {
return fromUntyped((ResourceKey)$$0.getKey(), (Registry)$$0.getValue());
}
- private static <T> RegistryAccess.RegistryEntry<T> fromHolder(Holder.Reference<? extends Registry<? extends T>> $$0) {
+ private static <T> RegistryEntry<T> fromHolder(Holder.Reference<? extends Registry<? extends T>> $$0) {
return fromUntyped($$0.key(), $$0.value());
}
- private static <T> RegistryAccess.RegistryEntry<T> fromUntyped(ResourceKey<? extends Registry<?>> $$0, Registry<?> $$1) {
+ private static <T> RegistryEntry<T> fromUntyped(ResourceKey<? extends Registry<?>> $$0, Registry<?> $$1) {
return new RegistryEntry<>($$0, $$1);
}
- private RegistryAccess.RegistryEntry<T> freeze() {
+ private RegistryEntry<T> 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<RegistryAccess.RegistryEntry<?>> ownedRegistries() {
+ public Stream<RegistryEntry<?>> 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 <T> MapCodec<RegistryCodecs.RegistryEntry<T>> withNameAndId(ResourceKey<? extends Registry<T>> $$0, MapCodec<T> $$1) {
+ private static <T> MapCodec<RegistryEntry<T>> withNameAndId(ResourceKey<? extends Registry<T>> $$0, MapCodec<T> $$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<T> $$3 = new MappedRegistry<>($$0, $$1, (Function<T, Holder.Reference<T>>)null);
- for(RegistryCodecs.RegistryEntry<T> $$4 : $$2x) {
+ for(RegistryEntry<T> $$4 : $$2x) {
$$3.registerMapping($$4.id(), $$4.key(), $$4.value(), $$1);
}
return $$3;
}, ($$0x) -> {
- ImmutableList.Builder<RegistryCodecs.RegistryEntry<T>> $$1 = ImmutableList.builder();
+ ImmutableList.Builder<RegistryEntry<T>> $$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 <T> Registry<T> registerSimple(ResourceKey<? extends Registry<T>> $$0, Registry.RegistryBootstrap<T> $$1) {
+ private static <T> Registry<T> registerSimple(ResourceKey<? extends Registry<T>> $$0, RegistryBootstrap<T> $$1) {
return registerSimple($$0, Lifecycle.experimental(), $$1);
}
- private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Registry.RegistryBootstrap<T> $$2) {
+ private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, RegistryBootstrap<T> $$2) {
return registerDefaulted($$0, $$1, Lifecycle.experimental(), $$2);
}
- private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Function<T, Holder.Reference<T>> $$2, Registry.RegistryBootstrap<T> $$3) {
+ private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Function<T, Holder.Reference<T>> $$2, RegistryBootstrap<T> $$3) {
return registerDefaulted($$0, $$1, Lifecycle.experimental(), $$2, $$3);
}
- private static <T> Registry<T> registerSimple(ResourceKey<? extends Registry<T>> $$0, Lifecycle $$1, Registry.RegistryBootstrap<T> $$2) {
+ private static <T> Registry<T> registerSimple(ResourceKey<? extends Registry<T>> $$0, Lifecycle $$1, RegistryBootstrap<T> $$2) {
return internalRegister($$0, new MappedRegistry<>($$0, $$1, (Function<T, Holder.Reference<T>>)null), $$2, $$1);
}
- private static <T> Registry<T> registerSimple(ResourceKey<? extends Registry<T>> $$0, Lifecycle $$1, Function<T, Holder.Reference<T>> $$2, Registry.RegistryBootstrap<T> $$3) {
+ private static <T> Registry<T> registerSimple(ResourceKey<? extends Registry<T>> $$0, Lifecycle $$1, Function<T, Holder.Reference<T>> $$2, RegistryBootstrap<T> $$3) {
return internalRegister($$0, new MappedRegistry<>($$0, $$1, $$2), $$3, $$1);
}
- private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Lifecycle $$2, Registry.RegistryBootstrap<T> $$3) {
+ private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Lifecycle $$2, RegistryBootstrap<T> $$3) {
return internalRegister($$0, new DefaultedRegistry<>($$1, $$0, $$2, (Function<T, Holder.Reference<T>>)null), $$3, $$2);
}
- private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Lifecycle $$2, Function<T, Holder.Reference<T>> $$3, Registry.RegistryBootstrap<T> $$4) {
+ private static <T> DefaultedRegistry<T> registerDefaulted(ResourceKey<? extends Registry<T>> $$0, String $$1, Lifecycle $$2, Function<T, Holder.Reference<T>> $$3, RegistryBootstrap<T> $$4) {
return internalRegister($$0, new DefaultedRegistry<>($$1, $$0, $$2, $$3), $$4, $$2);
}
- private static <T, R extends WritableRegistry<T>> R internalRegister(ResourceKey<? extends Registry<T>> $$0, R $$1, Registry.RegistryBootstrap<T> $$2, Lifecycle $$3) {
+ private static <T, R extends WritableRegistry<T>> R internalRegister(ResourceKey<? extends Registry<T>> $$0, R $$1, RegistryBootstrap<T> $$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<Property<?>> getDefinedProperties();
- public static <T1 extends Comparable<T1>> PropertyDispatch.C1<T1> property(Property<T1> $$0) {
+ public static <T1 extends Comparable<T1>> C1<T1> property(Property<T1> $$0) {
return new C1<>($$0);
}
- public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>> PropertyDispatch.C2<T1, T2> properties(Property<T1> $$0, Property<T2> $$1) {
+ public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>> C2<T1, T2> properties(Property<T1> $$0, Property<T2> $$1) {
return new C2<>($$0, $$1);
}
- public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>> PropertyDispatch.C3<T1, T2, T3> properties(Property<T1> $$0, Property<T2> $$1, Property<T3> $$2) {
+ public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>> C3<T1, T2, T3> properties(Property<T1> $$0, Property<T2> $$1, Property<T3> $$2) {
return new C3<>($$0, $$1, $$2);
}
- public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>> PropertyDispatch.C4<T1, T2, T3, T4> properties(Property<T1> $$0, Property<T2> $$1, Property<T3> $$2, Property<T4> $$3) {
+ public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>> C4<T1, T2, T3, T4> properties(Property<T1> $$0, Property<T2> $$1, Property<T3> $$2, Property<T4> $$3) {
return new C4<>($$0, $$1, $$2, $$3);
}
- public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>, T5 extends Comparable<T5>> PropertyDispatch.C5<T1, T2, T3, T4, T5> properties(Property<T1> $$0, Property<T2> $$1, Property<T3> $$2, Property<T4> $$3, Property<T5> $$4) {
+ public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>, T3 extends Comparable<T3>, T4 extends Comparable<T4>, T5 extends Comparable<T5>> C5<T1, T2, T3, T4, T5> properties(Property<T1> $$0, Property<T2> $$1, Property<T3> $$2, Property<T4> $$3, Property<T5> $$4) {
return new C5<>($$0, $$1, $$2, $$3, $$4);
}
@@ -74,13 +74,13 @@
return ImmutableList.of(this.property1);
}
- public PropertyDispatch.C1<T1> select(T1 $$0, List<Variant> $$1) {
+ public C1<T1> select(T1 $$0, List<Variant> $$1) {
Selector $$2 = Selector.of(this.property1.value($$0));
this.putValue($$2, $$1);
return this;
}
- public PropertyDispatch.C1<T1> select(T1 $$0, Variant $$1) {
+ public C1<T1> 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<T1, T2> select(T1 $$0, T2 $$1, List<Variant> $$2) {
+ public C2<T1, T2> select(T1 $$0, T2 $$1, List<Variant> $$2) {
Selector $$3 = Selector.of(this.property1.value($$0), this.property2.value($$1));
this.putValue($$3, $$2);
return this;
}
- public PropertyDispatch.C2<T1, T2> select(T1 $$0, T2 $$1, Variant $$2) {
+ public C2<T1, T2> 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<T1, T2, T3> select(T1 $$0, T2 $$1, T3 $$2, List<Variant> $$3) {
+ public C3<T1, T2, T3> select(T1 $$0, T2 $$1, T3 $$2, List<Variant> $$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<T1, T2, T3> select(T1 $$0, T2 $$1, T3 $$2, Variant $$3) {
+ public C3<T1, T2, T3> select(T1 $$0, T2 $$1, T3 $$2, Variant $$3) {
return this.select($$0, $$1, $$2, Collections.singletonList($$3));
}
- public PropertyDispatch generate(PropertyDispatch.TriFunction<T1, T2, T3, Variant> $$0) {
+ public PropertyDispatch generate(TriFunction<T1, T2, T3, Variant> $$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<T1, T2, T3, List<Variant>> $$0) {
+ public PropertyDispatch generateList(TriFunction<T1, T2, T3, List<Variant>> $$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<T1, T2, T3, T4> select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, List<Variant> $$4) {
+ public C4<T1, T2, T3, T4> select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, List<Variant> $$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<T1, T2, T3, T4> select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, Variant $$4) {
+ public C4<T1, T2, T3, T4> 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<T1, T2, T3, T4, Variant> $$0) {
+ public PropertyDispatch generate(QuadFunction<T1, T2, T3, T4, Variant> $$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<T1, T2, T3, T4, List<Variant>> $$0) {
+ public PropertyDispatch generateList(QuadFunction<T1, T2, T3, T4, List<Variant>> $$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<T1, T2, T3, T4, T5> select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, List<Variant> $$5) {
+ public C5<T1, T2, T3, T4, T5> select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, List<Variant> $$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<T1, T2, T3, T4, T5> select(T1 $$0, T2 $$1, T3 $$2, T4 $$3, T5 $$4, Variant $$5) {
+ public C5<T1, T2, T3, T4, T5> 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<T1, T2, T3, T4, T5, Variant> $$0) {
+ public PropertyDispatch generate(PentaFunction<T1, T2, T3, T4, T5, Variant> $$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<T1, T2, T3, T4, T5, List<Variant>> $$0) {
+ public PropertyDispatch generateList(PentaFunction<T1, T2, T3, T4, T5, List<Variant>> $$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<T> tag(TagKey<T> $$0) {
+ protected TagAppender<T> tag(TagKey<T> $$0) {
Tag.Builder $$1 = this.getOrCreateRawBuilder($$0);
return new TagAppender<>($$1, this.registry, "vanilla");
}
@@ -112,13 +112,13 @@
this.source = $$2;
}
- public TagsProvider.TagAppender<T> add(T $$0) {
+ public TagAppender<T> add(T $$0) {
this.builder.addElement(this.registry.getKey($$0), this.source);
return this;
}
@SafeVarargs
- public final TagsProvider.TagAppender<T> add(ResourceKey<T>... $$0) {
+ public final TagAppender<T> add(ResourceKey<T>... $$0) {
for(ResourceKey<T> $$1 : $$0) {
this.builder.addElement($$1.location(), this.source);
}
@@ -126,23 +126,23 @@
return this;
}
- public TagsProvider.TagAppender<T> addOptional(ResourceLocation $$0) {
+ public TagAppender<T> addOptional(ResourceLocation $$0) {
this.builder.addOptionalElement($$0, this.source);
return this;
}
- public TagsProvider.TagAppender<T> addTag(TagKey<T> $$0) {
+ public TagAppender<T> addTag(TagKey<T> $$0) {
this.builder.addTag($$0.location(), this.source);
return this;
}
- public TagsProvider.TagAppender<T> addOptionalTag(ResourceLocation $$0) {
+ public TagAppender<T> addOptionalTag(ResourceLocation $$0) {
this.builder.addOptionalTag($$0, this.source);
return this;
}
@SafeVarargs
- public final TagsProvider.TagAppender<T> add(T... $$0) {
+ public final TagAppender<T> 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<Unit> STOP_ITERATION = Optional.of(Unit.INSTANCE);
FormattedText EMPTY = new FormattedText() {
- public <T> Optional<T> visit(FormattedText.ContentConsumer<T> $$0) {
+ public <T> Optional<T> visit(ContentConsumer<T> $$0) {
return Optional.empty();
}
- public <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> $$0, Style $$1) {
+ public <T> Optional<T> visit(StyledContentConsumer<T> $$0, Style $$1) {
return Optional.empty();
}
};
- <T> Optional<T> visit(FormattedText.ContentConsumer<T> var1);
+ <T> Optional<T> visit(ContentConsumer<T> var1);
- <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> var1, Style var2);
+ <T> Optional<T> visit(StyledContentConsumer<T> var1, Style var2);
static FormattedText of(final String $$0) {
return new FormattedText() {
- public <T> Optional<T> visit(FormattedText.ContentConsumer<T> $$0x) {
+ public <T> Optional<T> visit(ContentConsumer<T> $$0x) {
return $$0.accept($$0);
}
- public <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> $$0x, Style $$1) {
+ public <T> Optional<T> visit(StyledContentConsumer<T> $$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 <T> Optional<T> visit(FormattedText.ContentConsumer<T> $$0x) {
+ public <T> Optional<T> visit(ContentConsumer<T> $$0x) {
return $$0.accept($$0);
}
- public <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> $$0x, Style $$1x) {
+ public <T> Optional<T> visit(StyledContentConsumer<T> $$0x, Style $$1x) {
return $$0.accept($$1.applyTo($$1), $$0);
}
};
@@ -51,7 +51,7 @@
static FormattedText composite(final List<? extends FormattedText> $$0) {
return new FormattedText() {
- public <T> Optional<T> visit(FormattedText.ContentConsumer<T> $$0x) {
+ public <T> Optional<T> visit(ContentConsumer<T> $$0x) {
for(FormattedText $$1 : $$0) {
Optional<T> $$2 = $$1.visit($$0);
if ($$2.isPresent()) {
@@ -62,7 +62,7 @@
return Optional.empty();
}
- public <T> Optional<T> visit(FormattedText.StyledContentConsumer<T> $$0x, Style $$1) {
+ public <T> Optional<T> visit(StyledContentConsumer<T> $$0x, Style $$1) {
for(FormattedText $$2 : $$0) {
Optional<T> $$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 <T> HoverEvent(HoverEvent.Action<T> $$0, T $$1) {
+ public <T> HoverEvent(Action<T> $$0, T $$1) {
this.action = $$0;
this.value = $$1;
}
- public HoverEvent.Action<?> getAction() {
+ public Action<?> getAction() {
return this.action;
}
@Nullable
- public <T> T getValue(HoverEvent.Action<T> $$0) {
+ public <T> T getValue(Action<T> $$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<T> {
- public static final HoverEvent.Action<Component> SHOW_TEXT = new Action<>("show_text", true, Component.Serializer::fromJson, Component.Serializer::toJsonTree, Function.identity());
- public static final HoverEvent.Action<ItemStackInfo> SHOW_ITEM = new Action<>("show_item", true, ItemStackInfo::create, ItemStackInfo::serialize, ItemStackInfo::create);
- public static final HoverEvent.Action<EntityTooltipInfo> SHOW_ENTITY = new Action<>("show_entity", true, EntityTooltipInfo::create, EntityTooltipInfo::serialize, EntityTooltipInfo::create);
- private static final Map<String, HoverEvent.Action<?>> LOOKUP = (Map)Stream.of(SHOW_TEXT, SHOW_ITEM, SHOW_ENTITY).collect(ImmutableMap.toImmutableMap(Action::getName, ($$0) -> $$0));
+ public static final Action<Component> SHOW_TEXT = new Action<>("show_text", true, Component.Serializer::fromJson, Component.Serializer::toJsonTree, Function.identity());
+ public static final Action<ItemStackInfo> SHOW_ITEM = new Action<>("show_item", true, ItemStackInfo::create, ItemStackInfo::serialize, ItemStackInfo::create);
+ public static final Action<EntityTooltipInfo> SHOW_ENTITY = new Action<>("show_entity", true, EntityTooltipInfo::create, EntityTooltipInfo::serialize, EntityTooltipInfo::create);
+ private static final Map<String, Action<?>> 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<JsonElement, T> 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<Class<? extends Packet<?>>, ConnectionProtocol> PROTOCOL_BY_PACKET = Maps.newHashMap();
private final int id;
- private final Map<PacketFlow, ? extends ConnectionProtocol.PacketSet<?>> flows;
+ private final Map<PacketFlow, ? extends PacketSet<?>> flows;
private static ProtocolBuilder protocol() {
return new ProtocolBuilder();
@@ -209,7 +209,7 @@
@VisibleForDebug
public Int2ObjectMap<Class<? extends Packet<?>>> getPacketsByIds(PacketFlow $$0) {
Int2ObjectMap<Class<? extends Packet<?>>> $$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<Class<? extends Packet<T>>> classToId = Util.make(new Object2IntOpenHashMap(), ($$0) -> $$0.defaultReturnValue(-1));
private final List<Function<FriendlyByteBuf, ? extends Packet<T>>> idToDeserializer = Lists.newArrayList();
- public <P extends Packet<T>> ConnectionProtocol.PacketSet<T> addPacket(Class<P> $$0, Function<FriendlyByteBuf, P> $$1) {
+ public <P extends Packet<T>> PacketSet<T> addPacket(Class<P> $$0, Function<FriendlyByteBuf, P> $$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<PacketFlow, ConnectionProtocol.PacketSet<?>> flows = Maps.newEnumMap(PacketFlow.class);
+ final Map<PacketFlow, PacketSet<?>> flows = Maps.newEnumMap(PacketFlow.class);
- public <T extends PacketListener> ProtocolBuilder addFlow(PacketFlow $$0, ConnectionProtocol.PacketSet<T> $$1) {
+ public <T extends PacketListener> ProtocolBuilder addFlow(PacketFlow $$0, PacketSet<T> $$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<SynchedEntityData.DataItem<?>> itemsById = new Int2ObjectOpenHashMap<>();
+ private final Int2ObjectMap<DataItem<?>> itemsById = new Int2ObjectOpenHashMap<>();
private final ReadWriteLock lock = new ReentrantReadWriteLock();
private boolean isEmpty = true;
private boolean isDirty;
@@ -87,17 +87,17 @@
}
private <T> void createDataItem(EntityDataAccessor<T> $$0, T $$1) {
- SynchedEntityData.DataItem<T> $$2 = new DataItem<>($$0, $$1);
+ DataItem<T> $$2 = new DataItem<>($$0, $$1);
this.lock.writeLock().lock();
this.itemsById.put($$0.getId(), $$2);
this.isEmpty = false;
this.lock.writeLock().unlock();
}
- private <T> SynchedEntityData.DataItem<T> getItem(EntityDataAccessor<T> $$0) {
+ private <T> DataItem<T> getItem(EntityDataAccessor<T> $$0) {
this.lock.readLock().lock();
- SynchedEntityData.DataItem<T> $$1;
+ DataItem<T> $$1;
try {
$$1 = this.itemsById.get($$0.getId());
} catch (Throwable var9) {
@@ -117,7 +117,7 @@
}
public <T> void set(EntityDataAccessor<T> $$0, T $$1) {
- SynchedEntityData.DataItem<T> $$2 = this.getItem($$0);
+ DataItem<T> $$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<SynchedEntityData.DataItem<?>> $$0, FriendlyByteBuf $$1) {
+ public static void pack(@Nullable List<DataItem<?>> $$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<SynchedEntityData.DataItem<?>> packDirty() {
- List<SynchedEntityData.DataItem<?>> $$0 = null;
+ public List<DataItem<?>> packDirty() {
+ List<DataItem<?>> $$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.<SynchedEntityData.DataItem<?>>newArrayList();
+ $$0 = Lists.<DataItem<?>>newArrayList();
}
$$0.add($$1.copy());
@@ -166,13 +166,13 @@
}
@Nullable
- public List<SynchedEntityData.DataItem<?>> getAll() {
- List<SynchedEntityData.DataItem<?>> $$0 = null;
+ public List<DataItem<?>> getAll() {
+ List<DataItem<?>> $$0 = null;
this.lock.readLock().lock();
- for(SynchedEntityData.DataItem<?> $$1 : this.itemsById.values()) {
+ for(DataItem<?> $$1 : this.itemsById.values()) {
if ($$0 == null) {
- $$0 = Lists.<SynchedEntityData.DataItem<?>>newArrayList();
+ $$0 = Lists.<DataItem<?>>newArrayList();
}
$$0.add($$1.copy());
@@ -182,7 +182,7 @@
return $$0;
}
- private static <T> void writeDataItem(FriendlyByteBuf $$0, SynchedEntityData.DataItem<T> $$1) {
+ private static <T> void writeDataItem(FriendlyByteBuf $$0, DataItem<T> $$1) {
EntityDataAccessor<T> $$2 = $$1.getAccessor();
int $$3 = EntityDataSerializers.getSerializedId($$2.getSerializer());
if ($$3 < 0) {
@@ -195,13 +195,13 @@
}
@Nullable
- public static List<SynchedEntityData.DataItem<?>> unpack(FriendlyByteBuf $$0) {
- List<SynchedEntityData.DataItem<?>> $$1 = null;
+ public static List<DataItem<?>> unpack(FriendlyByteBuf $$0) {
+ List<DataItem<?>> $$1 = null;
int $$2;
while(($$2 = $$0.readUnsignedByte()) != 255) {
if ($$1 == null) {
- $$1 = Lists.<SynchedEntityData.DataItem<?>>newArrayList();
+ $$1 = Lists.<DataItem<?>>newArrayList();
}
int $$3 = $$0.readVarInt();
@@ -216,16 +216,16 @@
return $$1;
}
- private static <T> SynchedEntityData.DataItem<T> genericHelper(FriendlyByteBuf $$0, int $$1, EntityDataSerializer<T> $$2) {
+ private static <T> DataItem<T> genericHelper(FriendlyByteBuf $$0, int $$1, EntityDataSerializer<T> $$2) {
return new DataItem<>($$2.createAccessor($$1), $$2.read($$0));
}
- public void assignValues(List<SynchedEntityData.DataItem<?>> $$0) {
+ public void assignValues(List<DataItem<?>> $$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 <T> void assignValue(SynchedEntityData.DataItem<T> $$0, SynchedEntityData.DataItem<?> $$1) {
+ private <T> void assignValue(DataItem<T> $$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<T> copy() {
+ public DataItem<T> 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<ResourceKey<? extends Registry<?>>, RegistryLoader.ReadCache<?>> readCache = new IdentityHashMap();
+ private final Map<ResourceKey<? extends Registry<?>>, ReadCache<?>> readCache = new IdentityHashMap();
RegistryLoader(RegistryResourceAccess $$0) {
this.resources = $$0;
@@ -35,7 +35,7 @@
}
<E> DataResult<Holder<E>> overrideElementFromResources(WritableRegistry<E> $$0, ResourceKey<? extends Registry<E>> $$1, Codec<E> $$2, ResourceKey<E> $$3, DynamicOps<JsonElement> $$4) {
- RegistryLoader.ReadCache<E> $$5 = this.readCache($$1);
+ ReadCache<E> $$5 = this.readCache($$1);
DataResult<Holder<E>> $$6 = (DataResult)$$5.values.get($$3);
if ($$6 != null) {
return $$6;
@@ -66,7 +66,7 @@
}
}
- private <E> RegistryLoader.ReadCache<E> readCache(ResourceKey<? extends Registry<E>> $$0) {
+ private <E> ReadCache<E> readCache(ResourceKey<? extends Registry<E>> $$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 {
<E> Collection<ResourceKey<E>> listResources(ResourceKey<? extends Registry<E>> var1);
- <E> Optional<DataResult<RegistryResourceAccess.ParsedEntry<E>>> parseElement(DynamicOps<JsonElement> var1, ResourceKey<? extends Registry<E>> var2, ResourceKey<E> var3, Decoder<E> var4);
+ <E> Optional<DataResult<ParsedEntry<E>>> parseElement(DynamicOps<JsonElement> var1, ResourceKey<? extends Registry<E>> var2, ResourceKey<E> var3, Decoder<E> var4);
static RegistryResourceAccess forResourceManager(final ResourceManager $$0) {
return new RegistryResourceAccess() {
@@ -49,7 +49,7 @@
return $$2;
}
- public <E> Optional<DataResult<RegistryResourceAccess.ParsedEntry<E>>> parseElement(DynamicOps<JsonElement> $$0x, ResourceKey<? extends Registry<E>> $$1, ResourceKey<E> $$2, Decoder<E> $$3) {
+ public <E> Optional<DataResult<ParsedEntry<E>>> parseElement(DynamicOps<JsonElement> $$0x, ResourceKey<? extends Registry<E>> $$1, ResourceKey<E> $$2, Decoder<E> $$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 <E> Optional<DataResult<RegistryResourceAccess.ParsedEntry<E>>> parseElement(DynamicOps<JsonElement> $$0, ResourceKey<? extends Registry<E>> $$1, ResourceKey<E> $$2, Decoder<E> $$3) {
+ public <E> Optional<DataResult<ParsedEntry<E>>> parseElement(DynamicOps<JsonElement> $$0, ResourceKey<? extends Registry<E>> $$1, ResourceKey<E> $$2, Decoder<E> $$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>(E value, OptionalInt fixedId) {
- public static <E> RegistryResourceAccess.ParsedEntry<E> createWithoutId(E $$0) {
+ public static <E> ParsedEntry<E> createWithoutId(E $$0) {
return new ParsedEntry<>($$0, OptionalInt.empty());
}
- public static <E> RegistryResourceAccess.ParsedEntry<E> createWithId(E $$0, int $$1) {
+ public static <E> ParsedEntry<E> 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 <T> ChunkTaskPriorityQueueSorter.Message<T> message(Function<ProcessorHandle<Unit>, T> $$0, long $$1, IntSupplier $$2) {
+ public static <T> Message<T> message(Function<ProcessorHandle<Unit>, T> $$0, long $$1, IntSupplier $$2) {
return new Message<>($$0, $$1, $$2);
}
- public static ChunkTaskPriorityQueueSorter.Message<Runnable> message(Runnable $$0, long $$1, IntSupplier $$2) {
+ public static Message<Runnable> message(Runnable $$0, long $$1, IntSupplier $$2) {
return new Message(($$1x) -> () -> {
$$0.run();
$$1x.tell(Unit.INSTANCE);
}, $$1, $$2);
}
- public static ChunkTaskPriorityQueueSorter.Message<Runnable> message(ChunkHolder $$0, Runnable $$1) {
+ public static Message<Runnable> message(ChunkHolder $$0, Runnable $$1) {
return message($$1, $$0.getPos().toLong(), $$0::getQueueLevel);
}
- public static <T> ChunkTaskPriorityQueueSorter.Message<T> message(ChunkHolder $$0, Function<ProcessorHandle<Unit>, T> $$1) {
+ public static <T> Message<T> message(ChunkHolder $$0, Function<ProcessorHandle<Unit>, T> $$1) {
return message($$1, $$0.getPos().toLong(), $$0::getQueueLevel);
}
@@ -62,7 +62,7 @@
return new Release($$0, $$1, $$2);
}
- public <T> ProcessorHandle<ChunkTaskPriorityQueueSorter.Message<T>> getProcessor(ProcessorHandle<T> $$0, boolean $$1) {
+ public <T> ProcessorHandle<Message<T>> getProcessor(ProcessorHandle<T> $$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<PreparableReloadListener> $$3, SimpleReloadInstance.StateFactory<S> $$4, CompletableFuture<Unit> $$5) {
+ protected SimpleReloadInstance(Executor $$0, final Executor $$1, ResourceManager $$2, List<PreparableReloadListener> $$3, StateFactory<S> $$4, CompletableFuture<Unit> $$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<ResourceKey<? extends Registry<?>>, 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<TagManager.LoadResult<?>> results = List.of();
+ private List<LoadResult<?>> results = List.of();
public TagManager(RegistryAccess $$0) {
this.registryAccess = $$0;
}
- public List<TagManager.LoadResult<?>> getResult() {
+ public List<LoadResult<?>> getResult() {
return this.results;
}
@@ -33,11 +33,11 @@
}
public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier $$0, ResourceManager $$1, ProfilerFiller $$2, ProfilerFiller $$3, Executor $$4, Executor $$5) {
- List<? extends CompletableFuture<? extends TagManager.LoadResult<?>>> $$6 = this.registryAccess.registries().map(($$2x) -> this.createLoader($$1, $$4, $$2x)).toList();
+ List<? extends CompletableFuture<? extends LoadResult<?>>> $$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 <T> CompletableFuture<TagManager.LoadResult<T>> createLoader(ResourceManager $$0, Executor $$1, RegistryAccess.RegistryEntry<T> $$2) {
+ private <T> CompletableFuture<LoadResult<T>> createLoader(ResourceManager $$0, Executor $$1, RegistryAccess.RegistryEntry<T> $$2) {
ResourceKey<? extends Registry<T>> $$3 = $$2.key();
Registry<T> $$4 = $$2.value();
TagLoader<Holder<T>> $$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 <T> void deserializeTagsFromNetwork(ResourceKey<? extends Registry<T>> $$0, Registry<T> $$1, NetworkPayload $$2, TagNetworkSerialization.TagOutput<T> $$3) {
+ public static <T> void deserializeTagsFromNetwork(ResourceKey<? extends Registry<T>> $$0, Registry<T> $$1, NetworkPayload $$2, TagOutput<T> $$3) {
$$2.tags.forEach(($$3x, $$4) -> {
TagKey<T> $$5 = TagKey.create($$0, $$3x);
List<Holder<T>> $$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<C> mapAll(CubicSpline.CoordinateVisitor<C> var1);
+ CubicSpline<C> mapAll(CoordinateVisitor<C> var1);
static <C> Codec<CubicSpline<C>> codec(Codec<ToFloatFunction<C>> $$0) {
MutableObject<Codec<CubicSpline<C>>> $$1 = new MutableObject<>();
@@ -32,7 +32,7 @@
return new Point((float)$$0, $$1xx, (float)$$2);
}));
- Codec<CubicSpline.Multipoint<C>> $$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<Multipoint<C>> $$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<CubicSpline<C>> $$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<C> $$1) {
+ if ($$0x instanceof Constant<C> $$1) {
var10000 = Either.left($$1.value());
} else {
var10000 = Either.right((Multipoint)$$0x);
@@ -63,11 +63,11 @@
return new Constant<>($$0);
}
- static <C> CubicSpline.Builder<C> builder(ToFloatFunction<C> $$0) {
+ static <C> Builder<C> builder(ToFloatFunction<C> $$0) {
return new Builder<>($$0);
}
- static <C> CubicSpline.Builder<C> builder(ToFloatFunction<C> $$0, ToFloatFunction<Float> $$1) {
+ static <C> Builder<C> builder(ToFloatFunction<C> $$0, ToFloatFunction<Float> $$1) {
return new Builder<>($$0, $$1);
}
@@ -87,11 +87,11 @@
this.valueTransformer = $$1;
}
- public CubicSpline.Builder<C> addPoint(float $$0, float $$1, float $$2) {
+ public Builder<C> addPoint(float $$0, float $$1, float $$2) {
return this.addPoint($$0, new Constant<>(this.valueTransformer.apply((C)$$1)), $$2);
}
- public CubicSpline.Builder<C> addPoint(float $$0, CubicSpline<C> $$1, float $$2) {
+ public Builder<C> addPoint(float $$0, CubicSpline<C> $$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<C> mapAll(CubicSpline.CoordinateVisitor<C> $$0) {
+ public CubicSpline<C> mapAll(CoordinateVisitor<C> $$0) {
return this;
}
}
@@ -192,7 +192,7 @@
return (float)this.values().stream().mapToDouble(CubicSpline::max).max().orElseThrow();
}
- public CubicSpline<C> mapAll(CubicSpline.CoordinateVisitor<C> $$0) {
+ public CubicSpline<C> mapAll(CoordinateVisitor<C> $$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 <T> MetricSampler.MetricSamplerBuilder<T> builder(String $$0, MetricCategory $$1, ToDoubleFunction<T> $$2, T $$3) {
+ public static <T> MetricSamplerBuilder<T> builder(String $$0, MetricCategory $$1, ToDoubleFunction<T> $$2, T $$3) {
return new MetricSamplerBuilder<>($$0, $$1, $$2, $$3);
}
@@ -142,12 +142,12 @@
this.context = $$3;
}
- public MetricSampler.MetricSamplerBuilder<T> withBeforeTick(Consumer<T> $$0) {
+ public MetricSamplerBuilder<T> withBeforeTick(Consumer<T> $$0) {
this.beforeTick = () -> $$0.accept(this.context);
return this;
}
- public MetricSampler.MetricSamplerBuilder<T> withThresholdAlert(ThresholdTest $$0) {
+ public MetricSamplerBuilder<T> 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 <E> SimpleWeightedRandomList.Builder<E> builder() {
+ public static <E> Builder<E> builder() {
return new Builder<>();
}
@@ -39,7 +39,7 @@
public static class Builder<E> {
private final ImmutableList.Builder<WeightedEntry.Wrapper<E>> result = ImmutableList.builder();
- public SimpleWeightedRandomList.Builder<E> add(E $$0, int $$1) {
+ public Builder<E> 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 <T> WeightedEntry.Wrapper<T> wrap(T $$0, int $$1) {
+ static <T> Wrapper<T> wrap(T $$0, int $$1) {
return new Wrapper<>($$0, Weight.of($$1));
}
@@ -43,7 +43,7 @@
return this.weight;
}
- public static <E> Codec<WeightedEntry.Wrapper<E>> codec(Codec<E> $$0) {
+ public static <E> Codec<Wrapper<E>> codec(Codec<E> $$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<? extends AcquirePoi.JitteredLinearRetry>)(($$2x) -> new JitteredLinearRetry($$1.level.random, $$2)));
+ this.batchCache.computeIfAbsent($$8.asLong(), (Long2ObjectFunction<? extends JitteredLinearRetry>)(($$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<U> {
- protected final List<ShufflingList.WeightedEntry<U>> entries;
+ protected final List<WeightedEntry<U>> entries;
private final Random random = new Random();
public ShufflingList() {
- this.entries = Lists.<ShufflingList.WeightedEntry<U>>newArrayList();
+ this.entries = Lists.<WeightedEntry<U>>newArrayList();
}
- private ShufflingList(List<ShufflingList.WeightedEntry<U>> $$0) {
- this.entries = Lists.<ShufflingList.WeightedEntry<U>>newArrayList($$0);
+ private ShufflingList(List<WeightedEntry<U>> $$0) {
+ this.entries = Lists.<WeightedEntry<U>>newArrayList($$0);
}
public static <U> Codec<ShufflingList<U>> codec(Codec<U> $$0) {
@@ -76,14 +76,14 @@
return this.weight + ":" + this.data;
}
- public static <E> Codec<ShufflingList.WeightedEntry<E>> codec(final Codec<E> $$0) {
- return new Codec<ShufflingList.WeightedEntry<E>>() {
- public <T> DataResult<Pair<ShufflingList.WeightedEntry<E>, T>> decode(DynamicOps<T> $$0x, T $$1) {
+ public static <E> Codec<WeightedEntry<E>> codec(final Codec<E> $$0) {
+ return new Codec<WeightedEntry<E>>() {
+ public <T> DataResult<Pair<WeightedEntry<E>, T>> decode(DynamicOps<T> $$0x, T $$1) {
Dynamic<T> $$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 <T> DataResult<T> encode(ShufflingList.WeightedEntry<E> $$0x, DynamicOps<T> $$1, T $$2) {
+ public <T> DataResult<T> encode(WeightedEntry<E> $$0x, DynamicOps<T> $$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 <E extends LivingEntity> Brain.Provider<E> provider(Collection<? extends MemoryModuleType<?>> $$0, Collection<? extends SensorType<? extends Sensor<? super E>>> $$1) {
+ public static <E extends LivingEntity> Provider<E> provider(Collection<? extends MemoryModuleType<?>> $$0, Collection<? extends SensorType<? extends Sensor<? super E>>> $$1) {
return new Provider<>($$0, $$1);
}
@@ -65,17 +65,17 @@
}
public <T> DataResult<Brain<E>> decode(DynamicOps<T> $$0x, MapLike<T> $$1x) {
- MutableObject<DataResult<ImmutableList.Builder<Brain.MemoryValue<?>>>> $$2 = new MutableObject<>(DataResult.success(ImmutableList.builder()));
+ MutableObject<DataResult<ImmutableList.Builder<MemoryValue<?>>>> $$2 = new MutableObject<>(DataResult.success(ImmutableList.builder()));
$$1.entries().forEach(($$2xx) -> {
DataResult<MemoryModuleType<?>> $$3 = Registry.MEMORY_MODULE_TYPE.byNameCodec().parse($$0, (T)$$2xx.getFirst());
- DataResult<? extends Brain.MemoryValue<?>> $$4 = $$3.flatMap(($$2xxx) -> this.captureRead($$2xxx, $$0, (T)$$2xx.getSecond()));
+ DataResult<? extends MemoryValue<?>> $$4 = $$3.flatMap(($$2xxx) -> this.captureRead($$2xxx, $$0, (T)$$2xx.getSecond()));
$$2.setValue($$2.getValue().apply2(ImmutableList.Builder::add, $$4));
});
- ImmutableList<Brain.MemoryValue<?>> $$3 = (ImmutableList)$$2.getValue().resultOrPartial(Brain.LOGGER::error).map(ImmutableList.Builder::build).orElseGet(ImmutableList::of);
+ ImmutableList<MemoryValue<?>> $$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 <T, U> DataResult<Brain.MemoryValue<U>> captureRead(MemoryModuleType<U> $$0x, DynamicOps<T> $$1x, T $$2x) {
+ private <T, U> DataResult<MemoryValue<U>> captureRead(MemoryModuleType<U> $$0x, DynamicOps<T> $$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<? extends MemoryModuleType<?>> $$0, Collection<? extends SensorType<? extends Sensor<? super E>>> $$1, ImmutableList<Brain.MemoryValue<?>> $$2, Supplier<Codec<Brain<E>>> $$3) {
+ public Brain(Collection<? extends MemoryModuleType<?>> $$0, Collection<? extends SensorType<? extends Sensor<? super E>>> $$1, ImmutableList<MemoryValue<?>> $$2, Supplier<Codec<Brain<E>>> $$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<Brain.MemoryValue<?>> memories() {
+ Stream<MemoryValue<?>> memories() {
return this.memories.entrySet().stream().map(($$0) -> Brain.MemoryValue.createUnchecked((MemoryModuleType)$$0.getKey(), (Optional)$$0.getValue()));
}
@@ -437,7 +437,7 @@
private final MemoryModuleType<U> type;
private final Optional<? extends ExpirableValue<U>> value;
- static <U> Brain.MemoryValue<U> createUnchecked(MemoryModuleType<U> $$0, Optional<? extends ExpirableValue<?>> $$1) {
+ static <U> MemoryValue<U> createUnchecked(MemoryModuleType<U> $$0, Optional<? extends ExpirableValue<?>> $$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<Player> avoidPlayersGoal;
+ private CatAvoidEntityGoal<Player> 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<Boolean> DATA_TRUSTING = SynchedEntityData.defineId(Ocelot.class, EntityDataSerializers.BOOLEAN);
@Nullable
- private Ocelot.OcelotAvoidEntityGoal<Player> ocelotAvoidPlayersGoal;
+ private OcelotAvoidEntityGoal<Player> 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<ZombifiedPiglin> ZOMBIFIED_PIGLIN = register("zombified_piglin", EntityType.Builder.<ZombifiedPiglin>of(ZombifiedPiglin::new, MobCategory.MONSTER).fireImmune().sized(0.6F, 1.95F).clientTrackingRange(8));
public static final EntityType<Player> PLAYER = register("player", EntityType.Builder.<Player>createNothing(MobCategory.MISC).noSave().noSummon().sized(0.6F, 1.8F).clientTrackingRange(32).updateInterval(2));
public static final EntityType<FishingHook> FISHING_BOBBER = register("fishing_bobber", EntityType.Builder.<FishingHook>of(FishingHook::new, MobCategory.MISC).noSave().noSummon().sized(0.25F, 0.25F).clientTrackingRange(4).updateInterval(5));
- private final EntityType.EntityFactory<T> factory;
+ private final EntityFactory<T> factory;
private final MobCategory category;
private final ImmutableSet<Block> immuneTo;
private final boolean serialize;
@@ -283,7 +283,7 @@
private ResourceLocation lootTable;
private final EntityDimensions dimensions;
- private static <T extends Entity> EntityType<T> register(String $$0, EntityType.Builder<T> $$1) {
+ private static <T extends Entity> EntityType<T> register(String $$0, Builder<T> $$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<T> $$0, MobCategory $$1, boolean $$2, boolean $$3, boolean $$4, boolean $$5, ImmutableSet<Block> $$6, EntityDimensions $$7, int $$8, int $$9) {
+ public EntityType(EntityFactory<T> $$0, MobCategory $$1, boolean $$2, boolean $$3, boolean $$4, boolean $$5, ImmutableSet<Block> $$6, EntityDimensions $$7, int $$8, int $$9) {
this.factory = $$0;
this.category = $$1;
this.canSpawnFarFromPlayer = $$5;
@@ -567,7 +567,7 @@
}
public static class Builder<T extends Entity> {
- private final EntityType.EntityFactory<T> factory;
+ private final EntityFactory<T> factory;
private final MobCategory category;
private ImmutableSet<Block> 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<T> $$0, MobCategory $$1) {
+ private Builder(EntityFactory<T> $$0, MobCategory $$1) {
this.factory = $$0;
this.category = $$1;
this.canSpawnFarFromPlayer = $$1 == MobCategory.CREATURE || $$1 == MobCategory.MISC;
}
- public static <T extends Entity> EntityType.Builder<T> of(EntityType.EntityFactory<T> $$0, MobCategory $$1) {
+ public static <T extends Entity> Builder<T> of(EntityFactory<T> $$0, MobCategory $$1) {
return new Builder<>($$0, $$1);
}
- public static <T extends Entity> EntityType.Builder<T> createNothing(MobCategory $$0) {
+ public static <T extends Entity> Builder<T> createNothing(MobCategory $$0) {
return new Builder<>(($$0x, $$1) -> (T)null, $$0);
}
- public EntityType.Builder<T> sized(float $$0, float $$1) {
+ public Builder<T> sized(float $$0, float $$1) {
this.dimensions = EntityDimensions.scalable($$0, $$1);
return this;
}
- public EntityType.Builder<T> noSummon() {
+ public Builder<T> noSummon() {
this.summon = false;
return this;
}
- public EntityType.Builder<T> noSave() {
+ public Builder<T> noSave() {
this.serialize = false;
return this;
}
- public EntityType.Builder<T> fireImmune() {
+ public Builder<T> fireImmune() {
this.fireImmune = true;
return this;
}
- public EntityType.Builder<T> immuneTo(Block... $$0) {
+ public Builder<T> immuneTo(Block... $$0) {
this.immuneTo = ImmutableSet.copyOf($$0);
return this;
}
- public EntityType.Builder<T> canSpawnFarFromPlayer() {
+ public Builder<T> canSpawnFarFromPlayer() {
this.canSpawnFarFromPlayer = true;
return this;
}
- public EntityType.Builder<T> clientTrackingRange(int $$0) {
+ public Builder<T> clientTrackingRange(int $$0) {
this.clientTrackingRange = $$0;
return this;
}
- public EntityType.Builder<T> updateInterval(int $$0) {
+ public Builder<T> 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<EntityType<?>, Data> DATA_BY_TYPE = Maps.<EntityType<?>, Data>newHashMap();
- private static <T extends Mob> void register(EntityType<T> $$0, Type $$1, Heightmap.Types $$2, SpawnPlacements.SpawnPredicate<T> $$3) {
+ private static <T extends Mob> void register(EntityType<T> $$0, Type $$1, Heightmap.Types $$2, SpawnPredicate<T> $$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<SmokerMenu> SMOKER = register("smoker", SmokerMenu::new);
public static final MenuType<CartographyTableMenu> CARTOGRAPHY_TABLE = register("cartography_table", CartographyTableMenu::new);
public static final MenuType<StonecutterMenu> STONECUTTER = register("stonecutter", StonecutterMenu::new);
- private final MenuType.MenuSupplier<T> constructor;
+ private final MenuSupplier<T> constructor;
- private static <T extends AbstractContainerMenu> MenuType<T> register(String $$0, MenuType.MenuSupplier<T> $$1) {
+ private static <T extends AbstractContainerMenu> MenuType<T> register(String $$0, MenuSupplier<T> $$1) {
return Registry.register(Registry.MENU, $$0, new MenuType<>($$1));
}
- private MenuType(MenuType.MenuSupplier<T> $$0) {
+ private MenuType(MenuSupplier<T> $$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<PotionBrewing.Mix<Potion>> POTION_MIXES = Lists.<PotionBrewing.Mix<Potion>>newArrayList();
- private static final List<PotionBrewing.Mix<Item>> CONTAINER_MIXES = Lists.<PotionBrewing.Mix<Item>>newArrayList();
+ private static final List<Mix<Potion>> POTION_MIXES = Lists.<Mix<Potion>>newArrayList();
+ private static final List<Mix<Item>> CONTAINER_MIXES = Lists.<Mix<Item>>newArrayList();
private static final List<Ingredient> ALLOWED_CONTAINERS = Lists.<Ingredient>newArrayList();
private static final Predicate<ItemStack> 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<Item> $$5 = (Mix)CONTAINER_MIXES.get($$3);
+ Mix<Item> $$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<Potion> $$5 = (Mix)POTION_MIXES.get($$3);
+ Mix<Potion> $$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<Item> $$6 = (Mix)CONTAINER_MIXES.get($$4);
+ Mix<Item> $$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<Potion> $$9 = (Mix)POTION_MIXES.get($$4);
+ Mix<Potion> $$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<? extends Ingredient.Value> $$0) {
+ private Ingredient(Stream<? extends Value> $$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<? extends Ingredient.Value> $$0) {
+ private static Ingredient fromValues(Stream<? extends Value> $$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<T extends AbstractCookingRecipe> implements RecipeSerializer<T> {
private final int defaultCookingTime;
- private final SimpleCookingSerializer.CookieBaker<T> factory;
+ private final CookieBaker<T> factory;
- public SimpleCookingSerializer(SimpleCookingSerializer.CookieBaker<T> $$0, int $$1) {
+ public SimpleCookingSerializer(CookieBaker<T> $$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<T extends SingleItemRecipe> implements RecipeSerializer<T> {
- final SingleItemRecipe.Serializer.SingleItemMaker<T> factory;
+ final SingleItemMaker<T> factory;
- protected Serializer(SingleItemRecipe.Serializer.SingleItemMaker<T> $$0) {
+ protected Serializer(SingleItemMaker<T> $$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<T> {
- long distance(Climate.RTree.Node<T> var1, long[] var2);
+ long distance(RTree.Node<T> var1, long[] var2);
}
public static record Parameter(long min, long max) {
@@ -106,7 +106,7 @@
public static class ParameterList<T> {
private final List<Pair<ParameterPoint, T>> values;
- private final Climate.RTree<T> index;
+ private final RTree<T> index;
public ParameterList(List<Pair<ParameterPoint, T>> $$0) {
this.values = $$0;
@@ -144,7 +144,7 @@
return this.findValueIndex($$0, RTree.Node::distance);
}
- protected T findValueIndex(TargetPoint $$0, Climate.DistanceMetric<T> $$1) {
+ protected T findValueIndex(TargetPoint $$0, DistanceMetric<T> $$1) {
return this.index.search($$0, $$1);
}
}
@@ -163,14 +163,14 @@
protected static final class RTree<T> {
private static final int CHILDREN_PER_NODE = 10;
- private final Climate.RTree.Node<T> root;
- private final ThreadLocal<Climate.RTree.Leaf<T>> lastResult = new ThreadLocal();
+ private final Node<T> root;
+ private final ThreadLocal<Leaf<T>> lastResult = new ThreadLocal();
- private RTree(Climate.RTree.Node<T> $$0) {
+ private RTree(Node<T> $$0) {
this.root = $$0;
}
- public static <T> Climate.RTree<T> create(List<Pair<ParameterPoint, T>> $$0) {
+ public static <T> RTree<T> create(List<Pair<ParameterPoint, T>> $$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<Climate.RTree.Leaf<T>> $$2 = (List)$$0.stream().map(($$0x) -> new Leaf<>((ParameterPoint)$$0x.getFirst(), $$0x.getSecond())).collect(Collectors.toCollection(ArrayList::new));
+ List<Leaf<T>> $$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 <T> Climate.RTree.Node<T> build(int $$0, List<? extends Climate.RTree.Node<T>> $$1) {
+ private static <T> Node<T> build(int $$0, List<? extends Node<T>> $$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<Climate.RTree.SubTree<T>> $$4 = null;
+ List<SubTree<T>> $$4 = null;
for(int $$5 = 0; $$5 < $$0; ++$$5) {
sort($$1, $$0, $$5, false);
- List<Climate.RTree.SubTree<T>> $$6 = bucketize($$1);
+ List<SubTree<T>> $$6 = bucketize($$1);
long $$7 = 0L;
- for(Climate.RTree.SubTree<T> $$8 : $$6) {
+ for(SubTree<T> $$8 : $$6) {
$$7 += cost($$8.parameterSpace);
}
@@ -227,8 +227,8 @@
}
}
- private static <T> void sort(List<? extends Climate.RTree.Node<T>> $$0, int $$1, int $$2, boolean $$3) {
- Comparator<Climate.RTree.Node<T>> $$4 = comparator($$2, $$3);
+ private static <T> void sort(List<? extends Node<T>> $$0, int $$1, int $$2, boolean $$3) {
+ Comparator<Node<T>> $$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 <T> Comparator<Climate.RTree.Node<T>> comparator(int $$0, boolean $$1) {
+ private static <T> Comparator<Node<T>> 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 <T> List<Climate.RTree.SubTree<T>> bucketize(List<? extends Climate.RTree.Node<T>> $$0) {
- List<Climate.RTree.SubTree<T>> $$1 = Lists.<Climate.RTree.SubTree<T>>newArrayList();
- List<Climate.RTree.Node<T>> $$2 = Lists.<Climate.RTree.Node<T>>newArrayList();
+ private static <T> List<SubTree<T>> bucketize(List<? extends Node<T>> $$0) {
+ List<SubTree<T>> $$1 = Lists.<SubTree<T>>newArrayList();
+ List<Node<T>> $$2 = Lists.<Node<T>>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<T> $$4 : $$0) {
+ for(Node<T> $$4 : $$0) {
$$2.add($$4);
if ($$2.size() >= $$3) {
$$1.add(new SubTree($$2));
- $$2 = Lists.<Climate.RTree.Node<T>>newArrayList();
+ $$2 = Lists.<Node<T>>newArrayList();
}
}
@@ -275,7 +275,7 @@
return $$1;
}
- static <T> List<Parameter> buildParameterSpace(List<? extends Climate.RTree.Node<T>> $$0) {
+ static <T> List<Parameter> buildParameterSpace(List<? extends Node<T>> $$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<T> $$4 : $$0) {
+ for(Node<T> $$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<T> $$1) {
+ public T search(TargetPoint $$0, DistanceMetric<T> $$1) {
long[] $$2 = $$0.toParameterArray();
- Climate.RTree.Leaf<T> $$3 = this.root.search($$2, (Leaf)this.lastResult.get(), $$1);
+ Leaf<T> $$3 = this.root.search($$2, (Leaf)this.lastResult.get(), $$1);
this.lastResult.set($$3);
return $$3.value;
}
- static final class Leaf<T> extends Climate.RTree.Node<T> {
+ static final class Leaf<T> extends Node<T> {
final T value;
Leaf(ParameterPoint $$0, T $$1) {
@@ -311,7 +311,7 @@
this.value = $$1;
}
- protected Climate.RTree.Leaf<T> search(long[] $$0, @Nullable Climate.RTree.Leaf<T> $$1, Climate.DistanceMetric<T> $$2) {
+ protected Leaf<T> search(long[] $$0, @Nullable Leaf<T> $$1, DistanceMetric<T> $$2) {
return this;
}
}
@@ -323,7 +323,7 @@
this.parameterSpace = (Parameter[])$$0.toArray(new Parameter[0]);
}
- protected abstract Climate.RTree.Leaf<T> search(long[] var1, @Nullable Climate.RTree.Leaf<T> var2, Climate.DistanceMetric<T> var3);
+ protected abstract Leaf<T> search(long[] var1, @Nullable Leaf<T> var2, DistanceMetric<T> var3);
protected long distance(long[] $$0) {
long $$1 = 0L;
@@ -340,26 +340,26 @@
}
}
- static final class SubTree<T> extends Climate.RTree.Node<T> {
- final Climate.RTree.Node<T>[] children;
+ static final class SubTree<T> extends Node<T> {
+ final Node<T>[] children;
- protected SubTree(List<? extends Climate.RTree.Node<T>> $$0) {
+ protected SubTree(List<? extends Node<T>> $$0) {
this(Climate.RTree.buildParameterSpace($$0), $$0);
}
- protected SubTree(List<Parameter> $$0, List<? extends Climate.RTree.Node<T>> $$1) {
+ protected SubTree(List<Parameter> $$0, List<? extends Node<T>> $$1) {
super($$0);
this.children = (Node[])$$1.toArray(new Node[0]);
}
- protected Climate.RTree.Leaf<T> search(long[] $$0, @Nullable Climate.RTree.Leaf<T> $$1, Climate.DistanceMetric<T> $$2) {
+ protected Leaf<T> search(long[] $$0, @Nullable Leaf<T> $$1, DistanceMetric<T> $$2) {
long $$3 = $$1 == null ? Long.MAX_VALUE : $$2.distance($$1, $$0);
- Climate.RTree.Leaf<T> $$4 = $$1;
+ Leaf<T> $$4 = $$1;
- for(Climate.RTree.Node<T> $$5 : this.children) {
+ for(Node<T> $$5 : this.children) {
long $$6 = $$2.distance($$5, $$0);
if ($$3 > $$6) {
- Climate.RTree.Leaf<T> $$7 = $$5.search($$0, $$4, $$2);
+ Leaf<T> $$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 <S extends BlockEntity> DoubleBlockCombiner.NeighborCombineResult<S> combineWithNeigbour(BlockEntityType<S> $$0, Function<BlockState, BlockType> $$1, Function<BlockState, Direction> $$2, DirectionProperty $$3, BlockState $$4, LevelAccessor $$5, BlockPos $$6, BiPredicate<LevelAccessor, BlockPos> $$7) {
+ public static <S extends BlockEntity> NeighborCombineResult<S> combineWithNeigbour(BlockEntityType<S> $$0, Function<BlockState, BlockType> $$1, Function<BlockState, Direction> $$2, DirectionProperty $$3, BlockState $$4, LevelAccessor $$5, BlockPos $$6, BiPredicate<LevelAccessor, BlockPos> $$7) {
S $$8 = $$0.getBlockEntity($$5, $$6);
if ($$8 == null) {
return Combiner::acceptNone;
@@ -62,9 +62,9 @@
}
public interface NeighborCombineResult<S> {
- <T> T apply(DoubleBlockCombiner.Combiner<? super S, T> var1);
+ <T> T apply(Combiner<? super S, T> var1);
- public static final class Double<S> implements DoubleBlockCombiner.NeighborCombineResult<S> {
+ public static final class Double<S> implements NeighborCombineResult<S> {
private final S first;
private final S second;
@@ -73,19 +73,19 @@
this.second = $$1;
}
- public <T> T apply(DoubleBlockCombiner.Combiner<? super S, T> $$0) {
+ public <T> T apply(Combiner<? super S, T> $$0) {
return $$0.acceptDouble(this.first, this.second);
}
}
- public static final class Single<S> implements DoubleBlockCombiner.NeighborCombineResult<S> {
+ public static final class Single<S> implements NeighborCombineResult<S> {
private final S single;
public Single(S $$0) {
this.single = $$0;
}
- public <T> T apply(DoubleBlockCombiner.Combiner<? super S, T> $$0) {
+ public <T> T apply(Combiner<? super S, T> $$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<CampfireBlockEntity> CAMPFIRE = register("campfire", BlockEntityType.Builder.of(CampfireBlockEntity::new, Blocks.CAMPFIRE, Blocks.SOUL_CAMPFIRE));
public static final BlockEntityType<BeehiveBlockEntity> BEEHIVE = register("beehive", BlockEntityType.Builder.of(BeehiveBlockEntity::new, Blocks.BEE_NEST, Blocks.BEEHIVE));
public static final BlockEntityType<SculkSensorBlockEntity> SCULK_SENSOR = register("sculk_sensor", BlockEntityType.Builder.of(SculkSensorBlockEntity::new, Blocks.SCULK_SENSOR));
- private final BlockEntityType.BlockEntitySupplier<? extends T> factory;
+ private final BlockEntitySupplier<? extends T> factory;
private final Set<Block> validBlocks;
private final Type<?> dataType;
@@ -62,7 +62,7 @@
return Registry.BLOCK_ENTITY_TYPE.getKey($$0);
}
- private static <T extends BlockEntity> BlockEntityType<T> register(String $$0, BlockEntityType.Builder<T> $$1) {
+ private static <T extends BlockEntity> BlockEntityType<T> register(String $$0, Builder<T> $$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<? extends T> $$0, Set<Block> $$1, Type<?> $$2) {
+ public BlockEntityType(BlockEntitySupplier<? extends T> $$0, Set<Block> $$1, Type<?> $$2) {
this.factory = $$0;
this.validBlocks = $$1;
this.dataType = $$2;
@@ -98,15 +98,15 @@
}
public static final class Builder<T extends BlockEntity> {
- private final BlockEntityType.BlockEntitySupplier<? extends T> factory;
+ private final BlockEntitySupplier<? extends T> factory;
final Set<Block> validBlocks;
- private Builder(BlockEntityType.BlockEntitySupplier<? extends T> $$0, Set<Block> $$1) {
+ private Builder(BlockEntitySupplier<? extends T> $$0, Set<Block> $$1) {
this.factory = $$0;
this.validBlocks = $$1;
}
- public static <T extends BlockEntity> BlockEntityType.Builder<T> of(BlockEntityType.BlockEntitySupplier<? extends T> $$0, Block... $$1) {
+ public static <T extends BlockEntity> Builder<T> of(BlockEntitySupplier<? extends T> $$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<EntityType<?>> isValidSpawn = ($$0x, $$1x, $$2, $$3) -> $$0x.isFaceSturdy($$1x, $$2, Direction.UP) && $$0x.getLightEmission() < 14;
+ StateArgumentPredicate<EntityType<?>> 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<EntityType<?>> $$0) {
+ public Properties isValidSpawn(StateArgumentPredicate<EntityType<?>> $$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<T> 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<Property.Value<T>> valueCodec = this.codec.xmap(this::value, Value::value);
+ private final Codec<Value<T>> valueCodec = this.codec.xmap(this::value, Value::value);
protected Property(String $$0, Class<T> $$1) {
this.clazz = $$1;
this.name = $$0;
}
- public Property.Value<T> value(T $$0) {
+ public Value<T> value(T $$0) {
return new Value<>(this, $$0);
}
- public Property.Value<T> value(StateHolder<?, ?> $$0) {
+ public Value<T> value(StateHolder<?, ?> $$0) {
return new Value<>(this, $$0.getValue(this));
}
- public Stream<Property.Value<T>> getAllValues() {
+ public Stream<Value<T>> getAllValues() {
return this.getPossibleValues().stream().map(this::value);
}
@@ -39,7 +39,7 @@
return this.codec;
}
- public Codec<Property.Value<T>> valueCodec() {
+ public Codec<Value<T>> 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<String, Property<?>> propertiesByName;
private final ImmutableList<S> states;
- protected StateDefinition(Function<O, S> $$0, O $$1, StateDefinition.Factory<O, S> $$2, Map<String, Property<?>> $$3) {
+ protected StateDefinition(Function<O, S> $$0, O $$1, Factory<O, S> $$2, Map<String, Property<?>> $$3) {
this.owner = $$1;
this.propertiesByName = ImmutableSortedMap.copyOf($$3);
Supplier<S> $$4 = () -> (StateHolder)$$0.apply($$1);
@@ -105,7 +105,7 @@
this.owner = $$0;
}
- public StateDefinition.Builder<O, S> add(Property<?>... $$0) {
+ public Builder<O, S> add(Property<?>... $$0) {
for(Property<?> $$1 : $$0) {
this.validateProperty($$1);
this.properties.put($$1.getName(), $$1);
@@ -137,7 +137,7 @@
}
}
- public StateDefinition<O, S> create(Function<O, S> $$0, StateDefinition.Factory<O, S> $$1) {
+ public StateDefinition<O, S> create(Function<O, S> $$0, Factory<O, S> $$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<T> dummyPaletteResize = ($$0x, $$1x) -> 0;
private final IdMap<T> registry;
- private volatile PalettedContainer.Data<T> data;
+ private volatile Data<T> 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<T> $$0, Strategy $$1, PalettedContainer.Configuration<T> $$2, BitStorage $$3, List<T> $$4) {
+ public PalettedContainer(IdMap<T> $$0, Strategy $$1, Configuration<T> $$2, BitStorage $$3, List<T> $$4) {
this.registry = $$0;
this.strategy = $$1;
this.data = new Data<>($$2, $$3, $$2.factory().create($$2.bits(), $$0, this, $$4));
}
- private PalettedContainer(IdMap<T> $$0, Strategy $$1, PalettedContainer.Data<T> $$2) {
+ private PalettedContainer(IdMap<T> $$0, Strategy $$1, Data<T> $$2) {
this.registry = $$0;
this.strategy = $$1;
this.data = $$2;
@@ -58,18 +58,18 @@
public PalettedContainer(IdMap<T> $$0, T $$1, Strategy $$2) {
this.strategy = $$2;
this.registry = $$0;
- this.data = this.createOrReuseData((PalettedContainer.Data<T>)null, 0);
+ this.data = this.createOrReuseData((Data<T>)null, 0);
this.data.palette.idFor($$1);
}
- private PalettedContainer.Data<T> createOrReuseData(@Nullable PalettedContainer.Data<T> $$0, int $$1) {
- PalettedContainer.Configuration<T> $$2 = this.strategy.getConfiguration(this.registry, $$1);
+ private Data<T> createOrReuseData(@Nullable Data<T> $$0, int $$1) {
+ Configuration<T> $$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<T> $$2 = this.data;
- PalettedContainer.Data<T> $$3 = this.createOrReuseData($$2, $$0);
+ Data<T> $$2 = this.data;
+ Data<T> $$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<T> $$1 = this.data;
+ Data<T> $$1 = this.data;
return $$1.palette.valueFor($$1.storage.get($$0));
}
@@ -135,7 +135,7 @@
try {
int $$1 = $$0.readByte();
- PalettedContainer.Data<T> $$2 = this.createOrReuseData(this.data, $$1);
+ Data<T> $$2 = this.createOrReuseData(this.data, $$1);
$$2.palette.read($$0);
$$0.readLongArray($$2.storage.getRaw());
this.data = $$2;
@@ -156,11 +156,11 @@
}
- private static <T> DataResult<PalettedContainer<T>> read(IdMap<T> $$0, Strategy $$1, PalettedContainer.DiscData<T> $$2) {
+ private static <T> DataResult<PalettedContainer<T>> read(IdMap<T> $$0, Strategy $$1, DiscData<T> $$2) {
List<T> $$3 = $$2.paletteEntries();
int $$4 = $$1.size();
int $$5 = $$1.calculateBitsForSerialization($$0, $$3.size());
- PalettedContainer.Configuration<T> $$6 = $$1.getConfiguration($$0, $$5);
+ Configuration<T> $$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<T> write(IdMap<T> $$0, Strategy $$1) {
+ private DiscData<T> write(IdMap<T> $$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<T> $$0) {
+ public void count(CountConsumer<T> $$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<T>(Palette.Factory factory, int bits) {
- public PalettedContainer.Data<T> createData(IdMap<T> $$0, PaletteResize<T> $$1, int $$2) {
+ public Data<T> createData(IdMap<T> $$0, PaletteResize<T> $$1, int $$2) {
BitStorage $$3 = (BitStorage)(this.bits == 0 ? new ZeroBitStorage($$2) : new SimpleBitStorage(this.bits, $$2));
Palette<T> $$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<T>(PalettedContainer.Configuration<T> configuration, BitStorage storage, Palette<T> palette) {
+ static record Data<T>(Configuration<T> configuration, BitStorage storage, Palette<T> palette) {
public void copyFrom(Palette<T> $$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 <A> PalettedContainer.Configuration<A> getConfiguration(IdMap<A> $$0, int $$1) {
+ public <A> Configuration<A> getConfiguration(IdMap<A> $$0, int $$1) {
Configuration var10000;
switch ($$1) {
case 0:
@@ -324,7 +324,7 @@
}
};
public static final Strategy SECTION_BIOMES = new Strategy(2) {
- public <A> PalettedContainer.Configuration<A> getConfiguration(IdMap<A> $$0, int $$1) {
+ public <A> Configuration<A> getConfiguration(IdMap<A> $$0, int $$1) {
Configuration var10000;
switch ($$1) {
case 0:
@@ -356,11 +356,11 @@
return ($$1 << this.sizeBits | $$2) << this.sizeBits | $$0;
}
- public abstract <A> PalettedContainer.Configuration<A> getConfiguration(IdMap<A> var1, int var2);
+ public abstract <A> Configuration<A> getConfiguration(IdMap<A> var1, int var2);
<A> int calculateBitsForSerialization(IdMap<A> $$0, int $$1) {
int $$2 = Mth.ceillog2($$1);
- PalettedContainer.Configuration<A> $$3 = this.getConfiguration($$0, $$2);
+ Configuration<A> $$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<InputStream> inputWrapper;
- private final RegionFileVersion.StreamWrapper<OutputStream> outputWrapper;
+ private final StreamWrapper<InputStream> inputWrapper;
+ private final StreamWrapper<OutputStream> outputWrapper;
- private RegionFileVersion(int $$0, RegionFileVersion.StreamWrapper<InputStream> $$1, RegionFileVersion.StreamWrapper<OutputStream> $$2) {
+ private RegionFileVersion(int $$0, StreamWrapper<InputStream> $$1, StreamWrapper<OutputStream> $$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.Key<?>, GameRules.Type<?>> GAME_RULE_TYPES = Maps.newTreeMap(Comparator.comparing(($$0) -> $$0.id));
- public static final GameRules.Key<BooleanValue> RULE_DOFIRETICK = register("doFireTick", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_MOBGRIEFING = register("mobGriefing", GameRules.Category.MOBS, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_KEEPINVENTORY = register("keepInventory", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false));
- public static final GameRules.Key<BooleanValue> RULE_DOMOBSPAWNING = register("doMobSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DOMOBLOOT = register("doMobLoot", GameRules.Category.DROPS, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DOBLOCKDROPS = register("doTileDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DOENTITYDROPS = register("doEntityDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_COMMANDBLOCKOUTPUT = register("commandBlockOutput", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_NATURAL_REGENERATION = register("naturalRegeneration", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DAYLIGHT = register("doDaylightCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_LOGADMINCOMMANDS = register("logAdminCommands", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_SHOWDEATHMESSAGES = register("showDeathMessages", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<IntegerValue> RULE_RANDOMTICKING = register("randomTickSpeed", GameRules.Category.UPDATES, GameRules.IntegerValue.create(3));
- public static final GameRules.Key<BooleanValue> RULE_SENDCOMMANDFEEDBACK = register("sendCommandFeedback", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_REDUCEDDEBUGINFO = register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, ($$0, $$1) -> {
+ private static final Map<Key<?>, Type<?>> GAME_RULE_TYPES = Maps.newTreeMap(Comparator.comparing(($$0) -> $$0.id));
+ public static final Key<BooleanValue> RULE_DOFIRETICK = register("doFireTick", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_MOBGRIEFING = register("mobGriefing", GameRules.Category.MOBS, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_KEEPINVENTORY = register("keepInventory", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false));
+ public static final Key<BooleanValue> RULE_DOMOBSPAWNING = register("doMobSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DOMOBLOOT = register("doMobLoot", GameRules.Category.DROPS, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DOBLOCKDROPS = register("doTileDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DOENTITYDROPS = register("doEntityDrops", GameRules.Category.DROPS, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_COMMANDBLOCKOUTPUT = register("commandBlockOutput", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_NATURAL_REGENERATION = register("naturalRegeneration", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DAYLIGHT = register("doDaylightCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_LOGADMINCOMMANDS = register("logAdminCommands", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_SHOWDEATHMESSAGES = register("showDeathMessages", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
+ public static final Key<IntegerValue> RULE_RANDOMTICKING = register("randomTickSpeed", GameRules.Category.UPDATES, GameRules.IntegerValue.create(3));
+ public static final Key<BooleanValue> RULE_SENDCOMMANDFEEDBACK = register("sendCommandFeedback", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> 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<BooleanValue> RULE_SPECTATORSGENERATECHUNKS = register("spectatorsGenerateChunks", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<IntegerValue> RULE_SPAWN_RADIUS = register("spawnRadius", GameRules.Category.PLAYER, GameRules.IntegerValue.create(10));
- public static final GameRules.Key<BooleanValue> RULE_DISABLE_ELYTRA_MOVEMENT_CHECK = register("disableElytraMovementCheck", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false));
- public static final GameRules.Key<IntegerValue> RULE_MAX_ENTITY_CRAMMING = register("maxEntityCramming", GameRules.Category.MOBS, GameRules.IntegerValue.create(24));
- public static final GameRules.Key<BooleanValue> RULE_WEATHER_CYCLE = register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false));
- public static final GameRules.Key<IntegerValue> RULE_MAX_COMMAND_CHAIN_LENGTH = register("maxCommandChainLength", GameRules.Category.MISC, GameRules.IntegerValue.create(65536));
- public static final GameRules.Key<BooleanValue> RULE_ANNOUNCE_ADVANCEMENTS = register("announceAdvancements", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DISABLE_RAIDS = register("disableRaids", GameRules.Category.MOBS, GameRules.BooleanValue.create(false));
- public static final GameRules.Key<BooleanValue> RULE_DOINSOMNIA = register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DO_IMMEDIATE_RESPAWN = register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, ($$0, $$1) -> {
+ public static final Key<BooleanValue> RULE_SPECTATORSGENERATECHUNKS = register("spectatorsGenerateChunks", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
+ public static final Key<IntegerValue> RULE_SPAWN_RADIUS = register("spawnRadius", GameRules.Category.PLAYER, GameRules.IntegerValue.create(10));
+ public static final Key<BooleanValue> RULE_DISABLE_ELYTRA_MOVEMENT_CHECK = register("disableElytraMovementCheck", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false));
+ public static final Key<IntegerValue> RULE_MAX_ENTITY_CRAMMING = register("maxEntityCramming", GameRules.Category.MOBS, GameRules.IntegerValue.create(24));
+ public static final Key<BooleanValue> RULE_WEATHER_CYCLE = register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false));
+ public static final Key<IntegerValue> RULE_MAX_COMMAND_CHAIN_LENGTH = register("maxCommandChainLength", GameRules.Category.MISC, GameRules.IntegerValue.create(65536));
+ public static final Key<BooleanValue> RULE_ANNOUNCE_ADVANCEMENTS = register("announceAdvancements", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DISABLE_RAIDS = register("disableRaids", GameRules.Category.MOBS, GameRules.BooleanValue.create(false));
+ public static final Key<BooleanValue> RULE_DOINSOMNIA = register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> 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<BooleanValue> RULE_DROWNING_DAMAGE = register("drowningDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_FALL_DAMAGE = register("fallDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_FIRE_DAMAGE = register("fireDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_FREEZE_DAMAGE = register("freezeDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DO_PATROL_SPAWNING = register("doPatrolSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_DO_TRADER_SPAWNING = register("doTraderSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_FORGIVE_DEAD_PLAYERS = register("forgiveDeadPlayers", GameRules.Category.MOBS, GameRules.BooleanValue.create(true));
- public static final GameRules.Key<BooleanValue> RULE_UNIVERSAL_ANGER = register("universalAnger", GameRules.Category.MOBS, GameRules.BooleanValue.create(false));
- public static final GameRules.Key<IntegerValue> RULE_PLAYERS_SLEEPING_PERCENTAGE = register("playersSleepingPercentage", GameRules.Category.PLAYER, GameRules.IntegerValue.create(100));
- private final Map<GameRules.Key<?>, GameRules.Value<?>> rules;
-
- private static <T extends GameRules.Value<T>> GameRules.Key<T> register(String $$0, Category $$1, GameRules.Type<T> $$2) {
- GameRules.Key<T> $$3 = new Key<>($$0, $$1);
- GameRules.Type<?> $$4 = (Type)GAME_RULE_TYPES.put($$3, $$2);
+ public static final Key<BooleanValue> RULE_DROWNING_DAMAGE = register("drowningDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_FALL_DAMAGE = register("fallDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_FIRE_DAMAGE = register("fireDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_FREEZE_DAMAGE = register("freezeDamage", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DO_PATROL_SPAWNING = register("doPatrolSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_DO_TRADER_SPAWNING = register("doTraderSpawning", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_FORGIVE_DEAD_PLAYERS = register("forgiveDeadPlayers", GameRules.Category.MOBS, GameRules.BooleanValue.create(true));
+ public static final Key<BooleanValue> RULE_UNIVERSAL_ANGER = register("universalAnger", GameRules.Category.MOBS, GameRules.BooleanValue.create(false));
+ public static final Key<IntegerValue> RULE_PLAYERS_SLEEPING_PERCENTAGE = register("playersSleepingPercentage", GameRules.Category.PLAYER, GameRules.IntegerValue.create(100));
+ private final Map<Key<?>, Value<?>> rules;
+
+ private static <T extends Value<T>> Key<T> register(String $$0, Category $$1, Type<T> $$2) {
+ Key<T> $$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.Key<?>, GameRules.Value<?>> $$0) {
+ private GameRules(Map<Key<?>, Value<?>> $$0) {
this.rules = $$0;
}
- public <T extends GameRules.Value<T>> T getRule(GameRules.Key<T> $$0) {
+ public <T extends Value<T>> T getRule(Key<T> $$0) {
return (T)(this.rules.get($$0));
}
@@ -122,7 +122,7 @@
GAME_RULE_TYPES.forEach(($$1, $$2) -> callVisitorCap($$0, $$1, $$2));
}
- private static <T extends GameRules.Value<T>> void callVisitorCap(GameRuleTypeVisitor $$0, GameRules.Key<?> $$1, GameRules.Type<?> $$2) {
+ private static <T extends Value<T>> 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 <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> $$0, GameRules $$1, @Nullable MinecraftServer $$2) {
+ private <T extends Value<T>> void assignCap(Key<T> $$0, GameRules $$1, @Nullable MinecraftServer $$2) {
T $$3 = $$1.getRule($$0);
this.<T>getRule($$0).setFrom($$3, $$2);
}
- public boolean getBoolean(GameRules.Key<BooleanValue> $$0) {
+ public boolean getBoolean(Key<BooleanValue> $$0) {
return this.getRule($$0).get();
}
- public int getInt(GameRules.Key<IntegerValue> $$0) {
+ public int getInt(Key<IntegerValue> $$0) {
return this.getRule($$0).get();
}
- public static class BooleanValue extends GameRules.Value<BooleanValue> {
+ public static class BooleanValue extends Value<BooleanValue> {
private boolean value;
- static GameRules.Type<BooleanValue> create(boolean $$0, BiConsumer<MinecraftServer, BooleanValue> $$1) {
+ static Type<BooleanValue> create(boolean $$0, BiConsumer<MinecraftServer, BooleanValue> $$1) {
return new Type<>(BoolArgumentType::bool, ($$1x) -> new BooleanValue($$1x, $$0), $$1, GameRuleTypeVisitor::visitBoolean);
}
- static GameRules.Type<BooleanValue> create(boolean $$0) {
+ static Type<BooleanValue> create(boolean $$0) {
return create($$0, ($$0x, $$1) -> {
});
}
- public BooleanValue(GameRules.Type<BooleanValue> $$0, boolean $$1) {
+ public BooleanValue(Type<BooleanValue> $$0, boolean $$1) {
super($$0);
this.value = $$1;
}
@@ -221,29 +221,29 @@
}
public interface GameRuleTypeVisitor {
- default <T extends GameRules.Value<T>> void visit(GameRules.Key<T> $$0, GameRules.Type<T> $$1) {
+ default <T extends Value<T>> void visit(Key<T> $$0, Type<T> $$1) {
}
- default void visitBoolean(GameRules.Key<BooleanValue> $$0, GameRules.Type<BooleanValue> $$1) {
+ default void visitBoolean(Key<BooleanValue> $$0, Type<BooleanValue> $$1) {
}
- default void visitInteger(GameRules.Key<IntegerValue> $$0, GameRules.Type<IntegerValue> $$1) {
+ default void visitInteger(Key<IntegerValue> $$0, Type<IntegerValue> $$1) {
}
}
- public static class IntegerValue extends GameRules.Value<IntegerValue> {
+ public static class IntegerValue extends Value<IntegerValue> {
private int value;
- private static GameRules.Type<IntegerValue> create(int $$0, BiConsumer<MinecraftServer, IntegerValue> $$1) {
+ private static Type<IntegerValue> create(int $$0, BiConsumer<MinecraftServer, IntegerValue> $$1) {
return new Type<>(IntegerArgumentType::integer, ($$1x) -> new IntegerValue($$1x, $$0), $$1, GameRuleTypeVisitor::visitInteger);
}
- static GameRules.Type<IntegerValue> create(int $$0) {
+ static Type<IntegerValue> create(int $$0) {
return create($$0, ($$0x, $$1) -> {
});
}
- public IntegerValue(GameRules.Type<IntegerValue> $$0, int $$1) {
+ public IntegerValue(Type<IntegerValue> $$0, int $$1) {
super($$0);
this.value = $$1;
}
@@ -308,7 +308,7 @@
}
}
- public static final class Key<T extends GameRules.Value<T>> {
+ public static final class Key<T extends Value<T>> {
final String id;
private final Category category;
@@ -346,13 +346,13 @@
}
}
- public static class Type<T extends GameRules.Value<T>> {
+ public static class Type<T extends Value<T>> {
private final Supplier<ArgumentType<?>> argument;
- private final Function<GameRules.Type<T>, T> constructor;
+ private final Function<Type<T>, T> constructor;
final BiConsumer<MinecraftServer, T> callback;
- private final GameRules.VisitorCaller<T> visitorCaller;
+ private final VisitorCaller<T> visitorCaller;
- Type(Supplier<ArgumentType<?>> $$0, Function<GameRules.Type<T>, T> $$1, BiConsumer<MinecraftServer, T> $$2, GameRules.VisitorCaller<T> $$3) {
+ Type(Supplier<ArgumentType<?>> $$0, Function<Type<T>, T> $$1, BiConsumer<MinecraftServer, T> $$2, VisitorCaller<T> $$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<T> $$1) {
+ public void callVisitor(GameRuleTypeVisitor $$0, Key<T> $$1) {
this.visitorCaller.call($$0, $$1, this);
}
}
- public abstract static class Value<T extends GameRules.Value<T>> {
- protected final GameRules.Type<T> type;
+ public abstract static class Value<T extends Value<T>> {
+ protected final Type<T> type;
- public Value(GameRules.Type<T> $$0) {
+ public Value(Type<T> $$0) {
this.type = $$0;
}
@@ -410,7 +410,7 @@
public abstract void setFrom(T var1, @Nullable MinecraftServer var2);
}
- interface VisitorCaller<T extends GameRules.Value<T>> {
- void call(GameRuleTypeVisitor var1, GameRules.Key<T> var2, GameRules.Type<T> var3);
+ interface VisitorCaller<T extends Value<T>> {
+ void call(GameRuleTypeVisitor var1, Key<T> var2, Type<T> 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<? extends NetherBridgePieces.NetherBridgePiece> $$8 = $$0.pieceClass;
+ Class<? extends NetherBridgePiece> $$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<? extends NetherBridgePieces.NetherBridgePiece> pieceClass;
+ public final Class<? extends NetherBridgePiece> pieceClass;
public final int weight;
public int placeCount;
public final int maxPlaceCount;
public final boolean allowInRow;
- public PieceWeight(Class<? extends NetherBridgePieces.NetherBridgePiece> $$0, int $$1, int $$2, boolean $$3) {
+ public PieceWeight(Class<? extends NetherBridgePiece> $$0, int $$1, int $$2, boolean $$3) {
this.pieceClass = $$0;
this.weight = $$1;
this.maxPlaceCount = $$2;
this.allowInRow = $$3;
}
- public PieceWeight(Class<? extends NetherBridgePieces.NetherBridgePiece> $$0, int $$1, int $$2) {
+ public PieceWeight(Class<? extends NetherBridgePiece> $$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<C extends FeatureConfiguration> {
- void generatePieces(StructurePiecesBuilder var1, PieceGenerator.Context<C> var2);
+ void generatePieces(StructurePiecesBuilder var1, Context<C> var2);
public static record Context<C extends FeatureConfiguration>(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<C extends FeatureConfiguration> {
- Optional<PieceGenerator<C>> createGenerator(PieceGeneratorSupplier.Context<C> var1);
+ Optional<PieceGenerator<C>> createGenerator(Context<C> var1);
- static <C extends FeatureConfiguration> PieceGeneratorSupplier<C> simple(Predicate<PieceGeneratorSupplier.Context<C>> $$0, PieceGenerator<C> $$1) {
+ static <C extends FeatureConfiguration> PieceGeneratorSupplier<C> simple(Predicate<Context<C>> $$0, PieceGenerator<C> $$1) {
Optional<PieceGenerator<C>> $$2 = Optional.of($$1);
return ($$2x) -> $$0.test($$2x) ? $$2 : Optional.empty();
}
- static <C extends FeatureConfiguration> Predicate<PieceGeneratorSupplier.Context<C>> checkForBiomeOnTop(Heightmap.Types $$0) {
+ static <C extends FeatureConfiguration> Predicate<Context<C>> 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<PieceWeight> currentPieces;
- static Class<? extends StrongholdPieces.StrongholdPiece> imposedPiece;
+ static Class<? extends StrongholdPiece> imposedPiece;
private static int totalWeight;
static final SmoothStoneSelector SMOOTH_STONE_SELECTOR = new SmoothStoneSelector();
@@ -79,7 +79,7 @@
return $$0;
}
- private static StrongholdPiece findAndCreatePieceFactory(Class<? extends StrongholdPieces.StrongholdPiece> $$0, StructurePieceAccessor $$1, Random $$2, int $$3, int $$4, int $$5, @Nullable Direction $$6, int $$7) {
+ private static StrongholdPiece findAndCreatePieceFactory(Class<? extends StrongholdPiece> $$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<? extends StrongholdPieces.StrongholdPiece> pieceClass;
+ public final Class<? extends StrongholdPiece> pieceClass;
public final int weight;
public int placeCount;
public final int maxPlaceCount;
- public PieceWeight(Class<? extends StrongholdPieces.StrongholdPiece> $$0, int $$1, int $$2) {
+ public PieceWeight(Class<? extends StrongholdPiece> $$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<AbovePreliminarySurface> CODEC = Codec.unit(INSTANCE);
- public Codec<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -136,7 +136,7 @@
static final Codec<Bandlands> CODEC = Codec.unit(INSTANCE);
- public Codec<? extends SurfaceRules.RuleSource> codec() {
+ public Codec<? extends RuleSource> codec() {
return CODEC;
}
@@ -155,7 +155,7 @@
this.biomeNameTest = Set.copyOf($$0)::contains;
}
- public Codec<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -200,7 +200,7 @@
this($$0, new StateRule($$0));
}
- public Codec<? extends SurfaceRules.RuleSource> codec() {
+ public Codec<? extends RuleSource> codec() {
return CODEC;
}
@@ -216,7 +216,7 @@
public interface ConditionSource extends Function<Context, Condition> {
Codec<ConditionSource> CODEC = Registry.CONDITION.byNameCodec().dispatch(ConditionSource::codec, Function.identity());
- static Codec<? extends SurfaceRules.ConditionSource> bootstrap(Registry<Codec<? extends SurfaceRules.ConditionSource>> $$0) {
+ static Codec<? extends ConditionSource> bootstrap(Registry<Codec<? extends ConditionSource>> $$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<? extends SurfaceRules.ConditionSource> codec();
+ Codec<? extends ConditionSource> codec();
}
protected static final class Context {
@@ -385,7 +385,7 @@
static final Codec<Hole> CODEC = Codec.unit(INSTANCE);
- public Codec<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -448,7 +448,7 @@
static record NoiseThresholdConditionSource(ResourceKey<NormalNoise.NoiseParameters> noise, double minThreshold, double maxThreshold) implements ConditionSource {
static final Codec<NoiseThresholdConditionSource> 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<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -479,7 +479,7 @@
static record NotConditionSource(ConditionSource target) implements ConditionSource {
static final Codec<NotConditionSource> CODEC = SurfaceRules.ConditionSource.CODEC.<NotConditionSource>xmap(NotConditionSource::new, NotConditionSource::target).fieldOf("invert").codec();
- public Codec<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -491,14 +491,14 @@
public interface RuleSource extends Function<Context, SurfaceRule> {
Codec<RuleSource> CODEC = Registry.RULE.byNameCodec().dispatch(RuleSource::codec, Function.identity());
- static Codec<? extends SurfaceRules.RuleSource> bootstrap(Registry<Codec<? extends SurfaceRules.RuleSource>> $$0) {
+ static Codec<? extends RuleSource> bootstrap(Registry<Codec<? extends RuleSource>> $$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<? extends SurfaceRules.RuleSource> codec();
+ Codec<? extends RuleSource> codec();
}
static record SequenceRule(List<SurfaceRule> rules) implements SurfaceRule {
@@ -518,7 +518,7 @@
static record SequenceRuleSource(List<RuleSource> sequence) implements RuleSource {
static final Codec<SequenceRuleSource> CODEC = SurfaceRules.RuleSource.CODEC.listOf().<SequenceRuleSource>xmap(SequenceRuleSource::new, SequenceRuleSource::sequence).fieldOf("sequence").codec();
- public Codec<? extends SurfaceRules.RuleSource> codec() {
+ public Codec<? extends RuleSource> codec() {
return CODEC;
}
@@ -548,7 +548,7 @@
static final Codec<Steep> CODEC = Codec.unit(INSTANCE);
- public Codec<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -560,7 +560,7 @@
static record StoneDepthCheck(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType) implements ConditionSource {
static final Codec<StoneDepthCheck> 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<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -594,7 +594,7 @@
static final Codec<Temperature> CODEC = Codec.unit(INSTANCE);
- public Codec<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -613,7 +613,7 @@
static record TestRuleSource(ConditionSource ifTrue, RuleSource thenRun) implements RuleSource {
static final Codec<TestRuleSource> 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<? extends SurfaceRules.RuleSource> codec() {
+ public Codec<? extends RuleSource> codec() {
return CODEC;
}
@@ -625,7 +625,7 @@
static record VerticalGradientConditionSource(ResourceLocation randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) implements ConditionSource {
static final Codec<VerticalGradientConditionSource> 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<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -660,7 +660,7 @@
static record WaterConditionSource(int offset, int surfaceDepthMultiplier, boolean addStoneDepth) implements ConditionSource {
static final Codec<WaterConditionSource> 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<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> codec() {
return CODEC;
}
@@ -682,7 +682,7 @@
static record YConditionSource(VerticalAnchor anchor, int surfaceDepthMultiplier, boolean addStoneDepth) implements ConditionSource {
static final Codec<YConditionSource> 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<? extends SurfaceRules.ConditionSource> codec() {
+ public Codec<? extends ConditionSource> 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 <T extends CompositeEntryBase> LootPoolEntryContainer.Serializer<T> createSerializer(final CompositeEntryBase.CompositeEntryConstructor<T> $$0) {
+ public static <T extends CompositeEntryBase> LootPoolEntryContainer.Serializer<T> createSerializer(final CompositeEntryConstructor<T> $$0) {
return new LootPoolEntryContainer.Serializer<T>() {
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<T extends LootPoolEntryContainer.Builder<T>> implements ConditionUserBuilder<T> {
+ public abstract static class Builder<T extends Builder<T>> implements ConditionUserBuilder<T> {
private final List<LootItemCondition> conditions = Lists.<LootItemCondition>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<T extends LootPoolSingletonContainer.Builder<T>> extends LootPoolEntryContainer.Builder<T> implements FunctionUserBuilder<T> {
+ public abstract static class Builder<T extends Builder<T>> extends LootPoolEntryContainer.Builder<T> implements FunctionUserBuilder<T> {
protected int weight = 1;
protected int quality = 0;
private final List<LootItemFunction> functions = Lists.<LootItemFunction>newArrayList();
@@ -88,7 +88,7 @@
}
}
- static class DummyBuilder extends LootPoolSingletonContainer.Builder<DummyBuilder> {
+ static class DummyBuilder extends Builder<DummyBuilder> {
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<LootItemCondition[], LootItemFunction> $$0) {
+ protected static Builder<?> simpleBuilder(Function<LootItemCondition[], LootItemFunction> $$0) {
return new DummyBuilder($$0);
}
- public abstract static class Builder<T extends LootItemConditionalFunction.Builder<T>> implements LootItemFunction.Builder, ConditionUserBuilder<T> {
+ public abstract static class Builder<T extends Builder<T>> implements LootItemFunction.Builder, ConditionUserBuilder<T> {
private final List<LootItemCondition> conditions = Lists.<LootItemCondition>newArrayList();
public T when(LootItemCondition.Builder $$0) {
@@ -63,7 +63,7 @@
}
}
- static final class DummyBuilder extends LootItemConditionalFunction.Builder<DummyBuilder> {
+ static final class DummyBuilder extends Builder<DummyBuilder> {
private final Function<LootItemCondition[], LootItemFunction> constructor;
public DummyBuilder(Function<LootItemCondition[], LootItemFunction> $$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 <E, T extends SerializerType<E>> GsonAdapterFactory.Builder<E, T> builder(Registry<T> $$0, String $$1, String $$2, Function<E, T> $$3) {
+ public static <E, T extends SerializerType<E>> Builder<E, T> builder(Registry<T> $$0, String $$1, String $$2, Function<E, T> $$3) {
return new Builder<>($$0, $$1, $$2, $$3);
}
@@ -27,7 +27,7 @@
private final String typeKey;
private final Function<E, T> typeGetter;
@Nullable
- private Pair<T, GsonAdapterFactory.InlineSerializer<? extends E>> inlineType;
+ private Pair<T, InlineSerializer<? extends E>> inlineType;
@Nullable
private T defaultType;
@@ -38,12 +38,12 @@
this.typeGetter = $$3;
}
- public GsonAdapterFactory.Builder<E, T> withInlineSerializer(T $$0, GsonAdapterFactory.InlineSerializer<? extends E> $$1) {
+ public Builder<E, T> withInlineSerializer(T $$0, InlineSerializer<? extends E> $$1) {
this.inlineType = Pair.of($$0, $$1);
return this;
}
- public GsonAdapterFactory.Builder<E, T> withDefaultType(T $$0) {
+ public Builder<E, T> withDefaultType(T $$0) {
this.defaultType = $$0;
return this;
}
@@ -67,9 +67,9 @@
@Nullable
private final T defaultType;
@Nullable
- private final Pair<T, GsonAdapterFactory.InlineSerializer<? extends E>> inlineType;
+ private final Pair<T, InlineSerializer<? extends E>> inlineType;
- JsonAdapter(Registry<T> $$0, String $$1, String $$2, Function<E, T> $$3, @Nullable T $$4, @Nullable Pair<T, GsonAdapterFactory.InlineSerializer<? extends E>> $$5) {
+ JsonAdapter(Registry<T> $$0, String $$1, String $$2, Function<E, T> $$3, @Nullable T $$4, @Nullable Pair<T, InlineSerializer<? extends E>> $$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<T> callbacksRegistry;
- private final Queue<TimerQueue.Event<T>> queue = new PriorityQueue(createComparator());
+ private final Queue<Event<T>> queue = new PriorityQueue(createComparator());
private UnsignedLong sequentialId = UnsignedLong.ZERO;
- private final Table<String, Long, TimerQueue.Event<T>> events = HashBasedTable.create();
+ private final Table<String, Long, Event<T>> events = HashBasedTable.create();
- private static <T> Comparator<TimerQueue.Event<T>> createComparator() {
+ private static <T> Comparator<Event<T>> 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<T> $$2 = (Event)this.queue.peek();
+ Event<T> $$2 = (Event)this.queue.peek();
if ($$2 == null || $$2.triggerTime > $$1) {
return;
}
@@ -65,14 +65,14 @@
public void schedule(String $$0, long $$1, TimerCallback<T> $$2) {
if (!this.events.contains($$0, $$1)) {
this.sequentialId = this.sequentialId.plus(UnsignedLong.ONE);
- TimerQueue.Event<T> $$3 = new Event<>($$1, this.sequentialId, $$0, $$2);
+ Event<T> $$3 = new Event<>($$1, this.sequentialId, $$0, $$2);
this.events.put($$0, $$1, $$3);
this.queue.add($$3);
}
}
public int remove(String $$0) {
- Collection<TimerQueue.Event<T>> $$1 = this.events.row($$0).values();
+ Collection<Event<T>> $$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<T> $$0) {
+ private CompoundTag storeEvent(Event<T> $$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<T> $$1) {
+ private void forContainersInArea(BoundingBox $$0, PosAndContainerConsumer<T> $$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 |
Hopefully this saves on some time with patch conflicts
|
Added in a new 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. |
These changes add support for TYPE_USE annotations, instanceof patterns, and upstream support for switch-on-enum. - Introduce a -qin option to reduce the source diff in this rebase by qualifying inner class names always Co-authored-by: zml <zml@stellardrift.ca>
|
Thanks for your work on this! |
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,
GenericTypeandVarTypenow implement a common interface. thegetCastTypeNamemethod now takes a list ofTypeAnnotationWriteHelpers.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 bec2e0f
(Also adds support for sealed classes but Mojang doesn't currently use sealed classes)