Skip to content

Commit

Permalink
Merge pull request #2 from AppliedEnergistics/main
Browse files Browse the repository at this point in the history
Rebase
  • Loading branch information
Ridanisaurus authored Jul 28, 2024
2 parents 9bb04f9 + 0fc341d commit 8ad8c49
Show file tree
Hide file tree
Showing 211 changed files with 1,998 additions and 2,969 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ minecraft_release=1.21
minecraft_version=1.21
minecraft_version_range=1.21
# https://projects.neoforged.net/neoforged/neoforge
neoforge_version=21.0.38-beta
neoforge_version=21.0.112-beta
neoforge_version_range=[21.0.0-beta,)

#########################################################
# Parchment #
#########################################################
neoForge.parchment.minecraftVersion=1.21
neoForge.parchment.mappingsVersion=2024.06.23
neoForge.parchment.mappingsVersion=2024.07.07

#########################################################
# Provided APIs #
#########################################################
top_minecraft_release=1.20
top_version=1.20.4_neo-11.0.1-2
emi_version=1.1.7+1.21
emi_version=1.1.10+1.21
# please learn how to use semver...
top_version_range=[1.20.0,)
jade_version_range=[15.0.0,)
Expand Down
Binary file added guidebook/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions guidebook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ navigation:
title: Index/Table of Contents
position: 0
---

![Logo](assets/logo.png)

# What is Applied Energistics 2?

# How To Use This Guide
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pluginManagement {
id 'io.github.goooler.shadow' version '8.1.7'
id 'de.undercouch.download' version '5.6.0'
// https://projects.neoforged.net/neoforged/ModDevGradle
id 'net.neoforged.moddev' version '0.1.112'
id 'net.neoforged.moddev.repositories' version '0.1.112'
id 'net.neoforged.moddev' version '1.0.13'
id 'net.neoforged.moddev.repositories' version '1.0.13'
}
}

