diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 21f0c3f1d..ec8a64c04 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -27,3 +27,4 @@ jobs: run: ./gradlew runData --no-daemon - name: Build with Gradle run: ./gradlew build --no-daemon + \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2728b511e..cdcab17fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,16 @@ jobs: steps: - name: Validate semver env: - RELEASE: ${{ github.event.release.tag_name }} - run: echo $RELEASE | grep -oP '^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' + TAG: ${{ github.event.release.tag_name }} + run: | + echo $TAG | grep -oP '^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' + echo "::set-env name=RELEASE::${TAG:1}" + - name: Export keystore + env: + KEY_STORE: ${{ secrets.KEY_STORE }} + run: | + echo $KEY_STORE | base64 -d > $HOME/keystore.jks + echo "::set-env name=KEY_STORE_FILE::$HOME/keystore.jks" - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v1 @@ -20,23 +28,28 @@ jobs: java-version: 1.8 - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Use gradle cache for faster builds - uses: actions/cache@v1 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Generate assets uses: GabrielBB/xvfb-action@v1.2 - env: - RELEASE: ${{ github.event.release.tag_name }} with: run: ./gradlew runData --no-daemon - - name: Build with Gradle + - name: Build, sign, and publish with Gradle env: - RELEASE: ${{ github.event.release.tag_name }} - run: ./gradlew build --no-daemon - - name: Publish package + KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }} + KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }} + KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew build publish --no-daemon + - name: Prepare artifact metadata + id: prepare_artifact_metadata + run: | + echo ::set-output name=ARTIFACT_PATH::./build/libs/appliedenergistics2-${RELEASE}.jar + echo ::set-output name=ARTIFACT_NAME::appliedenergistics2-${RELEASE}.jar + - name: Upload Release Artifact + uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE: ${{ github.event.release.tag_name }} - run: ./gradlew publish --no-daemon + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_PATH }} + asset_name: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_NAME }} + asset_content_type: application/zip diff --git a/build.gradle b/build.gradle index 9c278320e..71d291d01 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ allprojects { ext.release = System.getenv('RELEASE') ?: "" if (ext.release) { - version = ext.release.substring(1) + version = ext.release } // Avoid build-directories for each subproject diff --git a/core/src/main/java/appeng/block/AEBaseBlock.java b/core/src/main/java/appeng/block/AEBaseBlock.java index 466805873..84fcceb24 100644 --- a/core/src/main/java/appeng/block/AEBaseBlock.java +++ b/core/src/main/java/appeng/block/AEBaseBlock.java @@ -124,11 +124,6 @@ public abstract class AEBaseBlock extends Block { return false; } - public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand, - final @Nullable ItemStack heldItem, final BlockHitResult hit) { - return ActionResult.PASS; - } - public final Direction mapRotation(final IOrientable ori, final Direction dir) { // case DOWN: return bottomIcon; // case UP: return blockIcon; diff --git a/core/src/main/java/appeng/block/AEBaseTileBlock.java b/core/src/main/java/appeng/block/AEBaseTileBlock.java index b5cf49687..a254ae30c 100644 --- a/core/src/main/java/appeng/block/AEBaseTileBlock.java +++ b/core/src/main/java/appeng/block/AEBaseTileBlock.java @@ -267,6 +267,11 @@ public abstract class AEBaseTileBlock extends AEBas return this.onActivated(world, pos, player, hand, player.getStackInHand(hand), hit); } + public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand, + final @Nullable ItemStack heldItem, final BlockHitResult hit) { + return ActionResult.PASS; + } + @Override public IOrientable getOrientable(final BlockView w, final BlockPos pos) { return this.getBlockEntity(w, pos); diff --git a/core/src/main/java/appeng/block/misc/TinyTNTBlock.java b/core/src/main/java/appeng/block/misc/TinyTNTBlock.java index eb8d9f61b..b2b228b8f 100644 --- a/core/src/main/java/appeng/block/misc/TinyTNTBlock.java +++ b/core/src/main/java/appeng/block/misc/TinyTNTBlock.java @@ -65,9 +65,10 @@ public class TinyTNTBlock extends AEBaseBlock { } @Override - public ActionResult onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand, - final @Nullable ItemStack heldItem, final BlockHitResult hit) { - if (heldItem != null && heldItem.getItem() == Items.FLINT_AND_STEEL) { + public ActionResult onUse(BlockState state, World w, BlockPos pos, PlayerEntity player, Hand hand, + final BlockHitResult hit) { + ItemStack heldItem = player.getStackInHand(hand); + if (heldItem.getItem() == Items.FLINT_AND_STEEL) { this.startFuse(w, pos, player); w.removeBlock(pos, false); heldItem.damage(1, player, p -> { @@ -75,7 +76,7 @@ public class TinyTNTBlock extends AEBaseBlock { }); // FIXME Check if onBroken is equivalent return ActionResult.SUCCESS; } else { - return super.onActivated(w, pos, player, hand, heldItem, hit); + return super.onUse(state, w, pos, player, hand, hit); } } diff --git a/core/src/main/java/appeng/core/AEConfig.java b/core/src/main/java/appeng/core/AEConfig.java index f2acfdf7d..f7c0ef656 100644 --- a/core/src/main/java/appeng/core/AEConfig.java +++ b/core/src/main/java/appeng/core/AEConfig.java @@ -187,7 +187,7 @@ public final class AEConfig { } public boolean isFeatureEnabled(final AEFeature f) { - return this.featureFlags.contains(f); + return (!f.isConfig() && f.isEnabled()) || this.featureFlags.contains(f); } public boolean areFeaturesEnabled(Collection features) { diff --git a/core/src/main/java/appeng/core/api/definitions/ApiItems.java b/core/src/main/java/appeng/core/api/definitions/ApiItems.java index 93a1d437e..9ec000e4d 100644 --- a/core/src/main/java/appeng/core/api/definitions/ApiItems.java +++ b/core/src/main/java/appeng/core/api/definitions/ApiItems.java @@ -22,6 +22,9 @@ import appeng.api.definitions.IItemDefinition; import appeng.api.definitions.IItems; import appeng.api.util.AEColoredItemDefinition; import appeng.bootstrap.FeatureFactory; +import appeng.bootstrap.IItemRendering; +import appeng.bootstrap.ItemRenderingCustomizer; +import appeng.fluids.items.FluidDummyItem; /** * Internal implementation for the API items @@ -253,7 +256,14 @@ public final class ApiItems implements IItems { // debugTools.item("debug_part_placer", DebugPartPlacerItem::new).build(); // // this.dummyFluidItem = registry.item("dummy_fluid_item", FluidDummyItem::new) -// .rendering(new FluidDummyItemRendering()).build(); +// .rendering(new ItemRenderingCustomizer() { +// @Override +// @Environment(Dist.CLIENT) +// public void customize(IItemRendering rendering) { +// rendering.color(new FluidDummyItemColor()); +// } +// }) +// .build(); } // private static AEColoredItemDefinition createPaintBalls(FeatureFactory registry, String idSuffix, boolean lumen) { diff --git a/core/src/main/java/appeng/entity/TinyTNTPrimedEntity.java b/core/src/main/java/appeng/entity/TinyTNTPrimedEntity.java index 05071f8ba..bca44f032 100644 --- a/core/src/main/java/appeng/entity/TinyTNTPrimedEntity.java +++ b/core/src/main/java/appeng/entity/TinyTNTPrimedEntity.java @@ -27,6 +27,7 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Material; import net.minecraft.entity.*; import net.minecraft.entity.damage.DamageSource; +import net.minecraft.network.Packet; import net.minecraft.particle.ParticleTypes; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; @@ -35,20 +36,37 @@ import net.minecraft.util.math.Box; import net.minecraft.world.World; import net.minecraft.world.explosion.Explosion; +import javax.annotation.Nullable; import java.util.List; public final class TinyTNTPrimedEntity extends TntEntity { public static EntityType TYPE; + private LivingEntity causingEntity; + public TinyTNTPrimedEntity(EntityType type, World worldIn) { super(type, worldIn); this.inanimate = true; } - public TinyTNTPrimedEntity(final World w, final double x, final double y, final double z, + public TinyTNTPrimedEntity(final World world, final double x, final double y, final double z, final LivingEntity igniter) { - super(w, x, y, z, igniter); + this(TYPE, world); + this.updatePosition(x, y, z); + double d = world.random.nextDouble() * 6.2831854820251465D; + this.setVelocity(-Math.sin(d) * 0.02D, 0.20000000298023224D, -Math.cos(d) * 0.02D); + this.setFuse(80); + this.prevX = x; + this.prevY = y; + this.prevZ = z; + this.causingEntity = igniter; + } + + @Nullable + @Override + public LivingEntity getCausingEntity() { + return causingEntity; } /** @@ -159,4 +177,10 @@ public final class TinyTNTPrimedEntity extends TntEntity { // new MockExplosionPacket(this.getX(), this.getY(), this.getZ())); } + @Override + public Packet createSpawnPacket() { + // FIXME FABRIC + throw new IllegalStateException(); + } + } diff --git a/core/src/main/java/appeng/entity/TinyTNTPrimedRenderer.java b/core/src/main/java/appeng/entity/TinyTNTPrimedRenderer.java index 8d21e65e0..7b70197fc 100644 --- a/core/src/main/java/appeng/entity/TinyTNTPrimedRenderer.java +++ b/core/src/main/java/appeng/entity/TinyTNTPrimedRenderer.java @@ -38,7 +38,7 @@ public class TinyTNTPrimedRenderer extends EntityRenderer { public TinyTNTPrimedRenderer(final EntityRenderDispatcher manager) { super(manager); - this.shadowRadius = 0.5F; + this.shadowRadius = 0.25F; } @Override diff --git a/core/src/main/resources/assets/appliedenergistics2/models/block/drive/drive_base.json b/core/src/main/resources/assets/appliedenergistics2/models/block/drive/drive_base.json index 6ae955650..abd6e0a17 100644 --- a/core/src/main/resources/assets/appliedenergistics2/models/block/drive/drive_base.json +++ b/core/src/main/resources/assets/appliedenergistics2/models/block/drive/drive_base.json @@ -14,10 +14,23 @@ "from": [0, 1, 0], "to": [1, 15, 16], "faces": { - "north": { "uv": [15, 1, 16, 15], "texture": "#front" }, - "east": { "uv": [0, 0, 16, 16], "rotation": 180, "texture": "#inside" }, - "south": { "uv": [0, 1, 1, 15], "texture": "#side" }, - "west": { "uv": [0, 1, 16, 15], "texture": "#side" } + "north": { + "uv": [15, 1, 16, 15], + "texture": "#front", + "cullface": "north" + }, + "east": { + "uv": [0, 0, 16, 16], + "rotation": 180, + "texture": "#inside", + "cullface": "north" + }, + "south": { + "uv": [0, 1, 1, 15], + "texture": "#side", + "cullface": "south" + }, + "west": { "uv": [0, 1, 16, 15], "texture": "#side", "cullface": "west" } } }, { @@ -25,10 +38,26 @@ "from": [15, 1, 0], "to": [16, 15, 16], "faces": { - "north": { "uv": [0, 1, 1, 15], "texture": "#front" }, - "east": { "uv": [0, 1, 16, 15], "texture": "#side" }, - "south": { "uv": [15, 1, 16, 15], "texture": "#side" }, - "west": { "uv": [0, 0, 16, 16], "texture": "#inside" } + "north": { + "uv": [0, 1, 1, 15], + "texture": "#front", + "cullface": "north" + }, + "east": { + "uv": [0, 1, 16, 15], + "texture": "#side", + "cullface": "east" + }, + "south": { + "uv": [15, 1, 16, 15], + "texture": "#side", + "cullface": "south" + }, + "west": { + "uv": [0, 0, 16, 16], + "texture": "#inside", + "cullface": "north" + } } }, { @@ -38,7 +67,11 @@ "rotation": { "angle": 0, "axis": "y", "origin": [8, 8, 9] }, "faces": { "north": { "uv": [15, 1, 16, 15], "texture": "#inside" }, - "south": { "uv": [1, 1, 15, 15], "texture": "#side" } + "south": { + "uv": [1, 1, 15, 15], + "texture": "#side", + "cullface": "south" + } } }, { @@ -46,12 +79,37 @@ "from": [0, 0, 0], "to": [16, 1, 16], "faces": { - "north": { "uv": [0, 15, 16, 16], "texture": "#front" }, - "east": { "uv": [0, 15, 16, 16], "texture": "#side" }, - "south": { "uv": [0, 15, 16, 16], "texture": "#side" }, - "west": { "uv": [0, 15, 16, 16], "texture": "#side" }, - "up": { "uv": [0, 0, 16, 16], "rotation": 90, "texture": "#inside" }, - "down": { "uv": [0, 0, 16, 16], "texture": "#bottom" } + "north": { + "uv": [0, 15, 16, 16], + "texture": "#front", + "cullface": "north" + }, + "east": { + "uv": [0, 15, 16, 16], + "texture": "#side", + "cullface": "east" + }, + "south": { + "uv": [0, 15, 16, 16], + "texture": "#side", + "cullface": "south" + }, + "west": { + "uv": [0, 15, 16, 16], + "texture": "#side", + "cullface": "west" + }, + "up": { + "uv": [0, 0, 16, 16], + "rotation": 90, + "texture": "#inside", + "cullface": "north" + }, + "down": { + "uv": [0, 0, 16, 16], + "texture": "#bottom", + "cullface": "down" + } } }, { @@ -59,12 +117,25 @@ "from": [0, 15, 0], "to": [16, 16, 16], "faces": { - "north": { "uv": [0, 0, 16, 1], "texture": "#front" }, - "east": { "uv": [0, 0, 16, 1], "texture": "#side" }, - "south": { "uv": [0, 0, 16, 1], "texture": "#side" }, - "west": { "uv": [0, 0, 16, 1], "texture": "#side" }, - "up": { "uv": [0, 0, 16, 16], "texture": "#top" }, - "down": { "uv": [0, 0, 16, 16], "rotation": 270, "texture": "#inside" } + "north": { + "uv": [0, 0, 16, 1], + "texture": "#front", + "cullface": "north" + }, + "east": { "uv": [0, 0, 16, 1], "texture": "#side", "cullface": "east" }, + "south": { + "uv": [0, 0, 16, 1], + "texture": "#side", + "cullface": "south" + }, + "west": { "uv": [0, 0, 16, 1], "texture": "#side", "cullface": "west" }, + "up": { "uv": [0, 0, 16, 16], "texture": "#top", "cullface": "up" }, + "down": { + "uv": [0, 0, 16, 16], + "rotation": 270, + "texture": "#inside", + "cullface": "north" + } } }, { @@ -72,9 +143,22 @@ "from": [7, 1, 1], "to": [9, 15, 7], "faces": { - "north": { "uv": [7, 1, 9, 15], "texture": "#front" }, - "east": { "uv": [1, 1, 7, 15], "rotation": 180, "texture": "#inside" }, - "west": { "uv": [1, 1, 7, 15], "texture": "#inside" } + "north": { + "uv": [7, 1, 9, 15], + "texture": "#front", + "cullface": "north" + }, + "east": { + "uv": [1, 1, 7, 15], + "rotation": 180, + "texture": "#inside", + "cullface": "north" + }, + "west": { + "uv": [1, 1, 7, 15], + "texture": "#inside", + "cullface": "north" + } } }, { @@ -82,9 +166,23 @@ "from": [1, 3, 2], "to": [15, 4, 7], "faces": { - "north": { "uv": [1, 12, 15, 13], "texture": "#front" }, - "up": { "uv": [2, 1, 7, 15], "rotation": 90, "texture": "#inside" }, - "down": { "uv": [2, 1, 7, 15], "rotation": 270, "texture": "#inside" } + "north": { + "uv": [1, 12, 15, 13], + "texture": "#front", + "cullface": "north" + }, + "up": { + "uv": [2, 1, 7, 15], + "rotation": 90, + "texture": "#inside", + "cullface": "north" + }, + "down": { + "uv": [2, 1, 7, 15], + "rotation": 270, + "texture": "#inside", + "cullface": "north" + } } }, { @@ -92,9 +190,23 @@ "from": [1, 6, 2], "to": [15, 7, 7], "faces": { - "north": { "uv": [1, 9, 15, 10], "texture": "#front" }, - "up": { "uv": [2, 1, 7, 15], "rotation": 90, "texture": "#inside" }, - "down": { "uv": [2, 1, 7, 15], "rotation": 270, "texture": "#inside" } + "north": { + "uv": [1, 9, 15, 10], + "texture": "#front", + "cullface": "north" + }, + "up": { + "uv": [2, 1, 7, 15], + "rotation": 90, + "texture": "#inside", + "cullface": "north" + }, + "down": { + "uv": [2, 1, 7, 15], + "rotation": 270, + "texture": "#inside", + "cullface": "north" + } } }, { @@ -102,9 +214,23 @@ "from": [1, 9, 2], "to": [15, 10, 7], "faces": { - "north": { "uv": [1, 6, 15, 7], "texture": "#front" }, - "up": { "uv": [2, 1, 7, 15], "rotation": 90, "texture": "#inside" }, - "down": { "uv": [2, 1, 7, 15], "rotation": 270, "texture": "#inside" } + "north": { + "uv": [1, 6, 15, 7], + "texture": "#front", + "cullface": "north" + }, + "up": { + "uv": [2, 1, 7, 15], + "rotation": 90, + "texture": "#inside", + "cullface": "north" + }, + "down": { + "uv": [2, 1, 7, 15], + "rotation": 270, + "texture": "#inside", + "cullface": "north" + } } }, { @@ -112,9 +238,23 @@ "from": [1, 12, 2], "to": [15, 13, 7], "faces": { - "north": { "uv": [1, 3, 15, 4], "texture": "#front" }, - "up": { "uv": [2, 1, 7, 15], "rotation": 90, "texture": "#inside" }, - "down": { "uv": [2, 1, 7, 15], "rotation": 270, "texture": "#inside" } + "north": { + "uv": [1, 3, 15, 4], + "texture": "#front", + "cullface": "north" + }, + "up": { + "uv": [2, 1, 7, 15], + "rotation": 90, + "texture": "#inside", + "cullface": "north" + }, + "down": { + "uv": [2, 1, 7, 15], + "rotation": 270, + "texture": "#inside", + "cullface": "north" + } } } ] diff --git a/gradle/scripts/artifacts.gradle b/gradle/scripts/artifacts.gradle index e3f1caf90..f9503ff9b 100644 --- a/gradle/scripts/artifacts.gradle +++ b/gradle/scripts/artifacts.gradle @@ -21,6 +21,9 @@ processResources { } jar { + finalizedBy 'reobfJar' + finalizedBy 'signJar' + from sourceSets.main.output.classesDirs from sourceSets.api.output.classesDirs from sourceSets.main.output.resourcesDir diff --git a/src/main/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java b/src/main/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java index b731c5c9f..efb790a43 100644 --- a/src/main/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java +++ b/src/main/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java @@ -125,6 +125,10 @@ public class DriveLedTileEntityRenderer extends BlockEntityRenderer cap = te.getCapability(CapabilityEnergy.ENERGY, facing.getOpposite()); cap.ifPresent(consumer -> { diff --git a/src/main/java/appeng/fluids/items/FluidDummyItemColor.java b/src/main/java/appeng/fluids/items/FluidDummyItemColor.java new file mode 100644 index 000000000..f0ef7658e --- /dev/null +++ b/src/main/java/appeng/fluids/items/FluidDummyItemColor.java @@ -0,0 +1,27 @@ +package appeng.fluids.items; + +import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fluids.FluidStack; + +@OnlyIn(Dist.CLIENT) +public class FluidDummyItemColor implements IItemColor { + + @Override + public int getColor(ItemStack stack, int tintIndex) { + + Item item = stack.getItem(); + if (!(item instanceof FluidDummyItem)) { + return -1; + } + + FluidDummyItem fluidItem = (FluidDummyItem) item; + FluidStack fluidStack = fluidItem.getFluidStack(stack); + + return fluidStack.getFluid().getAttributes().getColor(fluidStack); + } + +} diff --git a/src/main/java/appeng/fluids/items/FluidDummyItemRendering.java b/src/main/java/appeng/fluids/items/FluidDummyItemRendering.java deleted file mode 100644 index fb8e6b51b..000000000 --- a/src/main/java/appeng/fluids/items/FluidDummyItemRendering.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of Applied Energistics 2. - * Copyright (c) 2013 - 2018, AlgorithmX2, All rights reserved. - * - * Applied Energistics 2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Applied Energistics 2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Applied Energistics 2. If not, see . - */ - -package appeng.fluids.items; - -import appeng.bootstrap.IItemRendering; -import appeng.bootstrap.ItemRenderingCustomizer; - -/** - * @author DrummerMC - * @version rv6 - 2018-01-22 - * @since rv6 2018-01-22 - */ -public class FluidDummyItemRendering extends ItemRenderingCustomizer { - @Override - public void customize(IItemRendering rendering) { - // FIXME rendering.builtInModel( "models/item/dummy_fluid_item", new - // DummyFluidItemModel() ); - } -} diff --git a/src/main/java/appeng/me/cache/PathGridCache.java b/src/main/java/appeng/me/cache/PathGridCache.java index 61be275d4..0795d816d 100644 --- a/src/main/java/appeng/me/cache/PathGridCache.java +++ b/src/main/java/appeng/me/cache/PathGridCache.java @@ -95,16 +95,7 @@ public class PathGridCache implements IPathingGrid { this.updateNetwork = false; this.setChannelsInUse(0); - if (!AEConfig.instance().isFeatureEnabled(AEFeature.CHANNELS)) { - final int used = this.calculateRequiredChannels(); - - final int nodes = this.myGrid.getNodes().size(); - this.ticksUntilReady = 20 + Math.max(0, nodes / 100 - 20); - this.setChannelsByBlocks(nodes * used); - this.setChannelPowerUsage(this.getChannelsByBlocks() / 128.0); - - this.myGrid.getPivot().beginVisit(new AdHocChannelUpdater(used)); - } else if (this.controllerState == ControllerState.NO_CONTROLLER) { + if (this.controllerState == ControllerState.NO_CONTROLLER) { final int requiredChannels = this.calculateRequiredChannels(); int used = requiredChannels; if (requiredChannels > 8) { diff --git a/src/main/java/appeng/tile/storage/DriveBlockEntity.java b/src/main/java/appeng/tile/storage/DriveBlockEntity.java index d711119fe..3dc307a86 100644 --- a/src/main/java/appeng/tile/storage/DriveBlockEntity.java +++ b/src/main/java/appeng/tile/storage/DriveBlockEntity.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.EnumSet; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; @@ -36,8 +37,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.PacketByteBuf; +import net.minecraft.util.Direction; import net.minecraft.util.Identifier; - import net.minecraftforge.registries.ForgeRegistries; import appeng.api.AEApi; @@ -111,6 +112,12 @@ public class DriveBlockEntity extends AENetworkInvBlockEntity implements IChestO this.inventoryHandlers = new IdentityHashMap<>(); } + @Override + public void setOrientation(Direction inForward, Direction inUp) { + super.setOrientation(inForward, inUp); + this.getProxy().setValidSides(EnumSet.complementOf(EnumSet.of(inForward))); + } + @Override protected void writeToStream(final PacketByteBuf data) throws IOException { super.writeToStream(data); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 699a80cd3..27d6b05db 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -13,9 +13,16 @@ version="${file.jarVersion}" displayName="Applied Energistics 2" description="A Mod about Matter, Energy and using them to conquer the world.." -[[dependencies.jei]] +[[dependencies.appliedenergistics2]] modId="forge" mandatory=true versionRange="[31.0.0,)" ordering="NONE" - side="BOTH" \ No newline at end of file + side="BOTH" + +[[dependencies.appliedenergistics2]] + modId="minecraft" + mandatory=true + versionRange="[1.15.2]" + ordering="NONE" + side="BOTH" diff --git a/src/main/resources/assets/appliedenergistics2/models/item/dummy_fluid_item.json b/src/main/resources/assets/appliedenergistics2/models/item/dummy_fluid_item.json new file mode 100644 index 000000000..5c062247d --- /dev/null +++ b/src/main/resources/assets/appliedenergistics2/models/item/dummy_fluid_item.json @@ -0,0 +1,3 @@ +{ + "loader": "appliedenergistics2:dummy_fluid_item" +}