Skip to content

Commit

Permalink
1.20.2 work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Oct 31, 2023
1 parent 1d852ae commit a85d514
Show file tree
Hide file tree
Showing 699 changed files with 1,093 additions and 1,072 deletions.
21 changes: 5 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

plugins {
id "net.neoforged.gradle.userdev"
id "net.neoforged.gradle.mixin"
id "maven-publish"
id "com.diffplug.spotless"
id "com.github.johnrengelman.shadow"
Expand Down Expand Up @@ -148,9 +149,6 @@ dependencies {
testImplementation("org.mockito:mockito-junit-jupiter:5.3.1")

compileOnly 'org.apache.commons:commons-configuration2:2.9.0'

// Annotation Processors
annotationProcessor 'org.spongepowered:mixin:0.8.4:processor'
}
archivesBaseName = artifact_basename

Expand Down Expand Up @@ -315,6 +313,10 @@ minecraft {
}
}

mixin {
config "ae2.mixins.json"
}

runs {
client {
with commonRunProperties
Expand Down Expand Up @@ -401,7 +403,6 @@ shadowJar {
"Implementation-Title" : "${project.name}",
"Implementation-Version": "${project.version}",
"Implementation-Vendor" : "TeamAppliedEnergistics",
"MixinConfigs" : "ae2.mixins.json"
])
}

Expand Down Expand Up @@ -542,18 +543,6 @@ task downloadFromCrowdin(type: JavaExec) {
workingDir "."
}

////////////////
// IntelliJ Project Import
// The Mixin annotation process does not have an obfuscation source when running through the IntelliJ compiler,
// thus we have to prevent it from being activated as part of importing this Gradle project into IntelliJ.
if (System.getProperty("idea.sync.active") == "true") {
afterEvaluate {
tasks.withType(JavaCompile).all {
it.options.annotationProcessorPath = files()
}
}
}

// See https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/5259
// Gradle module metadata contains mapped dependencies, making our artifacts unconsumable
tasks.withType(GenerateModuleMetadata) {
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pluginManagement {
}
plugins {
id 'net.neoforged.gradle.userdev' version '7.0.5'
id 'net.neoforged.gradle.mixin' version '7.0.5'
id 'com.diffplug.spotless' version '5.12.4'
id 'io.github.juuxel.loom-quiltflower' version '1.10.0'
id 'com.github.johnrengelman.shadow' version '7.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
import com.google.common.base.Preconditions;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.ItemStack;
import EmptyingAction;
import appeng.api.stacks.AEFluidKey;
import appeng.api.stacks.AEKey;
import appeng.api.stacks.AEKeyType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.google.common.primitives.Ints;

import org.jetbrains.annotations.Nullable;
import record;
import var;


import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.ItemStack;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/client/AEKeyRendering.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import com.mojang.blaze3d.vertex.PoseStack;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.MultiBufferSource;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/client/StorageCellModels.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import com.google.common.base.Preconditions;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/config/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import var;

import com.google.common.base.Preconditions;

public final class Settings {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.google.common.base.Preconditions;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.CraftingRecipe;
import net.minecraft.world.item.crafting.SmithingRecipe;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/features/GridLinkables.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.google.common.base.Preconditions;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.world.item.Item;
import net.minecraft.world.level.ItemLike;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/features/IPlayerRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.mojang.authlib.GameProfile;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/appeng/api/features/P2PTunnelAttunement.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ItemLike;
import net.neoforged.neoforge.common.capabilities.Capability;
import record;
import var;


import appeng.core.definitions.AEParts;
import appeng.items.parts.PartItem;
import appeng.parts.p2p.P2PTunnelPart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package appeng.api.features;

import AttunementInfo;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand All @@ -31,8 +30,8 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ItemLike;
import net.neoforged.neoforge.common.capabilities.Capability;
import record;
import var;



/**
* Internal methods that complement {@link P2PTunnelAttunement} and which are not part of the public API.
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/appeng/api/features/PlayerRegistryInternal.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.google.common.collect.HashBiMap;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
Expand Down Expand Up @@ -66,9 +66,11 @@ static PlayerRegistryInternal get(MinecraftServer server) {
throw new IllegalStateException("Cannot retrieve player data for a server that has no overworld.");
}
return overworld.getDataStorage().computeIfAbsent(
nbt -> PlayerRegistryInternal.load(server, nbt),
() -> new PlayerRegistryInternal(server),
PlayerRegistryInternal.NAME);
new Factory<>(
() -> new PlayerRegistryInternal(server),
nbt -> PlayerRegistryInternal.load(server, nbt),
null
), PlayerRegistryInternal.NAME);
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
import PatternContainerGroup;
import appeng.api.crafting.IPatternDetails;
import appeng.api.stacks.KeyCounter;
import appeng.capabilities.Capabilities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package appeng.api.implementations.blockentities;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package appeng.api.implementations.menuobjects;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.Container;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.NoSuchElementException;

import net.minecraft.world.item.ItemStack;
import var;


/**
* Iterates over the slots of an {@link InternalInventory} that are not empty.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import var;


/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package appeng.api.movable;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.Level;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/networking/GridHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.function.Consumer;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/networking/GridServices.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import var;


/**
* A registry of grid services to extend grid functionality.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/networking/IManagedGridNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.function.Consumer;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.jetbrains.annotations.Nullable;

import net.minecraft.network.chat.Component;
import CraftingJobStatus;
import appeng.api.config.CpuSelectionMode;

public interface ICraftingCPU {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.util.List;
import java.util.Set;
import var;

import appeng.api.crafting.IPatternDetails;
import appeng.api.networking.IGridNodeService;
import appeng.api.networking.IManagedGridNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appeng.api.networking.crafting;

import org.jetbrains.annotations.Nullable;
import var;

import appeng.api.networking.IGridNode;
import appeng.api.networking.security.IActionHost;
import appeng.api.networking.security.IActionSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

package appeng.api.networking.ticking;

import TickingRequest;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IGridNodeService;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/orientation/BlockOrientation.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import org.joml.Matrix4f;
import org.joml.Quaternionf;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.Property;
import var;


/**
* Extends {@link FacingStrategy} to also allow the block to be rotated around its facing axis.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/orientation/IOrientableBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package appeng.api.orientation;

import net.minecraft.world.level.block.state.BlockState;
import var;


/**
* Implemented on many of AEs blocks to control their orientation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
import net.minecraft.world.level.block.state.properties.Property;
import var;

import appeng.block.orientation.SpinMapping;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/parts/IPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.MustBeInvokedByOverriders;
import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.CrashReportCategory;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.core.BlockPos;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/parts/IPartHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package appeng.api.parts;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/parts/IPartItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package appeng.api.parts;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/parts/PartHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.Objects;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/api/stacks/AEFluidKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Objects;

import org.jetbrains.annotations.Nullable;
import var;

import net.minecraft.core.BlockPos;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.nbt.CompoundTag;
Expand Down
Loading

0 comments on commit a85d514

Please sign in to comment.