Expand Down
16 changes: 13 additions & 3 deletions src/generated/resources/assets/ae2/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@
"chat.ae2.CompassTestSection": "Section [y=%d-%d] %d: %b",
"chat.ae2.DeviceNotLinked": "Device is not linked.",
"chat.ae2.DeviceNotPowered": "Device is low on power.",
"chat.ae2.InvalidMachine": "Could not restore configuration for an incompatible device.",
"chat.ae2.InvalidMachinePartiallyRestored": "Partially restored configuration for an incompatible device: %s.",
"chat.ae2.InvalidMachine": "Could not load configuration from an incompatible device.",
"chat.ae2.InvalidMachinePartiallyRestored": "Partially loaded configuration: %s.",
"chat.ae2.LastTransition": "Last Transition:",
"chat.ae2.LastTransitionUnknown": "Last Transition unknown",
"chat.ae2.LinkedNetworkNotFound": "Linked network cannot be found",
Expand Down Expand Up @@ -281,6 +281,16 @@
"config.jade.plugin_ae2.power_storage": "AE2 Power State",
"entity.ae2.tiny_tnt_primed": "Tiny TNT Primed",
"entity.minecraft.villager.ae2.fluix_researcher": "Fluix Researcher",
"exported_setting.ae2.exported_config_inv": "Filter",
"exported_setting.ae2.exported_custom_name": "Custom Name",
"exported_setting.ae2.exported_level_emitter_value": "Level Emitter Value",
"exported_setting.ae2.exported_p2p_frequency": "P2P Frequency",
"exported_setting.ae2.exported_p2p_type": "P2P Type",
"exported_setting.ae2.exported_patterns": "Patterns",
"exported_setting.ae2.exported_priority": "Priority",
"exported_setting.ae2.exported_push_direction": "Push Direction",
"exported_setting.ae2.exported_settings": "Settings",
"exported_setting.ae2.exported_upgrades": "Upgrades",
"gui.ae2.AdjacentToDifferentMachines": "Adjacent to Different Machines",
"gui.ae2.And": "and",
"gui.ae2.AttachedTo": "Attached to: %s",
Expand All @@ -300,7 +310,6 @@
"gui.ae2.CellWorkbench": "Cell Workbench",
"gui.ae2.CertusQuartzObtain": "Certus Quartz is grown by the various Budding Certus Quartz blocks, which can be found in meteors, or crafted from regular Certus Quartz blocks.",
"gui.ae2.ChannelEnergyDrain": "Channel Passive Drain: %s",
"gui.ae2.Chest": "ME Chest",
"gui.ae2.Clean": "Clean",
"gui.ae2.CompatibleUpgrade": "%s (%s)",
"gui.ae2.CompatibleUpgrades": "Compatible Upgrades:",
Expand Down Expand Up @@ -383,6 +392,7 @@
"gui.ae2.Lime": "Lime",
"gui.ae2.Linked": "Linked",
"gui.ae2.Lumen": "Lumen",
"gui.ae2.MEChest": "ME Chest",
"gui.ae2.MENetworkStorage": "ME Network Storage",
"gui.ae2.Magenta": "Magenta",
"gui.ae2.MaxPower": "Max Power: %s",
Expand Down
3 changes: 3 additions & 0 deletions src/generated/resources/data/ae2/recipe/add_item_upgrade.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "ae2:add_item_upgrade"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tag": "c:ingots/iron"
},
"b": {
"item": "minecraft:sticky_piston"
"item": "minecraft:piston"
},
"c": {
"tag": "c:ingots/copper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tag": "c:ingots/iron"
},
"c": {
"item": "minecraft:sticky_piston"
"item": "minecraft:piston"
}
},
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"category": "misc",
"ingredients": [
{
"item": "minecraft:sticky_piston"
"item": "minecraft:piston"
},
{
"tag": "ae2:interface"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "ae2:remove_item_upgrade"
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"values": [
"ae2:exported_config_inv",
"ae2:exported_patterns",
"ae2:exported_custom_name",
"ae2:exported_level_emitter_value",
"ae2:exported_p2p_frequency",
"ae2:exported_p2p_type",
"ae2:exported_patterns",
"ae2:exported_priority",
"ae2:exported_push_direction",
"ae2:exported_settings",
"ae2:exported_settings_source",
"ae2:exported_upgrades"
"ae2:exported_upgrades",
"ae2:exported_settings_source"
]
}
7 changes: 2 additions & 5 deletions src/main/java/appeng/api/AECapabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ private AECapabilities() {
public static BlockCapability<GenericInternalInventory, @Nullable Direction> GENERIC_INTERNAL_INV = BlockCapability
.createSided(AppEng.makeId("generic_internal_inv"), GenericInternalInventory.class);

/**
* The {@link Direction} context is always {@code null}. TODO 1.20.5: Replace @Nullable Direction by Void context.
*/
public static BlockCapability<IInWorldGridNodeHost, @Nullable Direction> IN_WORLD_GRID_NODE_HOST = BlockCapability
.createSided(AppEng.makeId("inworld_gridnode_host"), IInWorldGridNodeHost.class);
public static BlockCapability<IInWorldGridNodeHost, Void> IN_WORLD_GRID_NODE_HOST = BlockCapability
.createVoid(AppEng.makeId("inworld_gridnode_host"), IInWorldGridNodeHost.class);

public static BlockCapability<ICrankable, @Nullable Direction> CRANKABLE = BlockCapability
.createSided(AppEng.makeId("crankable"), ICrankable.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ default boolean isSupportedType(AEKey what) {
return isSupportedType(what.getType());
}

/**
* Return true if the key would generally be allowed, ignoring the current state of the inventory.
*/
@Deprecated(since = "1.20.4")
default boolean isAllowed(AEKey what) {
return isSupportedType(what);
}

/**
* Return true if the key is {@link #isSupportedType(AEKey) of a supported type} and would pass a potential filter
* configured for the given slot.
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/appeng/api/components/ExportedUpgrades.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package appeng.api.components;

import java.util.List;

import com.mojang.serialization.Codec;

import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.world.item.ItemStack;

public record ExportedUpgrades(List<ItemStack> upgrades) {
// Defined using xmap since we previously used a List directly.
// TODO 1.21.1 Use a normal record codec
public static Codec<ExportedUpgrades> CODEC = ItemStack.CODEC.listOf().xmap(ExportedUpgrades::new,
ExportedUpgrades::upgrades);

public static StreamCodec<RegistryFriendlyByteBuf, ExportedUpgrades> STREAM_CODEC = StreamCodec.composite(
ItemStack.LIST_STREAM_CODEC, ExportedUpgrades::upgrades,
ExportedUpgrades::new);

@Override
public boolean equals(Object object) {
if (this == object)
return true;
if (!(object instanceof ExportedUpgrades that))
return false;
return ItemStack.listMatches(upgrades, that.upgrades);
}

@Override
public int hashCode() {
return ItemStack.hashStackList(upgrades);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import net.minecraft.network.chat.Component;

public enum PowerUnits {
public enum PowerUnit {
AE("gui.ae2.units.appliedenergistics", "AE"), // Native Units - AE Energy
FE("gui.ae2.units.fe", "FE"); // Forge Energy

Expand All @@ -43,7 +43,7 @@ public enum PowerUnits {
*/
public double conversionRatio = 1.0;

PowerUnits(String un, String symbolName) {
PowerUnit(String un, String symbolName) {
this.unlocalizedName = un;
this.symbolName = symbolName;
}
Expand All @@ -60,7 +60,7 @@ public enum PowerUnits {
*
* @return value converted to target units, from this units.
*/
public double convertTo(PowerUnits target, double value) {
public double convertTo(PowerUnit target, double value) {
return value * this.conversionRatio / target.conversionRatio;
}

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 @@ -56,7 +56,7 @@ private synchronized static <T extends Enum<T>> Setting<T> register(String name,
RedstoneMode.LOW_SIGNAL);
public static final Setting<RedstoneMode> REDSTONE_CONTROLLED = register("redstone_controlled", RedstoneMode.class);
public static final Setting<CondenserOutput> CONDENSER_OUTPUT = register("condenser_output", CondenserOutput.class);
public static final Setting<PowerUnits> POWER_UNITS = register("power_units", PowerUnits.class);
public static final Setting<PowerUnit> POWER_UNITS = register("power_units", PowerUnit.class);
public static final Setting<AccessRestriction> ACCESS = register("access", AccessRestriction.READ_WRITE,
AccessRestriction.READ, AccessRestriction.WRITE);
public static final Setting<SortDir> SORT_DIRECTION = register("sort_direction", SortDir.class);
Expand Down
51 changes: 0 additions & 51 deletions src/main/java/appeng/api/features/AEToolActions.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/appeng/api/ids/AEBlockIds.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public final class AEBlockIds {
public static final ResourceLocation QUANTUM_LINK = id("quantum_link");
public static final ResourceLocation CONTROLLER = id("controller");
public static final ResourceLocation DRIVE = id("drive");
public static final ResourceLocation CHEST = id("chest");
public static final ResourceLocation ME_CHEST = id("chest");
public static final ResourceLocation INTERFACE = id("interface");
public static final ResourceLocation CELL_WORKBENCH = id("cell_workbench");
public static final ResourceLocation IO_PORT = id("io_port");
Expand Down
Loading

0 comments on commit 8ad8c49

Please sign in to comment.