Compare commits

..

468 Commits

Author SHA1 Message Date
Sebastian Hartte 5da5315a5b Post-merge fixes. Reformat. Optimize Imports. 2020-09-20 14:47:25 +02:00
Sebastian Hartte f3c44c64c2 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	build.gradle
#	gradle.properties
#	src/api/java/appeng/api/util/DimensionalCoord.java
#	src/main/java/appeng/block/paint/PaintSplotchesBakedModel.java
#	src/main/java/appeng/bootstrap/BlockDefinitionBuilder.java
#	src/main/java/appeng/client/gui/AEBaseScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftAmountScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftConfirmScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftingStatusScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceTerminalScreen.java
#	src/main/java/appeng/client/gui/implementations/LevelEmitterScreen.java
#	src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java
#	src/main/java/appeng/client/gui/implementations/PriorityScreen.java
#	src/main/java/appeng/client/gui/widgets/IconButton.java
#	src/main/java/appeng/client/gui/widgets/NumberBox.java
#	src/main/java/appeng/client/gui/widgets/SettingToggleButton.java
#	src/main/java/appeng/client/gui/widgets/TabButton.java
#	src/main/java/appeng/client/render/DelegateBakedModel.java
#	src/main/java/appeng/client/render/DummyFluidDispatcherBakedModel.java
#	src/main/java/appeng/client/render/FacadeBakedItemModel.java
#	src/main/java/appeng/client/render/FacadeDispatcherBakedModel.java
#	src/main/java/appeng/client/render/cablebus/P2PTunnelFrequencyBakedModel.java
#	src/main/java/appeng/client/render/crafting/EncodedPatternBakedModel.java
#	src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java
#	src/main/java/appeng/client/render/model/BiometricCardBakedModel.java
#	src/main/java/appeng/client/render/model/ColorApplicatorBakedModel.java
#	src/main/java/appeng/client/render/model/GlassBakedModel.java
#	src/main/java/appeng/client/render/model/MemoryCardBakedModel.java
#	src/main/java/appeng/client/render/model/SkyCompassBakedModel.java
#	src/main/java/appeng/client/render/tesr/ChestTileEntityRenderer.java
#	src/main/java/appeng/container/AEBaseContainer.java
#	src/main/java/appeng/container/ContainerLocator.java
#	src/main/java/appeng/container/guisync/SyncData.java
#	src/main/java/appeng/container/implementations/CellWorkbenchContainer.java
#	src/main/java/appeng/container/implementations/CondenserContainer.java
#	src/main/java/appeng/container/implementations/ContainerHelper.java
#	src/main/java/appeng/container/implementations/CraftConfirmContainer.java
#	src/main/java/appeng/container/implementations/CraftingCPUContainer.java
#	src/main/java/appeng/container/implementations/CraftingCPURecord.java
#	src/main/java/appeng/container/implementations/CraftingStatusContainer.java
#	src/main/java/appeng/container/implementations/IOPortContainer.java
#	src/main/java/appeng/container/implementations/InscriberContainer.java
#	src/main/java/appeng/container/implementations/InterfaceTerminalContainer.java
#	src/main/java/appeng/container/implementations/LevelEmitterContainer.java
#	src/main/java/appeng/container/implementations/MEMonitorableContainer.java
#	src/main/java/appeng/container/implementations/MolecularAssemblerContainer.java
#	src/main/java/appeng/container/implementations/PatternTermContainer.java
#	src/main/java/appeng/container/implementations/PriorityContainer.java
#	src/main/java/appeng/container/implementations/QuartzKnifeContainer.java
#	src/main/java/appeng/container/implementations/SpatialIOPortContainer.java
#	src/main/java/appeng/container/implementations/VibrationChamberContainer.java
#	src/main/java/appeng/container/implementations/WirelessTermContainer.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/core/AppEngBootstrap.java
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/api/definitions/ApiItems.java
#	src/main/java/appeng/core/features/registries/WorldGenRegistry.java
#	src/main/java/appeng/core/sync/network/NetworkHandler.java
#	src/main/java/appeng/core/worlddata/WorldData.java
#	src/main/java/appeng/datagen/providers/loot/BlockDropProvider.java
#	src/main/java/appeng/debug/ChunkLoaderBlockEntity.java
#	src/main/java/appeng/debug/ReplicatorCardItem.java
#	src/main/java/appeng/entity/GrowingCrystalEntity.java
#	src/main/java/appeng/fluids/client/gui/FluidLevelEmitterScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidTerminalScreen.java
#	src/main/java/appeng/fluids/container/FluidConfigurableContainer.java
#	src/main/java/appeng/fluids/container/FluidInterfaceContainer.java
#	src/main/java/appeng/fluids/container/FluidLevelEmitterContainer.java
#	src/main/java/appeng/fluids/container/FluidTerminalContainer.java
#	src/main/java/appeng/fluids/util/AEFluidInventory.java
#	src/main/java/appeng/items/misc/CrystalSeedItem.java
#	src/main/java/appeng/items/misc/CrystalSeedRendering.java
#	src/main/java/appeng/items/storage/SpatialStorageCellItem.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCluster.java
#	src/main/java/appeng/mixins/feature/ConfiguredFeaturesAccessor.java
#	src/main/java/appeng/mixins/spatial/BiomesMixin.java
#	src/main/java/appeng/mixins/spatial/DimensionTypeMixin.java
#	src/main/java/appeng/mixins/spatial/EntityMixin.java
#	src/main/java/appeng/mixins/spatial/SkyRenderMixin.java
#	src/main/java/appeng/mixins/structure/BiomeAccessor.java
#	src/main/java/appeng/mixins/structure/GenerationSettingsAccessor.java
#	src/main/java/appeng/parts/automation/FormationPlanePart.java
#	src/main/java/appeng/parts/automation/PlaneBakedModel.java
#	src/main/java/appeng/server/subcommands/SpatialStorageCommand.java
#	src/main/java/appeng/server/subcommands/TestMeteoritesCommand.java
#	src/main/java/appeng/server/subcommands/TestOreGenCommand.java
#	src/main/java/appeng/spatial/SpatialStorageBiome.java
#	src/main/java/appeng/spatial/SpatialStorageChunkGenerator.java
#	src/main/java/appeng/spatial/SpatialStorageDimensionIds.java
#	src/main/java/appeng/spatial/SpatialStorageHelper.java
#	src/main/java/appeng/util/Platform.java
#	src/main/java/appeng/worldgen/BiomeModifier.java
#	src/main/java/appeng/worldgen/meteorite/MeteoriteStructureStart.java
#	src/main/java/appeng/worldgen/meteorite/fallout/FalloutCopy.java
#	src/main/resources/assets/appliedenergistics2/textures/guis/states.png
2020-09-20 14:11:22 +02:00
Sebastian Hartte b8f48407cd Fix tooltip rendering. 2020-09-20 01:06:53 +02:00
Sebastian Hartte 489b0f635e Merge remote-tracking branch 'origin/8.0.x-1.16.1' 2020-09-20 00:42:52 +02:00
shartte e6fb553a53 Fixes #4741: Rework Crafting CPU cycling and extract commonalities into a separate class. (#4742)
Also Fixes:
- Enter key confirms the "Confirm Crafting" dialog again
- Right Mouse Button correctly cycles backwards through CPUs, while left mouse button forward
- Fixes an internal problem with syncing CPU names
- Naming of unnamed CPUs begins at #1 now
2020-09-20 00:26:34 +02:00
Sebastian Hartte cacd824db3 Remove unused field indicating availability of client classes. 2020-09-19 18:20:11 +02:00
yueh 876bb52087 Update forge mappings to 20200916-1.16.2 (#4749) 2020-09-19 17:32:23 +02:00
Sebastian Hartte 1b4969c8e7 Formatting fixes. 2020-09-19 16:58:37 +02:00
Sebastian Hartte f2427ee347 Fixes #4747: The chunk unload event was triggering before the chunk was actually saved to disk, which means disconnecting grid connections at that point led to grid nodes not saving their data to the chunk. 2020-09-19 16:54:30 +02:00
Sebastian Hartte 4aa9c92a68 Fixes #4747: Server unload event was destroying grids before the associated nodes were saved, leading to player ids not being saved correctly when quitting the server. 2020-09-19 16:49:44 +02:00
shartte 971a9d22e8 Improvements to the usability of the number entry widgets (Priority, Level Emitter, Craft Amount): (#4737)
- Fixed tab order
- Introduced focus state for corner buttons
- Allowed the player to enter any text, but add validation that only persist it if it is a valid number
- Enter will now confirm these dialogs and return to the previous dialog
- The text field is automatically focused and its contents are selected
2020-09-19 16:27:29 +02:00
Sebastian Hartte b5a90357c0 Fix ME Chest attributes being exposed on the wrong side. 2020-09-19 13:59:09 +02:00
Sebastian Hartte 5be0adbc89 Fixed Mixins that were targeting the wrong class/methods. 2020-09-19 02:48:59 +02:00
Sebastian Hartte d8e5f4fed5 Fixed formatating after migrating mappings. 2020-09-19 02:41:53 +02:00
Sebastian Hartte 47dfc19b7c Renamed mixin after mapping update. 2020-09-19 02:40:51 +02:00
Sebastian Hartte 45f5851079 Updated versions, and mappings. 2020-09-19 02:40:35 +02:00
Sebastian Hartte 76efe6026d Add an indicator that shows the number of active crafting jobs. 2020-09-18 21:34:42 +02:00
yueh 4e03cbd356 Simply build all branches 2020-09-18 10:32:06 +02:00
Sebastian Hartte ce058b006c Fixes #4748: badly filtered inventory leads to crashes, also expose the ME storage again. 2020-09-18 03:11:33 +02:00
yueh 9005db6f1c Fix yaml syntax 2020-09-17 21:42:20 +02:00
yueh 58afe755b8 Build PRs for all release branches (#4746) 2020-09-17 21:37:53 +02:00
Sebastian Hartte f368f9dac2 Fixes #4697: Show number of required items in condenser tooltips. 2020-09-17 14:33:43 +02:00
Sebastian Hartte e5b45d51cc Minor style fixes. 2020-09-17 11:43:29 +02:00
shartte 5a1d5356d1 Fixes #4733: Fix a crash bug when an external machine tries draining fluids from a fluid interface without a filter. (#4738) 2020-09-16 23:13:18 +02:00
Sebastian Hartte 5aef82b9ef Optimized Imports 2020-09-16 21:35:47 +02:00
Sebastian Hartte 483f93f977 Post-merge fixes and item generator fix. 2020-09-16 20:12:38 +02:00
Sebastian Hartte 1759f92164 Prevent FG from force-exiting the daemon if runData is used. 2020-09-16 19:51:22 +02:00
Sebastian Hartte e50c13e570 Rolled back the memory change since it'll cause a daemon to launch even during a CI build. 2020-09-16 19:29:47 +02:00
Sebastian Hartte c0575e11b0 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	build.gradle
#	gradle.properties
#	gradle/scripts/artifacts.gradle
#	gradle/scripts/curseforge.gradle
#	gradle/wrapper/gradle-wrapper.jar
#	gradle/wrapper/gradle-wrapper.properties
#	src/main/java/appeng/block/networking/CableBusBlock.java
#	src/main/java/appeng/client/gui/AEBaseScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceTerminalScreen.java
#	src/main/java/appeng/client/gui/widgets/Scrollbar.java
#	src/main/java/appeng/core/sync/packets/JEIRecipePacket.java
#	src/main/java/appeng/tile/AEBaseBlockEntity.java
#	src/main/resources/META-INF/mods.toml
2020-09-16 18:57:15 +02:00
Sebastian Hartte 749dd35f88 Updated forge and increased memory for IDE-sync daemon. 2020-09-16 18:18:22 +02:00
Sebastian Hartte ca79a377bd Merge remote-tracking branch 'origin/8.0.x-1.16.1'
# Conflicts:
#	gradle/scripts/dependencies.gradle
2020-09-16 17:49:59 +02:00
Sebastian Hartte 475c8ff5a1 Adapt the same sorting logic used for items stored in the network for items obtained from patterns, which fixes items from patterns not being able to be shift-clicked into new patterns. 2020-09-16 17:44:49 +02:00
yueh 5b3ccf26d0 Merge all gradle files (#4732)
* Merge all gradle files

The specific build files are now much smaller, so a single one is mostly acceptable now.
Also updates Gradle to 5.6.3

* Disable the Mixin annotation processor when importing this project into IntelliJ since it should only be needed to generate refmaps on an actual build.

* Removed Sonarqube and JaCoCo plugins.

Co-authored-by: Sebastian Hartte <sebastian@hartte.de>
2020-09-14 14:14:00 +02:00
Sebastian Hartte e73dbe4891 Updated Forge / MC to 1.16.3
Keep Mappings
Allow higher range for MC + Forge versions
2020-09-14 02:02:59 +02:00
Sebastian Hartte 38244000c9 Fixes #4731: Take the position where the user clicked the handle into account when calculating the new scrollbar position.
Also fixes: The scrollbar did not subtract the handle height when determining the available space for moving the handle, thus introducing drift the further down a user scrolled.
Also fixes: The scrollbar did not resize it's trackbar when the ME inventory screens were resized and the number of rows changed, same for craft confirm.
2020-09-13 23:12:59 +02:00
Sebastian Hartte d87ff9d1e7 Formatting fixes. 2020-09-13 22:18:38 +02:00
Sebastian Hartte 4ba97ec899 Remove unnecessary debug prints, and rename methods. 2020-09-13 22:11:40 +02:00
Sebastian Hartte 0147e1ddfb Fixes #4730 and also introduces repeat-pageup/pagedown when holding the mouse on the area above or below the scrollbar handle. 2020-09-13 22:09:47 +02:00
yueh 621d2ee715 Fixes #4728: Mark all offloading threads as daemons (#4729) 2020-09-13 11:55:18 +02:00
Sebastian Hartte 31ecdfbe0a Use the correct method to update an entities position forcefully. 2020-09-11 18:04:17 +02:00
Sebastian Hartte f0bfbfec48 Should also actually _use_ the fixed invoker... 2020-09-11 17:25:39 +02:00
Sebastian Hartte 06a8843a65 Fix a Mixin bug that causes an Invoker conflict with Patchouli.
See https://github.com/SpongePowered/Mixin/issues/430
2020-09-11 17:20:20 +02:00
shartte d07937fa93 Render Performance Improvements (#4721)
* Return a fixed bounding box for frustrum culling of AE tile entity renderers to prevent Forge from re-retrieving the TE from the world and calculating the collision box (very costly for cables).

* Changed dynamic cable bus lighting to be based on block states to improved rendering speed and fix optifine issues. (Potential fix for #4716).
2020-09-10 22:56:50 +02:00
shartte 65f58913a4 Make players assume ownership of networks when they place security stations onto unsecured ones (#4714)
* Fixes #4712: When a security station is placed onto an unsecured network, the placer assumes ownership of the entire network. Otherwise the contiguous network would not necessarily reconnect in the same way when the chunk is reloaded due to differing player-ids throughout the network.
In addition, changes to the node's owner were not being persisted due to the host never being marked as dirty.

* Fix formatting
2020-09-10 22:34:16 +02:00
Sebastian Hartte 2bca23d75d Rebuilt the recipe transfer after upstream changes. 2020-09-10 22:05:06 +02:00
Sebastian Hartte b47543d166 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	gradle.properties
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/sync/packets/JEIRecipePacket.java
#	src/main/java/appeng/entity/TinyTNTPrimedEntity.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidSlotWidget.java
#	src/main/java/appeng/fluids/container/FluidConfigurableContainer.java
#	src/main/java/appeng/integration/modules/jei/FacadeRegistryPlugin.java
#	src/main/java/appeng/integration/modules/jei/JEIPlugin.java
#	src/main/java/appeng/integration/modules/jei/RecipeTransferHandler.java
#	src/main/java/appeng/mixins/structure/BiomeAccessor.java
#	src/main/java/appeng/parts/automation/AnnihilationPlanePart.java
#	src/main/java/appeng/parts/automation/FormationPlanePart.java
2020-09-10 19:20:58 +02:00
Sebastian Hartte a340925d98 Fix Wireless screen translated text. 2020-09-10 19:06:00 +02:00
yueh b8e53adf40 Fixes #4719: Take the entity size into account when spawning item entities (#4720) 2020-09-10 17:54:02 +02:00
yueh 44544c598f Fixes #4253: Just transfer the recipe id instead of every ingredient. (#4689)
* Fixes #4253: Just transfer the recipe id instead of every ingredient.
* If possible handle any IRecipe for processing mode
* Improvements and support for AE2 facades.
* Switched to using JEI's displayed stacks (which means we can remove the shapeless variant).

Co-authored-by: Sebastian Hartte <sebastian@hartte.de>
2020-09-09 14:08:24 +02:00
Sebastian Hartte 0be7322c2c Formatting Fixes. 2020-09-09 02:27:12 +02:00
Sebastian Hartte a521e827db Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/core/api/definitions/ApiItems.java
2020-09-09 02:25:15 +02:00
Sebastian Hartte bcee2ec427 Slightly increased the height of the item hitbox for crystals to make their pickup by annihilation planes less "clippy". 2020-09-09 02:23:58 +02:00
Sebastian Hartte 17648633fe Merge fixes. 2020-09-09 02:23:14 +02:00
Sebastian Hartte fcbebd4ffc Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	gradle.properties
#	src/api/java/appeng/api/implementations/items/IGrowableCrystal.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/core/api/definitions/ApiBlocks.java
#	src/main/java/appeng/core/features/registries/LocatableRegistry.java
#	src/main/java/appeng/decorative/solid/QuartzGlassBlock.java
#	src/main/java/appeng/decorative/solid/SkyStoneBlock.java
#	src/main/java/appeng/entity/GrowingCrystalEntity.java
#	src/main/java/appeng/fluids/parts/FluidImportBusPart.java
#	src/main/java/appeng/items/misc/CrystalSeedItem.java
#	src/main/java/appeng/items/tools/powered/ColorApplicatorItem.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCluster.java
#	src/main/java/appeng/parts/CableBusContainer.java
#	src/main/java/appeng/tile/AEBaseBlockEntity.java
2020-09-09 01:41:49 +02:00
Sebastian Hartte 9e41d543f5 Merge remote-tracking branch 'origin/8.0.x-1.16.1' 2020-09-09 00:59:58 +02:00
Sebastian Hartte 81cc0b804d Fixes #4699: AE's glass should only hide it's sides adjacent to other AE glass.
Also disables spawn on AE's glass same as Vanilla glass.
2020-09-09 00:58:14 +02:00
Sebastian Hartte e1fc9908b3 Fixes #4693: Fix color applicator not working on cable-buses. 2020-09-09 00:51:45 +02:00
shartte 9ed1535477 Fixes #4661: Do not update a tile entity when it's in an unloaded chunk (i.e. during chunk unloading) (#4708) 2020-09-08 22:28:30 +02:00
Sebastian Hartte 1ef345d4a4 Formatting fixes. 2020-09-08 22:24:27 +02:00
Sebastian Hartte ff7d1b9719 Fixes #4704: QNB is not finding a registered QNB because it believes the chunk to be unloaded.
Also adds debug logging to the locatable registry to better debug this issues in the future.
2020-09-08 22:20:33 +02:00
shartte 88c9370e4f Crystal Growth Refactor (#4702)
* Refactored crystal in-world purification:
- Removed iterative formula
- Set the default growth factor to 1 rather than 0.5 to simplify settings
- Made the growth-tick-progress-per-tick a configuration setting for 0-6 accelerators
- Unfinished seeds now slowly sink when ejected by an annihilation plane or other system (emulates a player throwing it in)
- Instead of checking for "isLiquid", we now check for a new tag (appliedenergistics2:crystal_purification_medium) to check if the crystal is submerged in an allowed fluid for growth, defaults to #minecraft:water.

* Removed configuration options for changing how accelerators work,
replaced with improved fluid tag option with a clamped multiplier [1,10].
2020-09-08 18:10:45 +02:00
Sebastian Hartte f2aae3ef0f Added a global Voxelshape cache for cable bus voxel shapes, since combining voxel shapes turns out to be an extremely expensive process (i.e. 1.7s for 10000x5 shapes). 2020-09-08 17:56:02 +02:00
Sebastian Hartte 12739f1e66 Remove unneeded cable-bus inventory-model, which caused the part models to be loaded twice leading to unnecessary memory-usage. 2020-09-08 17:53:14 +02:00
shartte 81d2170ada Implemented a cache with maximum quad-count it will cache for the cable bus, (#4670)
which also fixes concurrent access to the hashmap.

(cherry picked from commit b756d68be1)
2020-09-08 14:28:08 +02:00
Sebastian Hartte 0f469e9df6 Bumped Forge version. 2020-09-07 23:34:56 +02:00
Sebastian Hartte 0f34f09b32 Remove object-scanning subscriptions and remove unused test-file. 2020-09-06 20:59:37 +02:00
Sebastian Hartte 8e54a8fed9 Fixes a problem where tile entities would become unremovable (well, one more of these at least),
because they would reset their block state upon removal and loss of power.
2020-09-06 20:59:19 +02:00
Sebastian Hartte ca007a3737 Fix compatibility with fabric-api 0.20 2020-09-05 19:30:00 +02:00
Sebastian Hartte 92b6650022 Reformat. 2020-09-05 19:22:21 +02:00
Sebastian Hartte e1cd3bba25 Improved logging and slight refactor. 2020-09-05 19:22:05 +02:00
Sebastian Hartte 689bf6e8d9 Removed unused worldgen registry,
added biome blacklists for meteorites and quartz ore, and
also fixed adding meteorite/quartz to biomes that are
registered after AE2 initializes.
2020-09-05 19:15:45 +02:00
Sebastian Hartte c8a5049d71 Fix path to AE2 logo in mod json. 2020-09-03 23:33:48 +02:00
Sebastian Hartte 10a1a6d855 Fixes #4674: Facade quads should not keep their original cull-faces if they're moved away
from the block face.
2020-09-03 17:54:23 +02:00
Sebastian Hartte d9bb81a00f Fixes #4680: Facade advancement is showing an untextured facade. 2020-09-03 17:36:20 +02:00
yueh 39e038d916 Fixes #4683: Hopefully LazyOptional works as advertised (#4684) 2020-09-02 21:36:40 +02:00
Sebastian Hartte 575a625f75 Also update the layer-map, even though the spatial biome should never show up in any vanilla layering. 2020-09-02 19:44:37 +02:00
Sebastian Hartte 89ea923c43 Merge fixes 2020-09-02 19:41:44 +02:00
Sebastian Hartte 5d818eb03e Merge remote-tracking branch 'origin/master' into fabric/master 2020-09-02 02:55:39 +02:00
Sebastian Hartte 12ca8d109a Merge remote-tracking branch 'origin/8.0.x-1.16.1' 2020-09-02 02:55:12 +02:00
Sebastian Hartte e34126458b Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	gradle.properties
#	src/main/java/appeng/client/gui/Size1Slot.java
#	src/main/java/appeng/client/me/SlotFluidME.java
#	src/main/java/appeng/client/me/SlotME.java
#	src/main/java/appeng/client/render/cablebus/CableBusBakedModel.java
#	src/main/java/appeng/client/render/cablebus/CableBusModelLoader.java
#	src/main/java/appeng/core/sync/packets/MEFluidInventoryUpdatePacket.java
#	src/main/java/appeng/core/sync/packets/MEInterfaceUpdatePacket.java
#	src/main/java/appeng/core/sync/packets/MEInventoryUpdatePacket.java
#	src/main/java/appeng/datagen/providers/loot/BlockDropProvider.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidSlotWidget.java
#	src/main/java/appeng/fluids/container/FluidConfigurableContainer.java
#	src/main/java/appeng/fluids/helper/FluidCellConfig.java
#	src/main/resources/META-INF/mods.toml
2020-09-02 02:45:31 +02:00
Sebastian Hartte 0ac918c363 Fixed exclusion zones for many screens. 2020-09-02 02:37:47 +02:00
Sebastian Hartte b6160e40bc Fixes #4671: Use other Ingredient method which is not client-only. 2020-09-02 01:49:24 +02:00
Sebastian Hartte cf103b06c1 Fixes #4677: Stackoverflow when crafting with the quartz knife. 2020-09-02 00:12:20 +02:00
yueh f0d0595c8f Fixes #4669: Take NBT into account for comparing. (#4675)
This only covers combining different items together.
Fuzzy filtering is still a bit too fuzzy for corner cases.
2020-09-01 21:59:08 +02:00
shartte b756d68be1 Implemented a cache with maximum quad-count it will cache for the cable bus, (#4670)
which also fixes concurrent access to the hashmap.
2020-09-01 18:20:51 +02:00
Sebastian Hartte 60b07e5ca5 Merge branch '8.0.x-1.16.1' 2020-09-01 01:07:47 +02:00
shartte 7c99fca789 Fixes removal of facades not invalidating the cached server-side collision boxes. (#4663)
(cherry picked from commit 957bc4c5cc)
2020-09-01 01:07:30 +02:00
yueh ab393b0ed1 Serialize the complete NBT data to avoid mismatches (#4665)
This might increase the network traffic a bit, but the amount of mods actually using the share tag seems to be very limited.
For now it is worth the risk as it solves the problem. In case we run into actual issues, there might still be other solutions, which will be way more complex and can potentially introduce additional problems.

(cherry picked from commit e90dd2f9c6)
2020-09-01 01:07:28 +02:00
shartte 957bc4c5cc Fixes removal of facades not invalidating the cached server-side collision boxes. (#4663) 2020-08-31 23:10:25 +02:00
yueh 133ed1f09d Remove GZipStreams from packets. (#4664)
This should now be handled by the normal network manager (hopefully).
Also renamed the `CompressedNBTPacket` to `MEInterfaceUpdatePacket` as that is the only use case.
2020-08-31 23:09:28 +02:00
yueh e90dd2f9c6 Serialize the complete NBT data to avoid mismatches (#4665)
This might increase the network traffic a bit, but the amount of mods actually using the share tag seems to be very limited.
For now it is worth the risk as it solves the problem. In case we run into actual issues, there might still be other solutions, which will be way more complex and can potentially introduce additional problems.
2020-08-31 23:09:14 +02:00
Sebastian Hartte 9719c7ffc3 Bump to Forge 33.0.22 2020-08-29 23:13:29 +02:00
Sebastian Hartte 319d92a371 Merge branch '8.0.x-1.16.1' 2020-08-29 22:18:12 +02:00
shartte db9ec2b070 Remove the use of SlotItemHandler since we are only faking an inventory-backed slot, (#4654)
we might as well use what we had used pre-2017, which is simply extending a normal Slot.
This should also fix #4652.
2020-08-29 22:03:35 +02:00
Sebastian Hartte 5d33005aaf Added back dynamic cable bus lighting. 2020-08-29 01:02:32 +02:00
Sebastian Hartte 87cf070b33 Fixes #4657: Remove usage of an implementation class and just copy the needed values into arrays. 2020-08-29 00:45:01 +02:00
Masakitenchi 3a0552c56e Update zh_cn.json (#4653) 2020-08-28 10:49:11 +02:00
Sebastian Hartte b1a55f3a79 Bumped dependencies. 2020-08-27 00:49:41 +02:00
Sebastian Hartte 226e9596ee Fix the fluid export bus not actually extracting fluids from storage when exporting. 2020-08-27 00:21:14 +02:00
Sebastian Hartte 5cab9c8799 Fix rendering of fluid filter slots in UIs. 2020-08-27 00:20:53 +02:00
Sebastian Hartte 1d2ac29742 Document Maven Repositories. 2020-08-26 23:22:17 +02:00
Sebastian Hartte cbe6012b98 Merge remote-tracking branch 'origin/master' into fabric/master 2020-08-26 23:20:50 +02:00
Sebastian Hartte 8a0dd192e5 Added Modmaven repository to README.md 2020-08-26 23:19:42 +02:00
Sebastian Hartte 1842febf86 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	build.gradle
2020-08-26 11:41:13 +02:00
Sebastian Hartte a97b35f3d0 Merge branch '8.0.x-1.16.1' 2020-08-26 11:39:20 +02:00
Sebastian Hartte 00d4c20d9f Strip pom.xml dependencies. 2020-08-26 11:39:03 +02:00
Sebastian Hartte d2b69671f5 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/tile/grid/AENetworkInvBlockEntity.java
2020-08-24 23:55:41 +02:00
Sebastian Hartte 1394ab0863 Merge branch '8.0.x-1.16.1' 2020-08-24 23:54:57 +02:00
Sebastian Hartte 5efc085693 Fix tiles that have a "powered" block state from not being able to be broken when
they are connected to a powered grid.
2020-08-24 23:54:37 +02:00
Sebastian Hartte 359e3f7e63 Fix crystal despawning. 2020-08-24 23:13:58 +02:00
Sebastian Hartte fa3e41e687 Fix remaining filtered item handler uses. 2020-08-24 22:48:07 +02:00
Sebastian Hartte 4e86c92720 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/client/gui/implementations/InterfaceTerminalScreen.java
2020-08-24 22:34:26 +02:00
Sebastian Hartte 159f4c7f14 Merge branch '8.0.x-1.16.1' 2020-08-24 22:33:38 +02:00
Sebastian Hartte aff94cec8c Fix search box interactions in the interface terminal. 2020-08-24 22:33:04 +02:00
Sebastian Hartte 07dfa3db2e Fix filtered inventory for IO port. 2020-08-24 21:24:51 +02:00
Sebastian Hartte e0e139900f Fix Spatial IO Port filtered inventory. 2020-08-24 21:19:27 +02:00
Sebastian Hartte 9942f2d32c Fix filtered inventory for Grinder 2020-08-24 21:11:52 +02:00
Sebastian Hartte 858826d1fa Fix use of Fuel Registry (it is null not, 0 for unregistered items).
Fix Vibration Chamber inventory filter.
Fix Molecular Assembler inventory filter.
2020-08-24 20:58:49 +02:00
Sebastian Hartte 90ad345672 Slight wrench cleanup. 2020-08-24 20:34:57 +02:00
Sebastian Hartte 9a81ebfa50 Check the REI search field for being null before using it. 2020-08-24 20:25:03 +02:00
Sebastian Hartte da9fa3d697 Merge remote-tracking branch 'origin/master' into fabric/master 2020-08-24 01:07:08 +02:00
Sebastian Hartte ee7fe9f40d Merge branch '8.0.x-1.16.1' 2020-08-24 01:06:50 +02:00
Sebastian Hartte 2184d03d0b Actually save the rotation when a tile is rotated. 2020-08-24 01:06:26 +02:00
Sebastian Hartte cae1621613 Fix inscriber inventory filtering, and accidental overwriting of the output slot. 2020-08-24 01:01:16 +02:00
Sebastian Hartte e8574d03ea Use a different heuristic for determining how to render items in the middle of the inscriber. 2020-08-24 01:00:33 +02:00
Sebastian Hartte d28f33d198 Split into internal and external inventories.
Fixes Charger not being able to load inventories that violated the filter.
2020-08-24 00:01:18 +02:00
Sebastian Hartte 7df5bf4076 Fix crank not attaching sideways. 2020-08-23 23:49:50 +02:00
Sebastian Hartte 66760865a3 Split resource generation and build because there's a hidden dependency. 2020-08-23 23:12:47 +02:00
Sebastian Hartte e4a08ba99d Log where resources are being generated. 2020-08-23 23:07:12 +02:00
Sebastian Hartte f11e9e2a4c Actually generate data for branch-builds too. 2020-08-23 22:54:52 +02:00
Sebastian Hartte 7a469c1a1d Fix server-side HYWLA problems. 2020-08-23 22:30:08 +02:00
Sebastian Hartte e256a4f664 Post-Merge fixes. 2020-08-23 21:20:51 +02:00
Sebastian Hartte 73cc3f8998 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	gradle.properties
#	src/main/java/appeng/core/api/definitions/ApiItems.java
2020-08-23 21:08:47 +02:00
Sebastian Hartte 9c9a49f9e7 Merge branch '8.0.x-1.16.1' 2020-08-23 20:48:19 +02:00
Sebastian Hartte 44c0931c02 Fixes #4635: Actually remove requesters when removing requesters. 2020-08-23 20:47:05 +02:00
Sebastian Hartte 874f46ed4d Fixes #4633: Storage buses cannot see attached inventories. 2020-08-23 11:23:35 +02:00
Sebastian Hartte b7949e4134 Re-Enabled JEI and TOP in dev. 2020-08-22 19:56:37 +02:00
Sebastian Hartte ea95913ec8 Merge branch '8.0.x-1.16.1' 2020-08-22 19:38:36 +02:00
yueh 423ab81813 Added step to publish to modmaven (#4607)
(cherry picked from commit 7e1bfdb5ac)
2020-08-21 20:40:03 +02:00
Sebastian Hartte d82c713112 Delay registration of various client settings until the client is fully initialized. 2020-08-21 00:00:03 +02:00
Sebastian Hartte 45cbc40177 Fix wrench interaction with part hosts. 2020-08-20 22:58:49 +02:00
shartte 33d7f02323 Fixes #4590: Crystal seeds (other than certus) don't display their growth stages. (#4619) 2020-08-19 16:43:47 +02:00
shartte 4e42b17e81 Fixes #4590: Crystal seeds (other than certus) don't display their growth stages. (#4618) 2020-08-19 16:43:45 +02:00
Sebastian Hartte 0e7e9313ee Fixes wrenches not working on tile entities.
This is a temporary hack for now.
2020-08-19 01:53:51 +02:00
Sebastian Hartte 2bba843313 Remove unused code in Condenser. 2020-08-19 01:34:15 +02:00
Sebastian Hartte a0949297d5 Added AE tools to fabric tool tags to fix breaking speed. 2020-08-19 01:34:08 +02:00
Sebastian Hartte 420fb272b4 Bump LBA version to fix filter bugs. 2020-08-19 01:33:34 +02:00
Sebastian Hartte debd2de42e Fix Maven publication. 2020-08-18 20:12:09 +02:00
Sebastian Hartte 3fb813a81b Remove Hopper Mixins now merged into LBA. 2020-08-18 19:46:03 +02:00
Sebastian Hartte ab05f5fec9 Updated LBA 2020-08-18 17:34:29 +02:00
Sebastian Hartte 9e4f51db6e Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/entity/TinyTNTPrimedEntity.java
2020-08-18 01:37:21 +02:00
shartte b8d4f0cffa Fixes #4611: Use of client-side only method for Tiny TNT explosion. (#4612) 2020-08-18 01:35:31 +02:00
shartte fc0f8eab56 Fixes #4611: Use of client-side only method for Tiny TNT explosion. (#4612) 2020-08-18 01:33:47 +02:00
Sebastian Hartte 74480502b1 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	.github/workflows/release.yml
2020-08-18 00:20:46 +02:00
yueh 7e1bfdb5ac Added step to publish to modmaven (#4607) 2020-08-17 22:28:01 +02:00
shartte 41b7900706 Fixes #4598: Incorrectly rotated face for determining block lightlevel in ME Chest renderer. (#4599) (#4609)
(cherry picked from commit 954ce1442e)
2020-08-17 21:58:51 +02:00
shartte 1f9707e256 Fixes #4602: Prevent encoding invalid patterns and handle corrupted patterns a little more gracefully. (#4608) 2020-08-17 21:50:28 +02:00
shartte 7656157b0d Fixes #4602: Prevent encoding invalid patterns and handle corrupted patterns a little more gracefully. (#4608) 2020-08-17 21:49:37 +02:00
shartte 954ce1442e Fixes #4598: Incorrectly rotated face for determining block lightlevel in ME Chest renderer. (#4599) 2020-08-17 21:43:16 +02:00
Sebastian Hartte 739277ab64 Removed unused tunnel types and files.
Added more tags, moved ender pearl dust to convention tag.
Added compatibility with TechReborn's chargers.
2020-08-17 19:00:32 +02:00
Sebastian Hartte cf656e1540 Added initial TechReborn compatibility to the EnergyAcceptor. 2020-08-16 18:14:57 +02:00
Sebastian Hartte ab6f46077b Now really fix the encoded pattern not showing the tooltip with spaces. 2020-08-16 14:26:37 +02:00
Sebastian Hartte e9c7312e98 Merge fixes 2020-08-16 14:26:17 +02:00
Sebastian Hartte 006cf2f8c1 Fix missing spaces in encoded pattern item. 2020-08-16 14:06:31 +02:00
Sebastian Hartte 636dce66e3 Hide more Items in REI. 2020-08-16 14:06:22 +02:00
Sebastian Hartte 2787796cd3 Fix Text#toString use on the crafting screens. 2020-08-16 14:06:05 +02:00
Sebastian Hartte ee67c5ea50 Use different naming for fullbright, and always reset it back after setting it. 2020-08-16 14:05:10 +02:00
Sebastian Hartte 506c516384 Enable publishing again 2020-08-15 18:54:07 +02:00
Sebastian Hartte 011455e327 Further testing tags 2020-08-15 18:42:20 +02:00
Sebastian Hartte 11d772a32b Fixed client-side only Text methods. 2020-08-15 17:44:28 +02:00
Sebastian Hartte f20f0e003e Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	gradle.properties
#	src/main/java/appeng/server/subcommands/SpatialStorageCommand.java
2020-08-15 17:34:54 +02:00
Sebastian Hartte 0f100341d3 Added experimental site export mod. 2020-08-15 17:33:59 +02:00
Sebastian Hartte 73735c5cd5 Remove use of func_244388_a, which is client-only. 2020-08-15 17:29:36 +02:00
Sebastian Hartte c1713f1682 Bump to Forge 33.0.5 2020-08-15 14:32:53 +02:00
Sebastian Hartte b1feeca41c Fixup imports + formatting. 2020-08-15 03:18:23 +02:00
Sebastian Hartte 7d43d79682 Merge remote-tracking branch 'origin/master' into fabric/master 2020-08-15 03:16:03 +02:00
Sebastian Hartte 5cd148ab5a Added curseforge publishing. 2020-08-15 02:51:32 +02:00
Sebastian Hartte 6c544f2211 Reformatted, and ported back some enhancements from the Forge version. 2020-08-15 02:51:03 +02:00
Sebastian Hartte f455fd1994 Initial port to 1.16.2 2020-08-13 23:29:55 +02:00
Sebastian Hartte 1657c88681 Initial port to 1.16.2 2020-08-13 23:15:09 +02:00
Sebastian Hartte fd67e0e5c6 Initial port to 1.16.2 2020-08-13 23:14:49 +02:00
Sebastian Hartte 0a2f03aa92 Moved Creative Tabs to Bootstrap. 2020-08-12 18:42:58 +02:00
Sebastian Hartte b03a249da3 Remove libstructure
Migrate to 1.16.2 final
2020-08-12 18:23:32 +02:00
Sebastian Hartte 6f0fc7d189 Fabric Snapshots 2020-08-11 20:08:07 +02:00
Sebastian Hartte fd8eecbe93 Fabric Snapshots 2020-08-11 20:04:43 +02:00
Sebastian Hartte 0a60b3ebb2 Fabric Snapshots 2020-08-11 20:01:50 +02:00
Sebastian Hartte 15522f5ce7 Fabric Snapshots 2020-08-11 19:51:34 +02:00
Sebastian Hartte 964559baa1 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java
2020-08-11 16:35:05 +02:00
Sebastian Hartte 87c2c94bd4 Use minus sign for minus buttons in number widget. 2020-08-11 16:31:20 +02:00
Sebastian Hartte 06f30b3daa Reformat 2020-08-11 16:21:05 +02:00
Sebastian Hartte 68a02ed64b Updated to 1.16.2-rc2 2020-08-11 16:20:31 +02:00
Sebastian Hartte c59a6e34eb Post-merge fixes 2020-08-11 02:12:26 +02:00
Sebastian Hartte 5b4f450fc3 Fix toLowerCase issues 2020-08-11 02:07:32 +02:00
Sebastian Hartte ff0d38d56a Merge fixes 2020-08-11 01:36:51 +02:00
yueh d591a1492c Fixes #4583: Confine fluix crafting into the same block (#4586)
Fluix crystals will now spawn within an area around the center of the block as well as some tuned down motion while still maintaining some randomness.
2020-08-10 11:30:04 +02:00
shartte d1ba26311b One Spatial Dimension (#4570)
* Ported the "one spatial dimension" concept from pre-1.15

* Apply lighting updates after moving chunks.
Mark world data as dirty when changing it.

* Consolidated naming of spatial storage world/dimension.
Use server light manager to update lighting info in chunk.

* Save last transition information,
and add ae2 spatial command to interact with spatial storage.

* Formatting fixes.

* Improved docs for the origin generation.

Inverted condition on when the x/z axis are flipped.
Also added a helper to map a plot to a region file

* Remove TransitionResult since it's only used in lieu of a boolean.
Rework transition to make the checks BEFORE allocating a new cell.

* Removed unused imports.

Co-authored-by: yueh <yueh@users.noreply.github.com>
2020-08-10 11:29:07 +02:00
shartte 8733c2c11f Fix Special Model Registration (#4577)
* Fixes #4575 by updating Forge (ModelRegistryEvent is a modbus event but was misflagged as not being one). And update Forge because their breaking change breaks our mod.

* Update gradle.properties

Co-authored-by: yueh <yueh@users.noreply.github.com>

* Update src/main/resources/META-INF/mods.toml

Co-authored-by: yueh <yueh@users.noreply.github.com>

Co-authored-by: yueh <yueh@users.noreply.github.com>
2020-08-10 11:25:26 +02:00
yueh 4230fc7325 Fixes #4576: Append the amount to each button (#4580) 2020-08-09 13:23:24 +02:00
shartte 484af8baf3 Fixes #4574 by referencing only non-pure fluix crystals in the fluix dust grinder recipe. (#4578) 2020-08-09 12:24:42 +02:00
shartte 9456f639d4 Simplify "unlit" quad loading and move to Mixins (#4569)
* Simplified the UV loader concept: We only need it to make quads "unlit" which means that the lighting system is not applied to them. They always render at their full brightness.

* More documentation and slight cleanups.
2020-08-09 01:27:19 +02:00
shartte fe753c540b Fixes #4571: When not used for displaying localized text, specify Locale.ROOT for toLowerCase/toUpperCase to avoid issues with locale-specific non-ASCII lowercase conversions for ASCII uppercase characters (i.e. turkish lowercase i for uppercase I). (#4573) 2020-08-08 14:56:51 +02:00
Sebastian Hartte 2fabab3a6a Fix AO lighting for faces not fully snapped to block edges. 2020-08-08 02:20:40 +02:00
shartte 6f39bd8fe8 Move the nether quartz dust tag to the forge namespace and use it instead of AE's internal one. (#4568) 2020-08-07 23:13:02 +02:00
yueh c7d3877129 Use the declared power drain for p2p tunnels (#4567) 2020-08-06 20:07:40 +02:00
Sebastian Hartte 89058448cf Merged most recent master. 2020-08-06 00:46:20 +02:00
Sebastian Hartte 3c737d8d1e Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/client/gui/AEBaseScreen.java
#	src/main/java/appeng/client/gui/widgets/CustomSlotWidget.java
#	src/main/java/appeng/client/gui/widgets/ITooltip.java
#	src/main/java/appeng/client/gui/widgets/IconButton.java
#	src/main/java/appeng/client/gui/widgets/ProgressBar.java
#	src/main/java/appeng/client/gui/widgets/SettingToggleButton.java
#	src/main/java/appeng/client/gui/widgets/ToggleButton.java
#	src/main/java/appeng/container/slot/PlayerInvSlot.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidSlotWidget.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidTankWidget.java
#	src/main/java/appeng/fluids/client/gui/widgets/OptionalFluidSlotWidget.java
#	src/main/java/appeng/fluids/parts/FluidAnnihilationPlanePart.java
#	src/main/java/appeng/parts/automation/AbstractFormationPlanePart.java
#	src/main/java/appeng/parts/automation/AnnihilationPlanePart.java
#	src/main/java/appeng/parts/automation/FormationPlanePart.java
#	src/main/java/appeng/parts/automation/IdentityAnnihilationPlanePart.java
#	src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java
2020-08-05 23:40:58 +02:00
Sebastian Hartte a807b4e3ad Updated LBA to fix crashbug. 2020-08-05 23:28:45 +02:00
Sebastian Hartte 8f740be431 Respect max amount per slot. 2020-08-05 23:15:04 +02:00
Sebastian Hartte 77e07e9b3b Remove shape logic in AEBaseInvBlockEntity and bring offering inventories in line with caps. 2020-08-05 23:12:39 +02:00
Sebastian Hartte d04cd2a001 Actually implement WrapperFilteredItemHandler. 2020-08-05 23:12:03 +02:00
Sebastian Hartte 8f2b7fe16b Forgot to add the hopper mixin. 2020-08-05 23:11:44 +02:00
Sebastian Hartte 239f8d027a Fix network status screen showing translation keys. 2020-08-05 23:11:31 +02:00
Sebastian Hartte c4c4d20303 Added Vanilla Hopper integration. 2020-08-05 23:06:56 +02:00
Sebastian Hartte e7c57c0f61 Update the nominal face after the cull face, since
updating the cull face will also force the nominal
face to the cull face.
2020-08-05 23:06:09 +02:00
Sebastian Hartte 822249dda8 Added missing @Override annotations. 2020-08-05 22:11:00 +02:00
yueh 1404806d3d Fixes #4559: Use visual bounding box for overlay (#4561) 2020-08-05 21:52:34 +02:00
yueh 12e3fa9127 Makes formation planes a bit more consistent and less violent. (#4553)
* Makes formation planes a bit more consistent and less violent.

Items will now have a slower speed when spawning as well as a narrower area to avoid having them glitch into a wall and be teleported around

* Removed debug output, added clarifying parenthesis and extracted method.

* Fixes various other issues with the formation plane

Also removed now useless code

Co-authored-by: Sebastian Hartte <sebastian@hartte.de>
2020-08-05 17:56:42 +02:00
shartte 8617dc8340 Plane Connection Refactor (#4556)
* Refactors all plane parts to use a common helper for
calculating connections to adjacent planes.
Also fixes problems with updating these connections on neighbor updates.

* Fix conflicting GuiSync ID.

* Slightly refactor PlaneConnectionHelper, and fix an issue where the bounding box was calculated incorrectly by using the wrong up-direction.
2020-08-05 17:45:33 +02:00
shartte 9bc844738c Fixes #4547: Name clash between ITooltip#getWidth, ITooltip#getHeight and Vanilla Widget methods leads to missing methods at runtime, since the implementing methods will be remapped to SRG names, while referees of the interface will try to call the renamed methods by their name in the interface, leading to an AbstractMethodError. (#4557) 2020-08-05 16:33:44 +02:00
Sebastian Hartte eab6483bd7 Fixes #4551: Bounding box of annihilation planes is too small. 2020-08-05 00:54:26 +02:00
yueh 7ca9405c8b Apply the FE tunnel behaviour to the fluid tunnel (#4550) 2020-08-04 17:57:59 +02:00
yueh 39959145a3 Revert "Apply the FE tunnel behaviour to the fluid tunnel (#4545)" (#4549)
This reverts commit 22f552217f.
2020-08-04 08:45:10 +02:00
Sebastian Hartte 184fe8c1fc Fix items being lost when trying to stack items in the player inventory. 2020-08-03 22:29:03 +02:00
Sebastian Hartte 6f4722b393 Preliminary fix for AO-enabled auto-rotated blocks using the wrong face for getting lighting values. 2020-08-03 22:28:15 +02:00
yueh 22f552217f Apply the FE tunnel behaviour to the fluid tunnel (#4545)
* Apply the FE tunnel behaviour to the fluid tunnel

* Make a second pass to try and get all the requested fill amount sent out to outputs.

Co-authored-by: Sebastian Hartte <sebastian@hartte.de>
2020-08-03 21:39:34 +02:00
yueh 8f0e408772 Fixes NPE on empty tooltips (#4546) 2020-08-03 20:57:10 +02:00
Sebastian Hartte 62bbc32763 Minor cleanup. 2020-08-03 20:31:30 +02:00
Sebastian Hartte 414b01bddb Merge branch 'master' into fabric/master
# Conflicts:
#	src/main/java/appeng/block/storage/SkyChestBlock.java
#	src/main/java/appeng/client/render/tesr/SkyChestTESR.java
#	src/main/java/appeng/core/api/ApiPart.java
#	src/main/java/appeng/core/api/definitions/ApiItems.java
#	src/main/java/appeng/core/sync/packets/PartPlacementPacket.java
#	src/main/java/appeng/parts/PartPlacement.java
#	src/unported/java/appeng/client/ClientHelper.java
#	src/unported/java/appeng/core/CommonHelper.java
#	src/unported/java/appeng/server/ServerHelper.java
2020-08-03 15:15:14 +02:00
Sebastian Hartte 63c251294e Added custom item entity support via mixin. 2020-08-03 15:10:41 +02:00
shartte 872d8d33cb Clean up global state for cable render mode (#4539)
* Clean up the global state used to hack part interaction into respecting
the player's facade render mode. Make the name more indicative of
what is actually happening.

* Fun.
2020-08-03 14:46:39 +02:00
shartte 1801302d8f Fix SkyStone chest model issues that I had introduced back in 1.8. (#4542)
This makes the chest 1 pixel higher to restore the look it had in 1.7.
Since the skystone chest's texture is a grungy mess, only the most
obvious texture problems were fixed, while for the skystone block chest,
the look should be close to what it was now.
Also introduces caching for the skystone chest's block shape.
2020-08-03 14:46:23 +02:00
Sebastian Hartte 541f07a7e3 Fix output item stacking for condenser.
Fix exposed inventories for condenser.
2020-08-03 13:06:00 +02:00
Sebastian Hartte 1693271660 Fix recipe transfer for recipes that are not 3x3. 2020-08-03 13:05:34 +02:00
Sebastian Hartte 3a12fa4843 Minor cleanup. 2020-08-03 13:05:23 +02:00
Sebastian Hartte ba85da2c72 Fix SkyStone placement not immediately updating the compass. 2020-08-03 13:05:05 +02:00
Sebastian Hartte 469a1e205b Reactivated REI 2020-08-02 22:31:27 +02:00
Sebastian Hartte d238f6e8e4 Post-Merge fixes 2020-08-02 22:31:20 +02:00
Sebastian Hartte c0fa8ab2dc Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/client/me/SlotDisconnected.java
#	src/main/java/appeng/container/implementations/QuartzKnifeContainer.java
#	src/main/java/appeng/container/slot/AppEngCraftingSlot.java
#	src/main/java/appeng/container/slot/AppEngSlot.java
#	src/main/java/appeng/container/slot/CraftingMatrixSlot.java
#	src/main/java/appeng/container/slot/CraftingTermSlot.java
#	src/main/java/appeng/container/slot/DisabledSlot.java
#	src/main/java/appeng/container/slot/FakeBlacklistSlot.java
#	src/main/java/appeng/container/slot/FakeCraftingMatrixSlot.java
#	src/main/java/appeng/container/slot/FakeSlot.java
#	src/main/java/appeng/container/slot/FakeTypeOnlySlot.java
#	src/main/java/appeng/container/slot/InaccessibleSlot.java
#	src/main/java/appeng/container/slot/MolecularAssemblerPatternSlot.java
#	src/main/java/appeng/container/slot/NormalSlot.java
#	src/main/java/appeng/container/slot/OptionalFakeSlot.java
#	src/main/java/appeng/container/slot/OptionalNormalSlot.java
#	src/main/java/appeng/container/slot/OptionalRestrictedInputSlot.java
#	src/main/java/appeng/container/slot/OptionalTypeOnlyFakeSlot.java
#	src/main/java/appeng/container/slot/OutputSlot.java
#	src/main/java/appeng/container/slot/PatternOutputsSlot.java
#	src/main/java/appeng/container/slot/PlayerHotBarSlot.java
#	src/main/java/appeng/container/slot/PlayerInvSlot.java
#	src/main/java/appeng/container/slot/RestrictedInputSlot.java
2020-08-02 22:28:37 +02:00
Sebastian Hartte a85ffec9f9 Unified Parameter-Names for Slots 2020-08-02 22:12:08 +02:00
Sebastian Hartte 3e5787be76 Fix internal inventory on the client not being updated. 2020-08-02 20:58:24 +02:00
Sebastian Hartte 52ec63413f Fix client-side particle effects. 2020-08-02 20:58:03 +02:00
Sebastian Hartte 62ac6a0052 Fix server-side problems. 2020-08-02 18:09:21 +02:00
Sebastian Hartte 7f7b794c0b Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/block/crafting/CraftingMonitorBlockRendering.java
2020-08-02 15:46:11 +02:00
Sebastian Hartte a97ebaf40d Server can at least begin to launch now. 2020-08-02 15:45:59 +02:00
Sebastian Hartte 5fca946ef3 The lambda has to be replaced with an explicit method to annotate it with @OnlyIn. 2020-08-02 15:45:15 +02:00
Sebastian Hartte 80375c436d Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/core/api/definitions/ApiBlocks.java
2020-08-02 15:41:50 +02:00
Sebastian Hartte f8446209ce Move CraftingMonitor rendering customization out to its own class to circumvent issues with a client-side only lambda method being generated in a common-side class. 2020-08-02 15:40:50 +02:00
Sebastian Hartte 9ce4a65203 Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts:
#	src/main/java/appeng/block/misc/ChargerBlock.java
#	src/main/java/appeng/core/api/definitions/ApiBlocks.java
2020-08-02 15:15:39 +02:00
Sebastian Hartte f5aee56a0b Remove unused imports. 2020-08-02 15:14:28 +02:00
Sebastian Hartte 088627aedf Remove client-only methods from ChargerBlock which could potentially create synthetic lambda methods that reference client-only classes (and are not stripped). 2020-08-02 15:13:20 +02:00
Sebastian Hartte 2655620fd0 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	src/api/java/appeng/api/parts/IPart.java
#	src/main/java/appeng/block/AEBaseBlockItemChargeable.java
#	src/main/java/appeng/block/qnb/QnbFormedModel.java
#	src/main/java/appeng/bootstrap/BlockDefinitionBuilder.java
#	src/main/java/appeng/bootstrap/ItemDefinitionBuilder.java
#	src/main/java/appeng/client/render/BakedModelUnwrapper.java
#	src/main/java/appeng/client/render/BasicUnbakedModel.java
#	src/main/java/appeng/client/render/FacadeItemModel.java
#	src/main/java/appeng/client/render/cablebus/CableBusModel.java
#	src/main/java/appeng/client/render/cablebus/P2PTunnelFrequencyModel.java
#	src/main/java/appeng/client/render/crafting/CraftingCubeModel.java
#	src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java
#	src/main/java/appeng/client/render/model/BiometricCardModel.java
#	src/main/java/appeng/client/render/model/ColorApplicatorModel.java
#	src/main/java/appeng/client/render/model/DriveBakedModel.java
#	src/main/java/appeng/client/render/model/DriveModel.java
#	src/main/java/appeng/client/render/model/GlassModel.java
#	src/main/java/appeng/client/render/model/MemoryCardModel.java
#	src/main/java/appeng/client/render/model/SkyCompassModel.java
#	src/main/java/appeng/client/render/spatial/SpatialPylonModel.java
#	src/main/java/appeng/client/render/tesr/ChestTileEntityRenderer.java
#	src/main/java/appeng/core/AERecipeType.java
#	src/main/java/appeng/core/AppEng.java
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/api/client/ApiCellModelRegistry.java
#	src/main/java/appeng/core/api/definitions/ApiItems.java
#	src/main/java/appeng/fluids/helper/DualityFluidInterface.java
#	src/main/java/appeng/items/misc/CrystalSeedItem.java
#	src/main/java/appeng/items/tools/powered/ColorApplicatorItem.java
#	src/main/java/appeng/parts/automation/PlaneModel.java
#	src/main/java/appeng/recipes/handlers/GrinderRecipe.java
#	src/main/java/appeng/recipes/handlers/GrinderRecipeSerializer.java
#	src/main/java/appeng/recipes/handlers/InscriberRecipe.java
#	src/main/java/appeng/recipes/handlers/InscriberRecipeSerializer.java
#	src/main/java/appeng/spatial/SpatialDimensionManager.java
#	src/main/java/appeng/tile/networking/CableBusBlockEntity.java
#	src/main/java/appeng/tile/storage/SkyChestBlockEntity.java
2020-08-02 14:37:29 +02:00
Sebastian Hartte 3c86f2eae4 Working on lifecycle. 2020-08-02 14:07:54 +02:00
Sebastian Hartte cdba0b04fb Change datagen task to use the source set outputs directly to avoid problems with modCompileOnly transitive dependencies. 2020-08-02 13:27:32 +02:00
shartte c8d08f9726 Fixes sidedness issues that cropped up with 1.16 (#4533) 2020-08-01 22:16:57 +02:00
yueh 259d932946 Fixes 4529: Updated IPart to match new ICapabilityProvider (#4534) 2020-08-01 21:01:19 +02:00
Sebastian Hartte a6fb17b008 Formatting Fixes 2020-08-01 17:24:48 +02:00
Sebastian Hartte 1b31185cdb Ported to 1.16.2-pre 2020-08-01 17:14:12 +02:00
shartte d66986df85 Fix cell models not being loaded. (#4528) 2020-08-01 12:59:05 +02:00
shartte 4fa78a2add Fix #4521: Register RecipeTypes. (#4523) 2020-07-31 17:22:44 +02:00
Sebastian Hartte 3d1a919e69 Removed unnecessary dependencies. 2020-07-31 01:02:38 +02:00
Sebastian Hartte 98e9faa262 Ported model dependency changes from Fabric 1.16.
Made IChestLid sided.
2020-07-30 22:08:19 +02:00
Sebastian Hartte 80710cc818 Simplify Git Workflow 2020-07-28 23:17:02 +02:00
Sebastian Hartte b8c63df11b Make build depend on generateData, and remove unmapped mods from its dependencies. 2020-07-28 23:16:08 +02:00
Sebastian Hartte 20fd760274 Switch to right task for data generation 2020-07-28 22:59:58 +02:00
Sebastian Hartte 27cdbfb7f3 Fix NPEs when the input isn't an item. 2020-07-28 22:56:03 +02:00
Sebastian Hartte 33d247fec8 Fix server startup, jar building and after-merge fixes. 2020-07-28 22:45:09 +02:00
Sebastian Hartte 75dd1d4bb6 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	build.gradle
#	gradle.properties
#	src/api/java/appeng/api/config/Upgrades.java
#	src/api/java/appeng/api/features/IWorldGen.java
#	src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java
#	src/api/java/appeng/api/storage/ISpatialDimension.java
#	src/api/java/appeng/api/util/DimensionalCoord.java
#	src/main/java/appeng/block/AEBaseBlockItemChargeable.java
#	src/main/java/appeng/block/AEBaseTileBlock.java
#	src/main/java/appeng/block/misc/TinyTNTBlock.java
#	src/main/java/appeng/block/networking/CableBusBlock.java
#	src/main/java/appeng/block/qnb/QnbFormedBakedModel.java
#	src/main/java/appeng/block/spatial/MatrixFrameBlock.java
#	src/main/java/appeng/block/storage/ChestBlock.java
#	src/main/java/appeng/client/gui/AEBaseMEScreen.java
#	src/main/java/appeng/client/gui/AEBaseScreen.java
#	src/main/java/appeng/client/gui/implementations/CellWorkbenchScreen.java
#	src/main/java/appeng/client/gui/implementations/ChestScreen.java
#	src/main/java/appeng/client/gui/implementations/CondenserScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftAmountScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftConfirmScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftingCPUScreen.java
#	src/main/java/appeng/client/gui/implementations/DriveScreen.java
#	src/main/java/appeng/client/gui/implementations/FormationPlaneScreen.java
#	src/main/java/appeng/client/gui/implementations/GrinderScreen.java
#	src/main/java/appeng/client/gui/implementations/IOPortScreen.java
#	src/main/java/appeng/client/gui/implementations/InscriberScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceTerminalScreen.java
#	src/main/java/appeng/client/gui/implementations/MEMonitorableScreen.java
#	src/main/java/appeng/client/gui/implementations/NetworkStatusScreen.java
#	src/main/java/appeng/client/gui/implementations/NetworkToolScreen.java
#	src/main/java/appeng/client/gui/implementations/PatternTermScreen.java
#	src/main/java/appeng/client/gui/implementations/QNBScreen.java
#	src/main/java/appeng/client/gui/implementations/QuartzKnifeScreen.java
#	src/main/java/appeng/client/gui/implementations/SecurityStationScreen.java
#	src/main/java/appeng/client/gui/implementations/SkyChestScreen.java
#	src/main/java/appeng/client/gui/implementations/SpatialIOPortScreen.java
#	src/main/java/appeng/client/gui/implementations/StorageBusScreen.java
#	src/main/java/appeng/client/gui/implementations/UpgradeableScreen.java
#	src/main/java/appeng/client/gui/implementations/VibrationChamberScreen.java
#	src/main/java/appeng/client/gui/implementations/WirelessScreen.java
#	src/main/java/appeng/client/gui/widgets/AETextField.java
#	src/main/java/appeng/client/gui/widgets/ActionButton.java
#	src/main/java/appeng/client/gui/widgets/CustomSlotWidget.java
#	src/main/java/appeng/client/gui/widgets/IconButton.java
#	src/main/java/appeng/client/gui/widgets/ProgressBar.java
#	src/main/java/appeng/client/gui/widgets/SettingToggleButton.java
#	src/main/java/appeng/client/gui/widgets/ToggleButton.java
#	src/main/java/appeng/client/render/ColorableTileBlockColor.java
#	src/main/java/appeng/client/render/FacadeDispatcherBakedModel.java
#	src/main/java/appeng/client/render/FacingToRotation.java
#	src/main/java/appeng/client/render/SpatialSkyRender.java
#	src/main/java/appeng/client/render/StaticBlockColor.java
#	src/main/java/appeng/client/render/cablebus/CableBuilder.java
#	src/main/java/appeng/client/render/crafting/CraftingCubeModel.java
#	src/main/java/appeng/client/render/crafting/EncodedPatternBakedModel.java
#	src/main/java/appeng/client/render/effects/ChargedOreFX.java
#	src/main/java/appeng/client/render/effects/CraftingFx.java
#	src/main/java/appeng/client/render/effects/LightningArcFX.java
#	src/main/java/appeng/client/render/effects/MatterCannonFX.java
#	src/main/java/appeng/client/render/effects/ParticleTypes.java
#	src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java
#	src/main/java/appeng/client/render/model/BiometricCardBakedModel.java
#	src/main/java/appeng/client/render/model/ColorApplicatorBakedModel.java
#	src/main/java/appeng/client/render/model/MemoryCardBakedModel.java
#	src/main/java/appeng/client/render/model/MemoryCardModel.java
#	src/main/java/appeng/client/render/model/SkyCompassBakedModel.java
#	src/main/java/appeng/client/render/tesr/ChestTileEntityRenderer.java
#	src/main/java/appeng/client/render/tesr/CrankTESR.java
#	src/main/java/appeng/client/render/tesr/SkyCompassTESR.java
#	src/main/java/appeng/container/ContainerLocator.java
#	src/main/java/appeng/container/guisync/SyncData.java
#	src/main/java/appeng/container/implementations/CraftConfirmContainer.java
#	src/main/java/appeng/container/implementations/WirelessTermContainer.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/core/AppEng.java
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/api/ApiClientHelper.java
#	src/main/java/appeng/core/api/definitions/ApiBlocks.java
#	src/main/java/appeng/core/features/registries/WirelessRegistry.java
#	src/main/java/appeng/core/features/registries/WorldGenRegistry.java
#	src/main/java/appeng/core/localization/ButtonToolTips.java
#	src/main/java/appeng/core/localization/GuiText.java
#	src/main/java/appeng/core/stats/AppEngAdvancementTrigger.java
#	src/main/java/appeng/core/sync/network/NetworkHandler.java
#	src/main/java/appeng/core/sync/network/TargetPoint.java
#	src/main/java/appeng/core/worlddata/WorldData.java
#	src/main/java/appeng/debug/ChunkLoaderBlockEntity.java
#	src/main/java/appeng/debug/CubeGeneratorBlockEntity.java
#	src/main/java/appeng/debug/DebugCardItem.java
#	src/main/java/appeng/debug/DebugPartPlacerItem.java
#	src/main/java/appeng/debug/MeteoritePlacerItem.java
#	src/main/java/appeng/debug/ReplicatorCardItem.java
#	src/main/java/appeng/decorative/solid/SkyStoneBlock.java
#	src/main/java/appeng/entity/TinyTNTPrimedEntity.java
#	src/main/java/appeng/fluids/client/gui/FluidFormationPlaneScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidInterfaceScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidStorageBusScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidTerminalScreen.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidSlotWidget.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidTankWidget.java
#	src/main/java/appeng/fluids/parts/FluidAnnihilationPlanePart.java
#	src/main/java/appeng/fluids/tile/FluidInterfaceBlockEntity.java
#	src/main/java/appeng/helpers/DualityInterface.java
#	src/main/java/appeng/helpers/InvalidPatternHelper.java
#	src/main/java/appeng/helpers/MetaRotation.java
#	src/main/java/appeng/hooks/DynamicDimensions.java
#	src/main/java/appeng/integration/modules/jei/CondenserCategory.java
#	src/main/java/appeng/integration/modules/jei/InscriberRecipeCategory.java
#	src/main/java/appeng/integration/modules/theoneprobe/TheOneProbeText.java
#	src/main/java/appeng/integration/modules/waila/part/PartStackWailaDataProvider.java
#	src/main/java/appeng/items/misc/CrystalSeedItem.java
#	src/main/java/appeng/items/misc/EncodedPatternItem.java
#	src/main/java/appeng/items/parts/FacadeItem.java
#	src/main/java/appeng/items/storage/SpatialStorageCellItem.java
#	src/main/java/appeng/items/tools/BiometricCardItem.java
#	src/main/java/appeng/items/tools/MemoryCardItem.java
#	src/main/java/appeng/items/tools/powered/ColorApplicatorItem.java
#	src/main/java/appeng/items/tools/powered/MatterCannonItem.java
#	src/main/java/appeng/items/tools/powered/powersink/AEBasePoweredItem.java
#	src/main/java/appeng/me/cluster/MBCalculator.java
#	src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCluster.java
#	src/main/java/appeng/mixins/DimensionTypeMixin.java
#	src/main/java/appeng/mixins/MinecraftServerMixin.java
#	src/main/java/appeng/mixins/SkyPropertiesMixin.java
#	src/main/java/appeng/mixins/SkyRenderMixin.java
#	src/main/java/appeng/mixins/ThreadedAnvilChunkStorageAccessor.java
#	src/main/java/appeng/parts/automation/AnnihilationPlanePart.java
#	src/main/java/appeng/parts/misc/CableAnchorPart.java
#	src/main/java/appeng/parts/reporting/AbstractMonitorPart.java
#	src/main/java/appeng/server/subcommands/TestMeteoritesCommand.java
#	src/main/java/appeng/server/subcommands/TestOreGenCommand.java
#	src/main/java/appeng/services/CompassService.java
#	src/main/java/appeng/spatial/CachedPlane.java
#	src/main/java/appeng/spatial/SpatialDimensionExtraData.java
#	src/main/java/appeng/spatial/SpatialDimensionManager.java
#	src/main/java/appeng/spatial/StorageCellBiome.java
#	src/main/java/appeng/spatial/StorageChunkGenerator.java
#	src/main/java/appeng/spatial/StorageHelper.java
#	src/main/java/appeng/tile/spatial/SpatialIOPortBlockEntity.java
#	src/main/java/appeng/tile/storage/SkyChestBlockEntity.java
#	src/main/java/appeng/util/Platform.java
#	src/main/java/appeng/worldgen/ChargedQuartzOreConfig.java
#	src/main/java/appeng/worldgen/ChargedQuartzOreFeature.java
#	src/main/java/appeng/worldgen/meteorite/MeteoriteStructure.java
#	src/main/java/appeng/worldgen/meteorite/MeteoriteStructurePiece.java
#	src/main/java/appeng/worldgen/meteorite/MeteoriteStructureStart.java
#	src/main/java/appeng/worldgen/meteorite/debug/MeteoriteSpawner.java
#	src/main/resources/appliedenergistics2.mixins.json
#	src/unported/java/appeng/client/ClientHelper.java
#	src/unported/resources/META-INF/accesstransformer.cfg
2020-07-28 22:08:09 +02:00
Sebastian Hartte a8e79826bd Fix fabric-api version 2020-07-28 21:54:10 +02:00
Sebastian Hartte b9ece3a18a Updated Gradle Wrapper 2020-07-28 21:44:50 +02:00
Sebastian Hartte a628a469ce Fix refmap reference for non-dev deployment. 2020-07-28 21:02:51 +02:00
Sebastian Hartte 2fca330ff1 Use BlockPos.toMutable 2020-07-28 20:25:18 +02:00
Sebastian Hartte 3802eace7a Use StringTextComponent.EMPTY 2020-07-28 20:24:07 +02:00
Sebastian Hartte 2b9c997191 Fix formatting. 2020-07-28 20:19:11 +02:00
Sebastian Hartte 1cb32517ae Added missing chunk generator registration. 2020-07-28 20:11:18 +02:00
yueh b3b7547325 Updated mappings to 20200723-1.16.1 (#4514)
* Limit to 1 gradle worker
2020-07-28 18:33:28 +02:00
yueh 307a6817d4 Remove xvfb steps as runData should now run headless (#4513)
Also run `prepareRunData` in a separate step to avoid a race condition with ForgeGradle writing the generated dependency after it has already written it for `runData`
2020-07-28 14:49:33 +02:00
yueh 0beab559a6 Fix formatting 2020-07-28 11:44:57 +02:00
yueh a65be62cd1 Organize and clean imports 2020-07-28 10:29:57 +02:00
Sebastian Hartte e640918ca0 Compiles, can get ingame, uses Mixins to work around missing Fork Hooks for structures and custom dimensions. 2020-07-28 02:05:24 +02:00
Sebastian Hartte 84e6aaa122 Compiles again. 2020-07-27 23:50:28 +02:00
Sebastian Hartte 780f68952b Added spotless back and reformatted 2020-07-27 20:07:27 +02:00
Sebastian Hartte 49296915c9 Post merge fixes. 2020-07-27 19:12:16 +02:00
Sebastian Hartte 0fdc46b358 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.jar
#	gradle/wrapper/gradle-wrapper.properties
#	src/api/java/appeng/api/features/IWorldGen.java
#	src/api/java/appeng/api/implementations/items/ISpatialStorageCell.java
#	src/api/java/appeng/api/parts/IPart.java
#	src/api/java/appeng/api/storage/ISpatialDimension.java
#	src/api/java/appeng/api/util/DimensionalCoord.java
#	src/datagen/java/appeng/data/providers/IAE2DataProvider.java
#	src/main/java/appeng/block/AEBaseBlockItemChargeable.java
#	src/main/java/appeng/block/misc/ChargerBlock.java
#	src/main/java/appeng/block/misc/QuartzFixtureBlock.java
#	src/main/java/appeng/block/networking/CableBusBlock.java
#	src/main/java/appeng/block/networking/CableBusColor.java
#	src/main/java/appeng/block/networking/ControllerBlock.java
#	src/main/java/appeng/block/networking/WirelessBlock.java
#	src/main/java/appeng/block/paint/PaintSplotchesBakedModel.java
#	src/main/java/appeng/block/paint/PaintSplotchesModel.java
#	src/main/java/appeng/block/qnb/QnbFormedBakedModel.java
#	src/main/java/appeng/block/qnb/QnbFormedModel.java
#	src/main/java/appeng/block/spatial/MatrixFrameBlock.java
#	src/main/java/appeng/block/storage/ChestBlock.java
#	src/main/java/appeng/block/storage/DriveSlotState.java
#	src/main/java/appeng/client/gui/AEBaseMEScreen.java
#	src/main/java/appeng/client/gui/AEBaseScreen.java
#	src/main/java/appeng/client/gui/implementations/AESubScreen.java
#	src/main/java/appeng/client/gui/implementations/CellWorkbenchScreen.java
#	src/main/java/appeng/client/gui/implementations/ChestScreen.java
#	src/main/java/appeng/client/gui/implementations/CondenserScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftAmountScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftConfirmScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftingCPUScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftingStatusScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftingTermScreen.java
#	src/main/java/appeng/client/gui/implementations/DriveScreen.java
#	src/main/java/appeng/client/gui/implementations/FormationPlaneScreen.java
#	src/main/java/appeng/client/gui/implementations/GrinderScreen.java
#	src/main/java/appeng/client/gui/implementations/IOPortScreen.java
#	src/main/java/appeng/client/gui/implementations/InscriberScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceScreen.java
#	src/main/java/appeng/client/gui/implementations/InterfaceTerminalScreen.java
#	src/main/java/appeng/client/gui/implementations/LevelEmitterScreen.java
#	src/main/java/appeng/client/gui/implementations/MEMonitorableScreen.java
#	src/main/java/appeng/client/gui/implementations/MolecularAssemblerScreen.java
#	src/main/java/appeng/client/gui/implementations/NetworkStatusScreen.java
#	src/main/java/appeng/client/gui/implementations/NetworkToolScreen.java
#	src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java
#	src/main/java/appeng/client/gui/implementations/PatternTermScreen.java
#	src/main/java/appeng/client/gui/implementations/PriorityScreen.java
#	src/main/java/appeng/client/gui/implementations/QNBScreen.java
#	src/main/java/appeng/client/gui/implementations/QuartzKnifeScreen.java
#	src/main/java/appeng/client/gui/implementations/SecurityStationScreen.java
#	src/main/java/appeng/client/gui/implementations/SkyChestScreen.java
#	src/main/java/appeng/client/gui/implementations/SpatialIOPortScreen.java
#	src/main/java/appeng/client/gui/implementations/StorageBusScreen.java
#	src/main/java/appeng/client/gui/implementations/UpgradeableScreen.java
#	src/main/java/appeng/client/gui/implementations/VibrationChamberScreen.java
#	src/main/java/appeng/client/gui/implementations/WirelessScreen.java
#	src/main/java/appeng/client/gui/widgets/AETextField.java
#	src/main/java/appeng/client/gui/widgets/CustomSlotWidget.java
#	src/main/java/appeng/client/gui/widgets/ITooltip.java
#	src/main/java/appeng/client/gui/widgets/IconButton.java
#	src/main/java/appeng/client/gui/widgets/NumberBox.java
#	src/main/java/appeng/client/gui/widgets/ProgressBar.java
#	src/main/java/appeng/client/gui/widgets/TabButton.java
#	src/main/java/appeng/client/gui/widgets/ToggleButton.java
#	src/main/java/appeng/client/render/ColorableTileBlockColor.java
#	src/main/java/appeng/client/render/DummyFluidDispatcherBakedModel.java
#	src/main/java/appeng/client/render/FacadeItemModel.java
#	src/main/java/appeng/client/render/FacingToRotation.java
#	src/main/java/appeng/client/render/SpatialSkyRender.java
#	src/main/java/appeng/client/render/StackSizeRenderer.java
#	src/main/java/appeng/client/render/StaticBlockColor.java
#	src/main/java/appeng/client/render/TesrRenderHelper.java
#	src/main/java/appeng/client/render/cablebus/CableBuilder.java
#	src/main/java/appeng/client/render/cablebus/CableBusBreakingParticle.java
#	src/main/java/appeng/client/render/cablebus/CableBusModel.java
#	src/main/java/appeng/client/render/cablebus/CableBusRenderState.java
#	src/main/java/appeng/client/render/cablebus/CableCoreType.java
#	src/main/java/appeng/client/render/cablebus/CubeBuilder.java
#	src/main/java/appeng/client/render/cablebus/FacadeBlockAccess.java
#	src/main/java/appeng/client/render/cablebus/FacadeBuilder.java
#	src/main/java/appeng/client/render/cablebus/P2PTunnelFrequencyModel.java
#	src/main/java/appeng/client/render/cablebus/QuadRotator.java
#	src/main/java/appeng/client/render/cablebus/SmartCableTextures.java
#	src/main/java/appeng/client/render/crafting/CraftingCubeModel.java
#	src/main/java/appeng/client/render/crafting/EncodedPatternBakedModel.java
#	src/main/java/appeng/client/render/crafting/EncodedPatternModel.java
#	src/main/java/appeng/client/render/effects/CraftingFx.java
#	src/main/java/appeng/client/render/effects/EnergyFx.java
#	src/main/java/appeng/client/render/effects/LightningArcParticleData.java
#	src/main/java/appeng/client/render/effects/LightningFX.java
#	src/main/java/appeng/client/render/effects/MatterCannonFX.java
#	src/main/java/appeng/client/render/effects/VibrantFX.java
#	src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java
#	src/main/java/appeng/client/render/model/BiometricCardModel.java
#	src/main/java/appeng/client/render/model/ColorApplicatorModel.java
#	src/main/java/appeng/client/render/model/DriveBakedModel.java
#	src/main/java/appeng/client/render/model/DriveModel.java
#	src/main/java/appeng/client/render/model/GlassBakedModel.java
#	src/main/java/appeng/client/render/model/GlassModel.java
#	src/main/java/appeng/client/render/model/MatrixVertexTransformer.java
#	src/main/java/appeng/client/render/model/MemoryCardModel.java
#	src/main/java/appeng/client/render/model/RenderHelper.java
#	src/main/java/appeng/client/render/model/SkyCompassBakedModel.java
#	src/main/java/appeng/client/render/model/SkyCompassModel.java
#	src/main/java/appeng/client/render/renderable/ItemRenderable.java
#	src/main/java/appeng/client/render/spatial/SpatialPylonModel.java
#	src/main/java/appeng/client/render/tesr/CellLedRenderer.java
#	src/main/java/appeng/client/render/tesr/CrankTESR.java
#	src/main/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java
#	src/main/java/appeng/client/render/tesr/InscriberTESR.java
#	src/main/java/appeng/client/render/tesr/SkyChestTESR.java
#	src/main/java/appeng/container/implementations/PatternTermContainer.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/core/AppEng.java
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/features/registries/MovableTileRegistry.java
#	src/main/java/appeng/core/features/registries/WorldGenRegistry.java
#	src/main/java/appeng/core/localization/GuiText.java
#	src/main/java/appeng/core/sync/BasePacket.java
#	src/main/java/appeng/core/sync/network/NetworkHandler.java
#	src/main/java/appeng/core/sync/network/TargetPoint.java
#	src/main/java/appeng/core/sync/packets/ClickPacket.java
#	src/main/java/appeng/core/sync/packets/ConfigValuePacket.java
#	src/main/java/appeng/core/worlddata/WorldData.java
#	src/main/java/appeng/crafting/CraftingTreeProcess.java
#	src/main/java/appeng/datagen/AE2DataGenerators.java
#	src/main/java/appeng/datagen/providers/IAE2DataProvider.java
#	src/main/java/appeng/datagen/providers/loot/BlockDropProvider.java
#	src/main/java/appeng/datagen/providers/recipes/SlabStairRecipes.java
#	src/main/java/appeng/debug/ChunkLoaderBlockEntity.java
#	src/main/java/appeng/debug/DebugPartPlacerItem.java
#	src/main/java/appeng/debug/ReplicatorCardItem.java
#	src/main/java/appeng/entity/TinyTNTPrimedEntity.java
#	src/main/java/appeng/entity/TinyTNTPrimedRenderer.java
#	src/main/java/appeng/fluids/client/gui/FluidFormationPlaneScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidInterfaceScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidLevelEmitterScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidStorageBusScreen.java
#	src/main/java/appeng/fluids/client/gui/FluidTerminalScreen.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidSlotWidget.java
#	src/main/java/appeng/fluids/client/gui/widgets/FluidTankWidget.java
#	src/main/java/appeng/fluids/parts/FluidAnnihilationPlanePart.java
#	src/main/java/appeng/fluids/parts/FluidFormationPlanePart.java
#	src/main/java/appeng/fluids/parts/FluidInterfacePart.java
#	src/main/java/appeng/fluids/parts/FluidStorageBusPart.java
#	src/main/java/appeng/fluids/parts/SharedFluidBusPart.java
#	src/main/java/appeng/forge/data/providers/IAE2DataProvider.java
#	src/main/java/appeng/helpers/AEMaterials.java
#	src/main/java/appeng/helpers/CraftingPatternDetails.java
#	src/main/java/appeng/helpers/DualityInterface.java
#	src/main/java/appeng/helpers/Splotch.java
#	src/main/java/appeng/integration/modules/jei/CondenserCategory.java
#	src/main/java/appeng/integration/modules/theoneprobe/part/ChannelInfoProvider.java
#	src/main/java/appeng/integration/modules/theoneprobe/part/P2PStateInfoProvider.java
#	src/main/java/appeng/integration/modules/theoneprobe/part/PowerStateInfoProvider.java
#	src/main/java/appeng/integration/modules/theoneprobe/tile/ChargerInfoProvider.java
#	src/main/java/appeng/integration/modules/theoneprobe/tile/CraftingMonitorInfoProvider.java
#	src/main/java/appeng/integration/modules/theoneprobe/tile/PowerStorageInfoProvider.java
#	src/main/java/appeng/integration/modules/waila/part/PartAccessor.java
#	src/main/java/appeng/integration/modules/waila/part/PartStackWailaDataProvider.java
#	src/main/java/appeng/integration/modules/waila/part/StorageMonitorWailaDataProvider.java
#	src/main/java/appeng/integration/modules/waila/tile/PowerStateWailaDataProvider.java
#	src/main/java/appeng/items/misc/EncodedPatternItem.java
#	src/main/java/appeng/items/parts/FacadeItem.java
#	src/main/java/appeng/items/storage/SpatialStorageCellItem.java
#	src/main/java/appeng/items/tools/BiometricCardItem.java
#	src/main/java/appeng/items/tools/MemoryCardItem.java
#	src/main/java/appeng/items/tools/powered/ColorApplicatorItem.java
#	src/main/java/appeng/items/tools/powered/MatterCannonItem.java
#	src/main/java/appeng/items/tools/quartz/QuartzCuttingKnifeItem.java
#	src/main/java/appeng/items/tools/quartz/QuartzHoeItem.java
#	src/main/java/appeng/me/cluster/MBCalculator.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCluster.java
#	src/main/java/appeng/parts/AEBasePart.java
#	src/main/java/appeng/parts/CableBusContainer.java
#	src/main/java/appeng/parts/ICableBusContainer.java
#	src/main/java/appeng/parts/NullCableBusContainer.java
#	src/main/java/appeng/parts/PartPlacement.java
#	src/main/java/appeng/parts/automation/AnnihilationPlanePart.java
#	src/main/java/appeng/parts/automation/ExportBusPart.java
#	src/main/java/appeng/parts/automation/FormationPlanePart.java
#	src/main/java/appeng/parts/automation/ImportBusPart.java
#	src/main/java/appeng/parts/automation/PlaneModel.java
#	src/main/java/appeng/parts/misc/CableAnchorPart.java
#	src/main/java/appeng/parts/misc/InterfacePart.java
#	src/main/java/appeng/parts/misc/StorageBusPart.java
#	src/main/java/appeng/parts/p2p/P2PTunnelPart.java
#	src/main/java/appeng/parts/reporting/AbstractMonitorPart.java
#	src/main/java/appeng/parts/reporting/AbstractReportingPart.java
#	src/main/java/appeng/parts/reporting/AbstractTerminalPart.java
#	src/main/java/appeng/parts/reporting/ConversionMonitorPart.java
#	src/main/java/appeng/parts/reporting/InterfaceTerminalPart.java
#	src/main/java/appeng/parts/reporting/PatternTerminalPart.java
#	src/main/java/appeng/recipes/handlers/GrinderRecipeSerializer.java
#	src/main/java/appeng/recipes/handlers/InscriberRecipeSerializer.java
#	src/main/java/appeng/server/subcommands/TestMeteoritesCommand.java
#	src/main/java/appeng/server/subcommands/TestOreGenCommand.java
#	src/main/java/appeng/services/CompassService.java
#	src/main/java/appeng/spatial/SpatialDimensionManager.java
#	src/main/java/appeng/spatial/StorageCellDimension.java
#	src/main/java/appeng/thirdparty/codechicken/lib/model/Quad.java
#	src/main/java/appeng/thirdparty/codechicken/lib/model/pipeline/transformers/QuadCornerKicker.java
#	src/main/java/appeng/thirdparty/codechicken/lib/model/pipeline/transformers/QuadMatrixTransformer.java
#	src/main/java/appeng/tile/AEBaseBlockEntity.java
#	src/main/java/appeng/tile/AEBaseInvTileEntity.java
#	src/main/java/appeng/tile/crafting/CraftingBlockEntity.java
#	src/main/java/appeng/tile/crafting/CraftingMonitorBlockEntity.java
#	src/main/java/appeng/tile/crafting/MolecularAssemblerBlockEntity.java
#	src/main/java/appeng/tile/grid/AENetworkBlockEntity.java
#	src/main/java/appeng/tile/grid/AENetworkInvBlockEntity.java
#	src/main/java/appeng/tile/grid/AENetworkPowerBlockEntity.java
#	src/main/java/appeng/tile/misc/CellWorkbenchBlockEntity.java
#	src/main/java/appeng/tile/misc/CondenserBlockEntity.java
#	src/main/java/appeng/tile/misc/InscriberBlockEntity.java
#	src/main/java/appeng/tile/misc/InterfaceBlockEntity.java
#	src/main/java/appeng/tile/misc/PaintSplotchesBlockEntity.java
#	src/main/java/appeng/tile/misc/SecurityStationBlockEntity.java
#	src/main/java/appeng/tile/misc/VibrationChamberBlockEntity.java
#	src/main/java/appeng/tile/networking/CableBusBlockEntity.java
#	src/main/java/appeng/tile/networking/EnergyCellBlockEntity.java
#	src/main/java/appeng/tile/powersink/AEBasePoweredBlockEntity.java
#	src/main/java/appeng/tile/spatial/SpatialIOPortBlockEntity.java
#	src/main/java/appeng/tile/storage/ChestBlockEntity.java
#	src/main/java/appeng/tile/storage/DriveBlockEntity.java
#	src/main/java/appeng/tile/storage/IOPortBlockEntity.java
#	src/main/java/appeng/util/Platform.java
#	src/main/java/appeng/worldgen/ChargedQuartzOreConfig.java
#	src/main/java/appeng/worldgen/ChargedQuartzOreFeature.java
#	src/main/java/appeng/worldgen/meteorite/MeteoriteStructure.java
#	src/main/java/appeng/worldgen/meteorite/MeteoriteStructureStart.java
#	src/main/java/appeng/worldgen/meteorite/debug/MeteoriteSpawner.java
#	src/unported/java/appeng/client/ClientHelper.java
#	src/unported/java/appeng/client/render/DummyFluidItemModel.java
#	src/unported/java/appeng/client/render/model/UVLModelLoader.java
2020-07-27 19:07:35 +02:00
Sebastian Hartte c7980907ed Facade Recipe integration and cleanups 2020-07-27 18:03:16 +02:00
yueh 56ecda5173 1.16 port 2020-07-27 11:21:50 +02:00
yueh 662dbca3e1 Fixes #4508: Correctly construct the sparse lists. (#4511)
* Fixes #4508: Correctly construct the sparse lists.

Also renamed all uncondensed getters to sparse and all condensed to the simple ones.

* Apply suggestions from code review

Co-authored-by: shartte <shartte@users.noreply.github.com>

* Streamlined collapsing the sparse lists

* Extracted helper to condense stacks

* Sort lists desc by stack size

Co-authored-by: shartte <shartte@users.noreply.github.com>
2020-07-27 11:21:06 +02:00
Sebastian Hartte 6cb6c21495 Mention spotlessApply. 2020-07-26 23:29:34 +02:00
Sebastian Hartte 79e9a3913a Update README.md to reflect that the data generation needs to be run. 2020-07-26 23:29:01 +02:00
shartte 7e89317dd5 Fix substitutions not being correctly recognized. (#4507) 2020-07-26 22:25:18 +02:00
shartte 59e40ccbd9 Fixes mouse handling for right-clicks to clear the search box and middle-click for crafting. (#4505) 2020-07-26 16:30:53 +02:00
yueh 774f88ee90 Clear searchfield on rightclick (#4503) 2020-07-26 15:28:52 +02:00
yueh 0528879833 Moved datagens to appeng.datagen (#4502) 2020-07-26 15:28:18 +02:00
yueh b6110e4f4a Remove all maven repos except modmaven (#4501)
Also upgrades gradle to 4.10.3
2020-07-26 15:27:32 +02:00
yueh 5b82e59264 Removed superfluous crash enhancement (#4498) 2020-07-26 12:42:48 +02:00
yueh 3a4b171443 Fixes #4468: Default to ae serverside (#4496) 2020-07-25 16:05:58 +02:00
Sebastian Hartte 8306f5bf0a Port more stuff 2020-07-25 02:24:36 +02:00
yueh 2ac27fd9ce Fixes patterns always returning a recipe. (#4495) 2020-07-24 22:39:38 +02:00
Sebastian Hartte 5bf05f6cb1 Port more stuff 2020-07-24 18:39:39 +02:00
shartte d01aa28cdc Use standard mechanics for damaging the quartz knife. (#4494) 2020-07-24 16:39:32 +02:00
Sebastian Hartte 9fcfbf31be Lots of fixes 2020-07-23 02:38:32 +02:00
shartte 21aa5ce33b Don't use PacketBuffer#readString since it's client-only. (#4489)
Fixes #4488
2020-07-22 10:22:28 +02:00
shartte f7ef6eb772 Same method name as in superclass leads to ForgeGradle reobf problems. (#4491)
Fixes #4490
2020-07-22 10:22:00 +02:00
shartte 10037a9ac5 Correct link to CurseForge page 2020-07-21 18:39:48 +02:00
yueh 888de430ba Also test for generated asset cache 2020-07-20 22:27:01 +02:00
A. Regnander 83d661ab2a Create sv_se.json (#4485) 2020-07-20 21:33:44 +02:00
Sebastian Hartte 1933b4b10d Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	src/main/java/appeng/block/crafting/AbstractCraftingUnitBlock.java
#	src/main/java/appeng/block/qnb/QnbFormedBakedModel.java
#	src/main/java/appeng/client/gui/AEBaseScreen.java
#	src/main/java/appeng/client/gui/implementations/CraftAmountScreen.java
#	src/main/java/appeng/client/gui/implementations/LevelEmitterScreen.java
#	src/main/java/appeng/client/gui/implementations/PriorityScreen.java
#	src/main/java/appeng/client/gui/widgets/NumberBox.java
#	src/main/java/appeng/client/render/cablebus/P2PTunnelFrequencyModel.java
#	src/main/java/appeng/client/render/cablebus/SmartCableTextures.java
#	src/main/java/appeng/container/implementations/CraftingCPUContainer.java
#	src/main/java/appeng/container/implementations/LevelEmitterContainer.java
#	src/main/java/appeng/container/implementations/PriorityContainer.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/fluids/client/gui/FluidLevelEmitterScreen.java
#	src/main/java/appeng/fluids/container/FluidLevelEmitterContainer.java
#	src/main/java/appeng/me/cluster/MBCalculator.java
#	src/main/java/appeng/me/cluster/implementations/CraftingCPUCalculator.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCalculator.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCluster.java
#	src/main/java/appeng/me/cluster/implementations/SpatialPylonCalculator.java
#	src/main/java/appeng/tile/crafting/CraftingBlockEntity.java
#	src/main/java/appeng/tile/qnb/QuantumBridgeBlockEntity.java
#	src/main/java/appeng/tile/spatial/SpatialPylonBlockEntity.java
2020-07-20 20:19:42 +02:00
Sebastian Hartte 019f570331 Pattern Rendering and other Rendering 2020-07-20 20:13:20 +02:00
shartte a537bcf0ee Merge pull request #4486 from AppliedEnergistics/number-entry-dialogs
Number Entry Dialogs
2020-07-20 20:13:04 +02:00
Sebastian Hartte 590e435ad6 Formatting fixes 2020-07-19 23:51:57 +02:00
Sebastian Hartte 8d92a51e4f Formatting fixes 2020-07-19 23:50:47 +02:00
Sebastian Hartte 4322910614 Added labels that specify the unit of power (AE) and the unit of fluid (mB) for the level emitters. 2020-07-19 23:50:18 +02:00
Sebastian Hartte ebe589a714 Ported the other number entry dialogs over to the shared widget. 2020-07-19 23:25:11 +02:00
Sebastian Hartte 6187e6a7bb Started refactoring number entry dialogs to use shared code. 2020-07-19 20:04:08 +02:00
shartte d5f113eb35 Merge pull request #4484 from AppliedEnergistics/energy-grid-failfast
Guard Against Concurrent EnergyGrid Modifications
2020-07-19 17:56:22 +02:00
shartte 9ad5bb21c0 Merge pull request #4480 from AppliedEnergistics/mb-fixes
Fix more MultiBlock issues
2020-07-19 17:31:06 +02:00
Sebastian Hartte 1c88ea7b78 Fail faster when something modifies the list of energy providers/requesters while an extract/inject operation is ongoing, since this would lead to ConcurrentModificationExceptions later, without a way of tracking down what caused the modification in the first place. 2020-07-19 16:39:37 +02:00
shartte 5a976ebfae Merge pull request #4483 from AppliedEnergistics/texture-cleanup
Texture Cleanup
2020-07-19 16:20:32 +02:00
Sebastian Hartte b45669bb82 Removed several unchecked casts. 2020-07-19 16:01:19 +02:00
Sebastian Hartte e52cc40dbf JSON Formatting Fix 2020-07-19 16:00:01 +02:00
Sebastian Hartte 8a20d3c1d7 Consolidated fluid models to reuse the item counterparts with different textures. 2020-07-19 15:00:46 +02:00
Sebastian Hartte 749ebeb91d Moved part textures from parts to part to be consistent with singular naming used in Minecraft (and for the model directory). 2020-07-19 14:14:18 +02:00
Sebastian Hartte 82586732e3 Removed unused crafting and fluid terminal models and associated textures.
Unified naming for textures used by the fluid terminal.
2020-07-19 14:09:57 +02:00
Sebastian Hartte e023d83e62 Deleted unused matrix frame related documentation images. 2020-07-19 13:40:42 +02:00
Sebastian Hartte de7cbc4949 Moved part-related textures from textures/item/part to textures/parts/ and adapted the level emitter item models to use the normal part texture. 2020-07-19 13:37:23 +02:00
Sebastian Hartte 71a91e51fb Naming improvements 2020-07-19 13:16:50 +02:00
yueh 223163aa0a Fixes #4330: Avoid mutating the input stack (#4481) 2020-07-19 13:13:20 +02:00
Sebastian Hartte bdd22093c3 Account for empty messages when drawing tooltips. 2020-07-19 12:05:26 +02:00
Sebastian Hartte 0367b35ce0 Never return null from Widget#getMessage since the
narrator will always dereference it, leading to a crash.
2020-07-19 12:04:15 +02:00
yueh 755ac12b8a Fix SortedSet using compare for equals (#4479)
Fix SortedSet using compare for equals
2020-07-19 11:43:20 +02:00
Sebastian Hartte d053c9b1bc Post-Merge Fixes 2020-07-19 01:09:06 +02:00
Sebastian Hartte be4fdfed85 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	src/main/java/appeng/block/spatial/SpatialPylonBlock.java
#	src/main/java/appeng/client/render/spatial/SpatialPylonBakedModel.java
#	src/main/java/appeng/core/AppEng.java
#	src/main/java/appeng/hooks/TickHandler.java
#	src/main/java/appeng/me/cluster/MBCalculator.java
#	src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java
#	src/main/java/appeng/me/cluster/implementations/QuantumCluster.java
#	src/main/java/appeng/me/cluster/implementations/SpatialPylonCluster.java
#	src/main/java/appeng/me/helpers/AENetworkProxy.java
#	src/main/java/appeng/tile/networking/CableBusBlockEntity.java
#	src/main/java/appeng/tile/networking/DenseEnergyCellBlockEntity.java
#	src/main/java/appeng/tile/qnb/QuantumBridgeBlockEntity.java
#	src/main/java/appeng/tile/spatial/SpatialPylonBlockEntity.java
#	src/main/java/appeng/util/Platform.java
2020-07-19 01:05:14 +02:00
Sebastian Hartte e1f9e01404 Force cluster-rebuilds on the first detected change, if their bounds do not match.
Also use a client-side method to update connected textures
for crafting cubes if two previously distinct clusters are connected.
Refactored MBCalculator to use generics for type checks and remove more casts.
2020-07-19 00:16:33 +02:00
Sebastian Hartte 7121426fc9 Disable AO for the Spatial Pylon due to artifacts. 2020-07-19 00:12:35 +02:00
yueh a94e8504f8 Correctly convert milliseconds to microseconds (#4478) 2020-07-18 20:51:30 +02:00
yueh 9275bfe001 Split TickHandler#onTick into more specific event handlers (#4477) 2020-07-18 19:35:33 +02:00
Sebastian Hartte 19802b96e8 Rendering/Model Fixes 2020-07-18 18:44:10 +02:00
shartte 5b3c4aef79 When blocks adjacent to multiblock-capable blocks are updated, (#4474)
do not always recalculate existing multiblocks. Only do so,
if the adjacent block is either part of the multiblock's bounding
box, or if the adjacent block would be a valid part of the multiblock.
2020-07-18 18:18:24 +02:00
yueh 4a289470e2 Added a priority to IAEPowerStorage (#4473)
Added a priority to IAEPowerStorage
2020-07-18 18:06:05 +02:00
shartte d79c0f642c Do not allow recursive creation of multiblocks. (#4472) 2020-07-18 18:00:40 +02:00
aoisensi 9ecad8749f Added new japanese translate (#4475)
* Added new japanese translate
2020-07-18 12:38:23 +02:00
Sebastian Hartte 1e20cd8c08 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	build.gradle
#	gradle.properties
#	src/api/java/appeng/api/config/Upgrades.java
#	src/api/java/appeng/api/recipes/ResolverResult.java
#	src/main/java/appeng/block/AEBaseBlockItemChargeable.java
#	src/main/java/appeng/block/crafting/CraftingStorageItem.java
#	src/main/java/appeng/block/misc/ChargerBlock.java
#	src/main/java/appeng/block/networking/CableBusBlock.java
#	src/main/java/appeng/block/storage/ChestBlock.java
#	src/main/java/appeng/block/storage/DriveSlotCellType.java
#	src/main/java/appeng/capabilities/Capabilities.java
#	src/main/java/appeng/client/me/ItemRepo.java
#	src/main/java/appeng/client/render/cablebus/FacadeBuilder.java
#	src/main/java/appeng/client/render/effects/ChargedOreFX.java
#	src/main/java/appeng/client/render/effects/CraftingFx.java
#	src/main/java/appeng/client/render/effects/EnergyFx.java
#	src/main/java/appeng/client/render/effects/LightningArcFX.java
#	src/main/java/appeng/client/render/effects/LightningFX.java
#	src/main/java/appeng/client/render/effects/MatterCannonFX.java
#	src/main/java/appeng/client/render/effects/VibrantFX.java
#	src/main/java/appeng/client/render/spatial/SpatialPylonRendering.java
#	src/main/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java
#	src/main/java/appeng/container/AEBaseContainer.java
#	src/main/java/appeng/container/implementations/CellWorkbenchContainer.java
#	src/main/java/appeng/container/implementations/MolecularAssemblerContainer.java
#	src/main/java/appeng/container/implementations/PatternTermContainer.java
#	src/main/java/appeng/container/implementations/QuartzKnifeContainer.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/core/AEItemGroup.java
#	src/main/java/appeng/core/Api.java
#	src/main/java/appeng/core/AppEng.java
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/api/definitions/ApiBlocks.java
#	src/main/java/appeng/core/api/definitions/ApiParts.java
#	src/main/java/appeng/core/features/registries/MovableTileRegistry.java
#	src/main/java/appeng/core/features/registries/P2PTunnelRegistry.java
#	src/main/java/appeng/core/features/registries/WirelessRegistry.java
#	src/main/java/appeng/core/features/registries/WorldGenRegistry.java
#	src/main/java/appeng/core/features/registries/cell/BasicItemCellGuiHandler.java
#	src/main/java/appeng/core/sync/BasePacketHandler.java
#	src/main/java/appeng/core/sync/packets/ClickPacket.java
#	src/main/java/appeng/core/sync/packets/PatternSlotPacket.java
#	src/main/java/appeng/crafting/CraftingTreeProcess.java
#	src/main/java/appeng/debug/ReplicatorCardItem.java
#	src/main/java/appeng/entity/ChargedQuartzEntity.java
#	src/main/java/appeng/entity/SingularityEntity.java
#	src/main/java/appeng/entity/TinyTNTPrimedEntity.java
#	src/main/java/appeng/fluids/helper/DualityFluidInterface.java
#	src/main/java/appeng/fluids/helper/FluidCellConfig.java
#	src/main/java/appeng/fluids/parts/FluidFormationPlanePart.java
#	src/main/java/appeng/fluids/parts/FluidHandlerAdapter.java
#	src/main/java/appeng/forge/data/providers/IAE2DataProvider.java
#	src/main/java/appeng/forge/data/providers/recipes/SlabStairRecipes.java
#	src/main/java/appeng/helpers/CraftingPatternDetails.java
#	src/main/java/appeng/helpers/DualityInterface.java
#	src/main/java/appeng/helpers/WirelessTerminalGuiObject.java
#	src/main/java/appeng/hooks/IBlockTool.java
#	src/main/java/appeng/hooks/TickHandler.java
#	src/main/java/appeng/integration/modules/jei/CondenserCategory.java
#	src/main/java/appeng/integration/modules/jei/JEIPlugin.java
#	src/main/java/appeng/items/misc/EncodedPatternItem.java
#	src/main/java/appeng/items/parts/FacadeItem.java
#	src/main/java/appeng/items/parts/PartItem.java
#	src/main/java/appeng/items/storage/AbstractStorageCell.java
#	src/main/java/appeng/items/storage/CreativeStorageCellItem.java
#	src/main/java/appeng/items/tools/powered/ColorApplicatorItem.java
#	src/main/java/appeng/items/tools/powered/EntropyManipulatorItem.java
#	src/main/java/appeng/items/tools/powered/MatterCannonItem.java
#	src/main/java/appeng/items/tools/powered/WirelessTerminalItem.java
#	src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java
#	src/main/java/appeng/me/storage/MEMonitorIFluidHandler.java
#	src/main/java/appeng/parts/PartPlacement.java
#	src/main/java/appeng/parts/automation/FormationPlanePart.java
#	src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java
#	src/main/java/appeng/parts/reporting/PatternTerminalPart.java
#	src/main/java/appeng/spatial/CachedPlane.java
#	src/main/java/appeng/spatial/StorageChunkGenerator.java
#	src/main/java/appeng/spatial/StorageHelper.java
#	src/main/java/appeng/tile/crafting/CraftingBlockEntity.java
#	src/main/java/appeng/tile/crafting/CraftingStorageBlockEntity.java
#	src/main/java/appeng/tile/crafting/MolecularAssemblerBlockEntity.java
#	src/main/java/appeng/tile/inventory/AppEngInternalAEInventory.java
#	src/main/java/appeng/tile/misc/ChargerBlockEntity.java
#	src/main/java/appeng/tile/misc/CondenserBlockEntity.java
#	src/main/java/appeng/tile/misc/InscriberBlockEntity.java
#	src/main/java/appeng/tile/misc/InscriberRecipes.java
#	src/main/java/appeng/tile/qnb/QuantumBridgeBlockEntity.java
#	src/main/java/appeng/tile/storage/ChestBlockEntity.java
#	src/main/java/appeng/tile/storage/DriveBlockEntity.java
#	src/main/java/appeng/util/Platform.java
#	src/main/java/team/chisel/ctm/api/IFacade.java
#	src/main/resources/assets/appliedenergistics2/models/block/chest/base.json
#	src/unported/java/appeng/client/render/FacadeItemModel.java
#	src/unported/java/appeng/client/render/model/DriveBakedModel.java
#	src/unported/java/appeng/client/render/model/DriveModel.java
#	src/unported/java/appeng/core/PluginLoader.java
2020-07-18 01:45:43 +02:00
Sebastian Hartte 15d4583c56 Working on Spatial Stuff. 2020-07-17 22:38:27 +02:00
shartte e8b57c6dc5 Multiblocks sometimes can't be broken because during removal, (#4469)
they update their own block-state to display the disconnected
state, effectively reversing their own removal. This occurs
because the cached block state in the tile entity base class is
outdated and doesn't reflect the removal.
2020-07-17 22:35:49 +02:00
shartte 8142eb90a6 Added new Cell Rendering to ME Chest (#4464)
Moved cell models to origin 0,0,0.
Implemented a TER to render cell models/LED in the ME chest as they are rendered in the drive.
2020-07-17 20:37:07 +02:00
Sebastian Hartte 08abd4a770 Fixed formatting. 2020-07-17 20:26:17 +02:00
Sebastian Hartte b8722dbbc0 Do not rely on exceptions for control flow, when the
cell has no fuzzy mode.
2020-07-17 19:51:59 +02:00
Sebastian Hartte 1ac6d5d967 Fixes creation of entangled singularities. 2020-07-17 15:27:03 +02:00
Sebastian Hartte 5c290789e0 Fixes #4467: Private methods also need to be annotated with @OnlyIn(Dist.CLIENT)
if they use client-side classes.
2020-07-17 12:45:17 +02:00
yueh 38f6bf16f2 Updated dependencies (#4466)
Changed forge to 31.2.31 and also marked it as required version.
Changed JEI to 6.0.2.12 for dev usage.
2020-07-15 23:25:35 +02:00
Sebastian Hartte 0c5c23e9ff Restored more P2P 2020-07-14 00:12:27 +02:00
Sebastian Hartte 4953509255 P2P Fluid Tunnel Fix 2020-07-13 17:45:40 +02:00
Sebastian Hartte 832d4bb527 REI search integration. 2020-07-13 13:11:32 +02:00
Sebastian Hartte 62b02d3faf REI integration 2020-07-13 13:02:11 +02:00
Sebastian Hartte 188f105730 Fix the alive check for the matter cannon. 2020-07-12 17:20:42 +02:00
Sebastian Hartte 006316603d Tags 2020-07-12 16:54:39 +02:00
yueh 9bb23bcac8 Refactored crafting patterns (#4458)
* Deduplicate crafting patterns internals

This should save a bit memory for duplicate patterns as well as speed up
loading new patterns on reloading chunks.

* Encode recipe id in pattern
* Use the recipe id directly for looking it up
* Slightly refactored how patterns encode whether they are crafting patterns or not.
* Renamed PatternHelper.
* Added APIs to encode patterns. (#4463)
* Removed ICraftingPatternItem.
* Renamed isCrafting to isCraftable

Co-authored-by: shartte <shartte@users.noreply.github.com>
2020-07-12 16:21:30 +02:00
yueh 06735f5c39 Rewrite drive model to support custom cell models (#4459)
* Rewrite driver model to support custom cell models

Each cell can now register a mapping Item -> ResourceLocation for a
custom cell model. Fallback will always be a 1k item cell.
2020-07-11 23:07:20 +02:00
shartte e8143d3618 Merge pull request #4462 from AppliedEnergistics/aeplugin-loader
Restored the old PluginLoader as AddonLoader
2020-07-11 21:00:58 +02:00
yueh 0d43ca15be Removed AEApi
Moved all internal access to the internal `Api` class using a new static
getter.
2020-07-11 19:40:34 +02:00
yueh d18eabe1fc Restored the old PluginLoader as AddonLoader
Introduce a new `IAEAddon` interface, which has to be implemented and
annotated wit `@AEAddon` to obtain access to our public API.
2020-07-11 18:40:51 +02:00
yueh d9d491d51c Removed deprecated API parts (#4457) 2020-07-10 19:35:29 +02:00
yueh 9a5bd114a4 Updated IStorageCell docs to mention int limitations. 2020-07-10 16:04:30 +02:00
Sebastian Hartte 1bd4bd00a8 Worldgen, Configs 2020-07-09 23:56:54 +02:00
Sebastian Hartte 30cc8c8abc Changed Javadoc for Upgrade tooltip group 2020-07-07 20:43:56 +02:00
shartte 815094e5bf Merge pull request #4454 from AppliedEnergistics/fix-4453
Fixes #4453: Avoid using clientside methods serverside.
2020-07-07 20:23:54 +02:00
Sebastian Hartte 2944873431 First Working Worldgen of Meteorites 2020-07-07 18:55:56 +02:00
yueh 1eaddef694 Fixes #4453: Avoid using clientside methods serverside. 2020-07-07 18:13:32 +02:00
yueh 450299cb67 Updated README.md
Removed crafttweaker info. Will be moved to a wiki page when necessary
again.
Updated API part with the info about github packages and also moved it
higher.
2020-07-07 12:39:37 +02:00
yueh 235fc2e81f Removed superfluous IAEStack methods 2020-07-07 12:12:48 +02:00
yueh 92fb39d53a Added curseforge task 2020-07-07 10:21:58 +02:00
Sebastian Hartte f8ee4bb1f2 Meteorite 2020-07-07 02:13:10 +02:00
Sebastian Hartte 5eece068ba Worldgen, Compass (temp) 2020-07-07 01:55:15 +02:00
Sebastian Hartte 9220ca0048 Added HWYLA 2020-07-05 16:50:39 +02:00
Sebastian Hartte eb0e4289b3 Unify the client/server-side shared itemstack registry to avoid over-dependence on the current thread
when this class is used. Otherwise if a thread is not correctly detected to be part of the server or client
thread groups, a shared item stack from the wrong domain is returned.
2020-07-05 12:23:16 +02:00
Sebastian Hartte ebbb5b1059 Removed unused storage dimension cap. 2020-07-05 12:22:06 +02:00
Sebastian Hartte 1478e4c378 Lots more moved 2020-07-04 21:03:30 +02:00
yueh d4a1590b51 Added a blocktag for movable tile entities with spatial IO. (#4448)
`#spatial/whitelist` needs to be explicitly enabled through a config
value.
`#spatial/blacklist` will always be consider on top of the normal
blacklist.
2020-07-03 20:34:53 +02:00
yueh bd1d9701a9 Try to fail with missing assets (#4449) 2020-07-03 20:31:41 +02:00
yueh 4b3a232add Fix formatting 2020-07-03 20:07:51 +02:00
Sebastian Hartte b8aa810a5f Add equals(ItemStack) to IAEItemStack contract. 2020-07-03 14:32:48 +02:00
yueh 22facb9748 Don't tick debug energy tileentity clientside 2020-07-03 13:56:22 +02:00
yueh ef3cc8a0a0 Enables replicator card to place multiple instances at once. (#4447) 2020-07-03 13:04:12 +02:00
Sebastian Hartte 55b3dc0823 Removed unused class. 2020-07-02 23:22:40 +02:00
Sebastian Hartte 5982f094ec ME Chest 2020-07-02 22:34:21 +02:00
Sebastian Hartte eb93ffc8d8 Block Colors Registration,
fixing... schtuff.
2020-07-02 19:01:04 +02:00
Sebastian Hartte 7b21aa2b07 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	src/main/java/appeng/core/api/definitions/ApiParts.java
#	src/unported/java/appeng/core/api/definitions/PartType.java
2020-07-02 13:50:28 +02:00
shartte 9445fad5a6 Merge pull request #4446 from AppliedEnergistics/removed-part-type
Part type's gone!
2020-07-02 13:49:46 +02:00
Sebastian Hartte fee1c18afe Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	gradle.properties
#	src/main/java/appeng/block/AEBaseBlock.java
#	src/main/java/appeng/block/misc/QuartzFixtureBlock.java
#	src/main/java/appeng/block/misc/TinyTNTBlock.java
#	src/main/java/appeng/block/networking/CableBusBlock.java
#	src/main/java/appeng/helpers/AEMaterials.java
#	src/unported/java/appeng/block/misc/ChargerBlock.java
#	src/unported/java/appeng/block/networking/CreativeEnergyCellBlock.java
#	src/unported/java/appeng/block/networking/EnergyCellBlock.java
#	src/unported/java/appeng/block/networking/WirelessBlock.java
#	src/unported/java/appeng/block/paint/PaintSplotchesBlock.java
#	src/unported/java/appeng/block/qnb/QuantumLinkChamberBlock.java
#	src/unported/java/appeng/block/spatial/SpatialPylonBlock.java
#	src/unported/java/appeng/client/render/tesr/DriveLedTileEntityRenderer.java
#	src/unported/java/appeng/tile/storage/ChestBlockEntity.java
2020-07-02 12:26:38 +02:00
Sebastian Hartte 295e720d37 Merged more parts 2020-07-02 12:19:41 +02:00
shartte 1a7bac1fcc Merge pull request #4438 from AppliedEnergistics/drive-state-sync
Refactored drive state sync
2020-07-02 12:18:40 +02:00
shartte 19dee8d339 Merge pull request #4443 from AppliedEnergistics/cable-bus-redstone-connections
Refactored CableBus to pass the direction directly.
2020-07-02 12:17:54 +02:00
shartte a4f66c5923 Merge pull request #4444 from AppliedEnergistics/update-mappings
Update MCP mappings
2020-07-02 12:17:21 +02:00
Sebastian Hartte fe439bfb23 Part type's gone! 2020-07-02 12:05:34 +02:00
yueh 25da0b7357 Removed unused code from DriveLedTER 2020-07-02 11:37:59 +02:00
shartte a2344f52e1 Merge pull request #4445 from AppliedEnergistics/materials-rework
Changed AEGlassMaterial to Materials
2020-07-02 10:55:32 +02:00
Sebastian Hartte 75234415ac Cables work 2020-07-02 10:16:03 +02:00
yueh bafc65d3a8 Changed AEGlassMaterial to Materials
Preparation in case we need more to support custom non solid, non
opaque, or similar blocks.
Removed custom fullSize/opaque blocks in favour of Material
2020-07-02 09:57:47 +02:00
shartte 4e8296d3e7 Merge pull request #4442 from AppliedEnergistics/cleanups
Reduce Importance of PartType and Fix Upgrade Card Tooltip Grouping
2020-07-02 09:41:00 +02:00
Sebastian Hartte 26eeeb4c75 Fix player id logging. 2020-07-02 09:25:38 +02:00
Sebastian Hartte c7b1ab756b Fix WorldData initialization 2020-07-02 01:28:02 +02:00
Sebastian Hartte 2dd2b5d034 Added test dependency back. 2020-07-02 01:18:40 +02:00
Sebastian Hartte dd9346e53f Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	src/main/java/appeng/block/AEBaseBlockItem.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/parts/PartPlacement.java
2020-07-02 01:18:31 +02:00
Sebastian Hartte 3b4302583d Restore grid IGridProxyable 2020-07-02 01:13:26 +02:00
Sebastian Hartte f573b52b1b Be more lenient with the return value of BlockItem.tryPlace (it might be CONSUME in future versions). 2020-07-02 01:12:53 +02:00
Sebastian Hartte a1042384e3 Minor simplification of PartPlacement. 2020-07-02 01:09:17 +02:00
Sebastian Hartte 3dd9aa09d3 Fixed Gradle source sets. 2020-07-02 00:20:04 +02:00
Sebastian Hartte 2642ced86b Moving to source sets 2020-07-01 23:36:51 +02:00
Sebastian Hartte f2e3d81fd7 Working in part placement 2020-07-01 21:27:37 +02:00
yueh 1ce82cc3b9 Update MCP mappings 2020-07-01 20:23:27 +02:00
yueh 7dffbf78ce Refactored CableBus to pass the direction directly. 2020-07-01 19:56:39 +02:00
yueh 0f11c1e0a4 Hide debug tools from JEI when disabled via config (#4439) 2020-07-01 14:29:43 +02:00
yueh 77b544ce4f Refactored drive state sync
Removed blinking state for now
2020-07-01 14:22:07 +02:00
Sebastian Hartte 8e031ca8d6 Merge remote-tracking branch 'origin/cleanups' into fabric-1.16
# Conflicts:
#	api/src/main/java/appeng/api/implementations/items/IItemGroup.java
#	core/src/main/java/appeng/items/materials/MaterialItem.java
#	src/main/java/appeng/core/Registration.java
#	src/main/java/appeng/core/api/definitions/ApiParts.java
#	src/main/java/appeng/items/parts/ColoredPartItem.java
#	src/main/java/appeng/items/parts/PartItem.java
#	src/main/java/appeng/items/parts/PartModelsHelper.java
#	src/main/java/appeng/items/parts/PartType.java
#	src/main/java/appeng/items/tools/powered/PortableCellItem.java
2020-07-01 01:41:54 +02:00
Sebastian Hartte 996d387525 More moves 2020-07-01 01:39:50 +02:00
Sebastian Hartte 1cda087c03 Merge remote-tracking branch 'origin/master' into fabric-1.16 2020-07-01 01:31:20 +02:00
Sebastian Hartte 007c7ceb56 Moved more parts of ME over 2020-07-01 01:04:53 +02:00
Sebastian Hartte c67dba2f13 Removed reliance on PartType from code outside of Bootstrapping,
and restored ability to group different supported items on
Upgrade Card tooltips.
2020-07-01 00:56:17 +02:00
Sebastian Hartte 400fcdb633 Formatting fix 2020-07-01 00:50:37 +02:00
Sebastian Hartte fba157a707 Removed unused ItemPredicate 2020-07-01 00:44:48 +02:00
Sebastian Hartte 538965e74a Crash when someone tries to overwrite existing grid cache implementations. 2020-07-01 00:44:48 +02:00
shartte 0a56c724ed Merge pull request #4441 from AppliedEnergistics/cleanups
Minor Cleanups / Refactoring
2020-07-01 00:30:25 +02:00
Sebastian Hartte 8d8d3dd2d7 Minor refactoring.
Replaced use of reflection with use of functional factory interface (API change).
2020-06-30 18:58:30 +02:00
Sebastian Hartte d17f8cec92 Removed unused fields. 2020-06-30 18:39:34 +02:00
Sebastian Hartte d0acc9ccf1 Removed reliance of TickTracker on implementation detail to generate additional crash information. 2020-06-30 18:34:36 +02:00
yueh 17b919a171 Mark CableBusBlock as variableOpacity. 2020-06-30 15:37:34 +02:00
Sebastian Hartte 529d03fa9e Added Quartz Tools and Quartz Knife Recipes 2020-06-30 15:33:53 +02:00
Sebastian Hartte c0a4762ffc Fixed TNT and basic networking. 2020-06-30 11:30:04 +02:00
yueh 003ef8672c Added cullface to drive cell models. 2020-06-30 10:27:22 +02:00
Sebastian Hartte eaf2873649 Render all sides of the cell models regardless of cullface. 2020-06-29 22:39:34 +02:00
yueh 66d00a4600 Use our own TransparencyState.
ObfuscationReflectionHelper is a massive performance issue.
2020-06-29 22:17:39 +02:00
yueh d79d284690 Fix formatting 2020-06-29 22:17:25 +02:00
Sebastian Hartte 3337eb9ae3 Merge remote-tracking branch 'origin/master' into fabric-1.16
# Conflicts:
#	build.gradle
#	core/src/main/java/appeng/block/AEBaseBlock.java
#	core/src/main/java/appeng/block/misc/TinyTNTBlock.java
#	core/src/main/java/appeng/entity/TinyTNTPrimedRenderer.java
#	core/src/main/java/appeng/fluids/util/AEFluidStack.java
#	src/main/java/appeng/core/AEConfig.java
#	src/main/java/appeng/core/api/definitions/ApiItems.java
#	src/main/java/appeng/debug/EnergyGeneratorBlockEntity.java
#	src/main/java/appeng/entity/TinyTNTPrimedEntity.java
#	src/main/java/appeng/tile/storage/DriveBlockEntity.java
2020-06-29 21:35:34 +02:00
Sebastian Hartte ca104912d6 More fixes 2020-06-29 21:23:50 +02:00
Sebastian Hartte 7233b11284 Fix TinyTNT not spawning the correct entity client-side (and the renderer using the wrong shadow). 2020-06-29 21:14:58 +02:00
Sebastian Hartte d5491549eb Fixes TinyTNT not being primable with flint & steel. 2020-06-29 21:01:30 +02:00
Sebastian Hartte f943106419 Fix serialization of 0-amount fluidstacks which is required for properly updating an ME inventory where an existing fluid stack should be fully removed. (I.e. Taking out the last amount of a given fluid via a terminal). 2020-06-29 17:13:04 +02:00
Sebastian Hartte 57fa5576af Fix rendering of the dummy fluid item (i.e. in cell workbenches, fluid terminals are unaffected). 2020-06-29 15:32:49 +02:00
Sebastian Hartte 346e58ff25 Remove duplicate registration of disassembly recipes. 2020-06-29 02:58:52 +02:00
Sebastian Hartte 42c2be5c05 Add version constraint on Forge. 2020-06-29 02:57:38 +02:00
Sebastian Hartte 0d63f560d3 More moves and compilation fixes 2020-06-29 02:15:31 +02:00
Sebastian Hartte 312abce956 Removed unused interface. 2020-06-28 23:58:36 +02:00
Sebastian Hartte 6379cfe3a2 Removed unused interface. 2020-06-28 23:57:19 +02:00
yueh 208cd70725 Readded cullface to drive model.
Also fixed a debug machine
2020-06-28 20:59:51 +02:00
yueh 130fc74768 Render cells in offline drives as offline. 2020-06-28 20:01:22 +02:00
yueh 6bbea481b8 Grid connections to the front of a drive are no longer valid. 2020-06-28 19:35:19 +02:00
yueh 55d7ac82e5 Removed no channels pathing.
Also use default values for features without a config option
2020-06-28 19:19:05 +02:00
Sebastian Hartte 3df93fc66d Moving 2020-06-28 16:18:11 +02:00
Sebastian Hartte f5412152a4 Utils ported 2020-06-28 15:47:44 +02:00
Sebastian Hartte 46955643b9 Utils ported 2020-06-28 13:28:14 +02:00
Sebastian Hartte fee5b7fdfc Utils ported 2020-06-28 03:41:44 +02:00
Sebastian Hartte 7c28a71e10 Moving code around 2020-06-28 00:51:00 +02:00
Sebastian Hartte 7f049e099d Moving code around 2020-06-28 00:48:21 +02:00
Sebastian Hartte 37ce6b262e Fabric port in progress 2020-06-28 00:45:33 +02:00
Sebastian Hartte b79cd732b2 Fabric port in progress 2020-06-27 23:25:38 +02:00
Sebastian Hartte 80fbb58d4f API compiles 2020-06-27 18:09:44 +02:00
yueh 4ee44970b6 Forgot github token 2020-06-27 16:28:45 +02:00
Sebastian Hartte ba71a82288 Migrations 2020-06-27 16:18:20 +02:00
yueh e323e08192 Merge build and publish steps 2020-06-27 16:17:45 +02:00
yueh 3faab6ae25 Reenable maven publish 2020-06-27 16:03:46 +02:00
yueh 3c53fddd8e Added content type for release assets 2020-06-27 15:53:12 +02:00
Sebastian Hartte d638d083c2 Moved API sources 2020-06-27 15:42:51 +02:00
Sebastian Hartte 136c204421 Fixup logo and remove demo entrypoint 2020-06-27 15:40:10 +02:00
Sebastian Hartte 6cda95b979 Moved assets 2020-06-27 15:31:53 +02:00
yueh f3233d948b Sign jars (#4435) 2020-06-27 15:30:07 +02:00
Sebastian Hartte 000cb555e3 Adjusted gitignore
Cross-Module dependency
2020-06-27 15:25:47 +02:00
Sebastian Hartte 82af7e6dde Start of Fabric Setup 2020-06-27 15:23:15 +02:00
yueh d5eb16a6b0 Updated README.md 2020-06-25 22:27:55 +02:00
yueh 200ca8d9cc Publish api, sources, and javadoc artifacts 2020-06-25 22:21:11 +02:00
1960 changed files with 33515 additions and 34064 deletions
+7 -5
View File
@@ -21,9 +21,11 @@ jobs:
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Generate assets
uses: GabrielBB/xvfb-action@v1.2
- name: Generate Resources
run: ./gradlew generateData
- name: Build
run: ./gradlew build
- uses: actions/upload-artifact@v2
with:
run: ./gradlew runData --no-daemon
- name: Build with Gradle
run: ./gradlew build --no-daemon
name: dist
path: build/libs/
+8 -4
View File
@@ -21,9 +21,13 @@ jobs:
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Clean gradle
run: ./gradlew clean --no-daemon --max-workers 1
- name: Validate no assets
run: test ! -d ./src/generated
- name: Generate assets
uses: GabrielBB/xvfb-action@v1.2
with:
run: ./gradlew runData --no-daemon
run: ./gradlew runData --no-daemon --max-workers 1
- name: Validate assets
run: test -d ./src/generated -a -f ./src/generated/resources/.cache/cache
- name: Build with Gradle
run: ./gradlew build --no-daemon
run: ./gradlew build --no-daemon --max-workers 1
+10 -5
View File
@@ -2,7 +2,8 @@ name: 'Build PRs'
on:
pull_request:
branches: [ master ]
branches:
- '*'
jobs:
build:
@@ -21,14 +22,18 @@ jobs:
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Clean gradle
run: ./gradlew clean --no-daemon --max-workers 1
- name: Validate no assets
run: test ! -d ./src/generated
- name: Generate assets
uses: GabrielBB/xvfb-action@v1.2
with:
run: ./gradlew runData --no-daemon
run: ./gradlew runData --no-daemon --max-workers 1
- name: Validate assets
run: test -d ./src/generated -a -f ./src/generated/resources/.cache/cache
- name: Build with Gradle
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: ./gradlew build --no-daemon
run: ./gradlew build --no-daemon --max-workers 1
- uses: actions/upload-artifact@v2
with:
name: dist
+39 -23
View File
@@ -1,18 +1,19 @@
name: 'Release'
on:
release:
types: [created]
create:
tags:
- fabric/v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Validate semver
- name: Export current tag as environment variable
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.ref }}
run: echo "::set-env name=TAG::${TAG}"
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
@@ -20,23 +21,38 @@ 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
env:
RELEASE: ${{ github.event.release.tag_name }}
run: ./gradlew build --no-daemon
- name: Publish package
- name: Validate no assets
run: test ! -d ./src/generated
- name: Generate resources
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE: ${{ github.event.release.tag_name }}
run: ./gradlew publish --no-daemon
run: ./gradlew generateData
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: build/libs/
- name: Publish to github packages
env:
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 publishMavenPublicationToGitHubPackagesRepository --no-daemon --max-workers 1
- name: Publish to modmaven
env:
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
run: ./gradlew publishMavenPublicationToModmavenRepository --no-daemon --max-workers 1
- name: Upload to curseforge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE: ${{ secrets.CURSEFORGE }}
run: ./gradlew curseforge
+66 -71
View File
@@ -1,5 +1,6 @@
[![Build master](https://img.shields.io/github/workflow/status/AppliedEnergistics/Applied-Energistics-2/Build%20master?style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/actions?query=workflow%3A%22Build+master%22)
[![Latest Release](https://img.shields.io/github/v/release/AppliedEnergistics/Applied-Energistics-2?label=Latest%20Release&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
[![Latest Release](https://img.shields.io/github/v/release/AppliedEnergistics/Applied-Energistics-2?style=flat-square&label=Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
[![Latest PreRelease](https://img.shields.io/github/v/release/AppliedEnergistics/Applied-Energistics-2?include_prereleases&style=flat-square&label=Pre)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
# Applied Energistics 2
@@ -11,10 +12,9 @@
* [Downloads](#downloads)
* [Installation](#installation)
* [Issues](#issues)
* [API](#applied-energistics-2-api)
* [Building](#building)
* [Contribution](#contribution)
* [API](#applied-energistics-2-api)
* [CraftTweaker](#applied-energistics-2-crafttweaker)
* [Localization](#applied-energistics-2-localization)
* [Credits](#credits)
@@ -45,7 +45,7 @@ A Mod about Matter, Energy and using them to conquer the world..
## Downloads
Downloads can be found on [CurseForge](http://www.curse.com/mc-mods/minecraft/223794-applied-energistics-2) or on the [official website](http://ae-mod.info/Downloads/).
Downloads can be found on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/applied-energistics-2) or on the [official website](http://ae-mod.info/Downloads/).
## Installation
@@ -66,12 +66,66 @@ Providing as many details as possible does help us to find and resolve the issue
Please note that we might close any issue not matching these requirements.
## Applied Energistics 2 API
The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general.
### Maven
Our authoritative Maven repository is Github Packages, which you can also use in your builds. Use of Github Packages
[requires special setup](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages#authenticating-to-github-packages)
to authenticate with your personal access token.
AE2 is also available without authentication from Modmaven.
You can use the following snippet as example on how to add a repository to your gradle build file.
repositories {
maven {
name "Modmaven"
url "https://modmaven.k-4u.nl/"
// For Gradle 5.1 and above, limit it to just AE2
content {
includeGroup 'appeng'
}
}
// Required for libblockattributes
maven {
name = "BuildCraft"
url = "https://mod-buildcraft.com/maven"
content {
includeGroup "alexiil.mc.lib"
}
}
}
When compiling against the AE2 API you can use gradle dependencies, just add
dependencies {
modCompileOnly "appeng:appliedenergistics2-fabric:VERSION:api"
// Include only if you want AE2 at runtime
modRuntimeOnly "appeng:appliedenergistics2-fabric:VERSION"
}
or add the `compileOnly` line to your existing dependencies task to your build.gradle.
Replace `VERSION` with the desired one. With 1.15+ we switched to using [semver](https://semver.org/).
It is highly recommended following its specification and further considering an upper bound for the dependency version.
A change of the `MAJOR` version will be an API break and can lead to various crashes. Better to inform a player about the addon not supporting the new version until it could be tested or updated.
An example string would be `appeng:appliedenergistics2:7.0.0-alpha.6:api` for the API only or `appeng:appliedenergistics2:7.0.0-alpha.6` for the whole mod.
Builds obtained [here](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) or via [maven](https://github.com/AppliedEnergistics/Applied-Energistics-2/packages) should work in a development environment.
However the dependency might need to be wrapped in `fg.deobf()` like `runtimeOnly fg.deobf("appeng:appliedenergistics2:VERSION:api")`
## Building
1. Clone this repository via
- SSH `git clone git@github.com:AppliedEnergistics/Applied-Energistics-2.git` or
- HTTPS `git clone https://github.com/AppliedEnergistics/Applied-Energistics-2.git`
2. Build using the gradle `build` task. Jar will be in `build/libs`
2. Build using the `gradlew runData build` command. Jar will be in `build/libs`
3. For core developer: Setup IDE
- IntelliJ: Import as gradle project
- Eclipse: Import as gradle project or execute gradle task `eclipse` and potentially `genEclipseRuns`
@@ -100,75 +154,16 @@ Here are a few things to keep in mind that will help get your PR approved.
* SSH `git clone git@github.com:<your username>/Applied-Energistics-2.git` or
* HTTPS `git clone https://github.com/<your username>/Applied-Energistics-2.git`
3. Change code base
4. Add changes to git `git add -A`
5. Commit changes to your clone `git commit -m "<summary of made changes>"`
6. Push to your fork `git push`
7. Create a Pull-Request on GitHub
8. Wait for review
9. Squash commits for cleaner history
4. Run `gradlew spotlessApply` to apply automatic code formatting
5. Add changes to git `git add -A`
6. Commit changes to your clone `git commit -m "<summary of made changes>"`
7. Push to your fork `git push`
8. Create a Pull-Request on GitHub
9. Wait for review
10. Squash commits for cleaner history
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork. Also read up about [synching](https://help.github.com/articles/syncing-a-fork) if you plan to contribute on regular basis.
## Applied Energistics 2 API
The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general.
Universal builds obtained [Here](http://ae2.ae-mod.info/Downloads/) should work in a development environment.
### Maven
When compiling against the AE2 API you can use gradle dependencies, just add
dependencies {
compile "appeng:appliedenergistics2:rv_-_____-__:api"
}
or add the compile line to your existing dependencies task to your build.gradle
Where the __ are filled in with the correct version criteria; AE2 is available from the default forge maven so no additional repositories are necessary.
An example string would be `appeng:appliedenergistics2:rv5-stable-1:api` for the API only or `appeng:appliedenergistics2:rv5-stable-1` for the whole mod.
## Applied Energistics 2 CraftTweaker
### Inscriber
The inscriber uses the vanilla recipe system with a custom `type` of `appliedenergistics2:inscriber`.
See the [inscriber recipe folder](src/main/resources/data/appliedenergistics2/recipes/inscriber) for some examples.
### Grindstone
The grindstone uses the vanilla recipe system with a custom `type` of `appliedenergistics2:grinder`.
See the [grinder recipe folder](src/main/resources/data/appliedenergistics2/recipes/grinder) for some examples.
### Spatial
Whitelist a TileEntity class for Spatial IO.
mods.appliedenergistics2.Spatial.whitelistEntity( String fullEntityClassName );
### Attunement
Attune a ItemStack or ModID to a specific P2P-Tunnel type. ModID's are used as fallback when no ItemStack was found.
mods.appliedenergistics2.Attunement.attuneME( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneME( String modID );
mods.appliedenergistics2.Attunement.attuneItem( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneItem( String modID );
mods.appliedenergistics2.Attunement.attuneFluid( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneFluid( String modID );
mods.appliedenergistics2.Attunement.attuneRedstone( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneRedstone( String modID );
mods.appliedenergistics2.Attunement.attuneRF( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneRF( String modID );
mods.appliedenergistics2.Attunement.attuneIC2( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneIC2( String modID );
mods.appliedenergistics2.Attunement.attuneLight( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneLight( String modID );
### Cannon
Add ammo types for the matter cannon.
mods.appliedenergistics2.Cannon.registerAmmo( ItemStack itemStack, double weight );
## Applied Energistics 2 Localization
### English Text
+280 -75
View File
@@ -16,36 +16,82 @@
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
plugins {
id "maven-publish"
id "com.diffplug.gradle.spotless" version "4.3.0"
id "org.sonarqube" version "2.8"
id "jacoco"
id 'java'
id 'fabric-loom'
id 'maven-publish'
id "com.diffplug.gradle.spotless" version "4.3.0"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "org.sonarqube" version "2.8"
id "jacoco"
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: "eclipse"
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url = "https://maven.fabricmc.net/" }
maven {
name = "BuildCraft"
url = "https://mod-buildcraft.com/maven"
content {
includeGroup "alexiil.mc.lib"
}
}
maven {
name = "HYWLA"
url = "https://maven.tehnut.info/"
content {
includeGroup "mcp.mobius.waila"
}
}
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
//Fabric api
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
modImplementation "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}"
modImplementation "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}"
modImplementation "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}"
include "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}"
include "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}"
include "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}"
// Energy API
modApi "teamreborn:energy:${tr_energy_version}"
include "teamreborn:energy:${tr_energy_version}"
modCompileOnly("me.shedaniel:RoughlyEnoughItems:${rei_version}") {
exclude group: "net.fabricmc.fabric-api"
}
modCompileOnly("mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75") {
exclude group: "net.fabricmc.fabric-api"
}
modRuntime("me.shedaniel:RoughlyEnoughItems:${rei_version}") {
exclude group: "net.fabricmc.fabric-api"
}
modRuntime("TechReborn:TechReborn-1.16:3.5.1+build.101") {
exclude group: "net.fabricmc.fabric-api"
}
// modRuntimeOnly "mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
// unit test dependencies
testCompile "junit:junit:4.13"
}
group = artifact_group
archivesBaseName = artifact_basename
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
options.deprecation = false
}
// ensure everything uses UTF-8 and not some random codepage chosen by gradle
@@ -54,8 +100,8 @@ tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// Create version number
version = version_major + "." + version_minor + "." + version_patch
///////////////////
// Version Number
ext.pr = System.getenv('PR_NUMBER') ?: ""
if (ext.pr) {
@@ -67,15 +113,19 @@ if (ext.branch) {
version = version + "+branch." + ext.branch
}
ext.release = System.getenv('RELEASE') ?: ""
if (ext.release) {
version = ext.release.substring(1)
ext.tag = System.getenv('TAG') ?: ""
if (ext.tag && ext.tag.startsWith("fabric/v")) {
version = ext.tag.substring("fabric/v".length())
// Validate that the rest is a semver version
if (version ==~ /^(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-]+)*))?$/) {
println("::set-env name=VERSION::${version}")
} else {
throw new GradleException("Invalid semver: $version")
}
}
// Maven group and artifact name
group = artifact_group
archivesBaseName = artifact_basename
ext.isAlpha = project.version.contains("alpha")
ext.isBeta = project.version.contains("beta")
sourceSets {
api
@@ -86,71 +136,138 @@ sourceSets {
srcDir 'src/generated/resources'
}
}
datagen {
compileClasspath += sourceSets.api.output
runtimeClasspath += sourceSets.api.output
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
test {
compileClasspath += sourceSets.api.output
runtimeClasspath += sourceSets.api.output
java {
exclude '**/*'
}
}
siteexport {
compileClasspath += sourceSets.api.output
runtimeClasspath += sourceSets.api.output
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
apiCompile.extendsFrom(compile)
apiCompile.extendsFrom(compileClasspath)
datagenCompile.extendsFrom(compileClasspath)
siteexportCompile.extendsFrom(compileClasspath)
siteexportRuntime.extendsFrom(runtimeClasspath)
}
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/spotless.gradle'
////////////////////
// Forge/Minecraft
minecraft {
mappings channel: "snapshot", version: project.mcp_mappings
accessWidener "src/main/resources/appliedenergistics2.accesswidener"
}
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
processResources {
inputs.property "version", project.version
runs {
client {
property 'forge.logging.console.level', 'debug'
workingDirectory project.file('run')
mods {
appliedenergistics2 {
source sourceSets.main
source sourceSets.api
}
}
}
server {
property 'forge.logging.console.level', 'debug'
workingDirectory project.file('run')
mods {
appliedenergistics2 {
source sourceSets.main
source sourceSets.api
}
}
}
data {
property 'forge.logging.console.level', 'debug'
workingDirectory project.file('run')
args '--mod', 'appliedenergistics2', '--all', '--output', file('src/generated/resources/')
mods {
appliedenergistics2 {
source sourceSets.main
source sourceSets.api
}
}
}
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
apply from: 'gradle/scripts/artifacts.gradle'
//////////////
// Aritfacts
processResources {
exclude '.cache'
}
jar {
finalizedBy 'remapJar'
from sourceSets.main.output.classesDirs
from sourceSets.api.output.classesDirs
from sourceSets.main.output.resourcesDir
from sourceSets.api.output.resourcesDir
manifest {
attributes([
"Specification-Title": "Applied Energistics 2",
"Specification-Vendor": "TeamAppliedEnergistics",
"Specification-Version": "${project.version}",
"Implementation-Title": "${project.name}",
"Implementation-Version": "${project.version}",
"Implementation-Vendor" :"TeamAppliedEnergistics",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "appliedenergistics2.mixins.json"
])
}
}
task javadocs(type: Javadoc) {
classpath = sourceSets.main.compileClasspath
source = sourceSets.api.java
include "appeng/api/**"
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
}
task javadocJar(type: Jar, dependsOn: javadocs) {
classifier = "javadoc"
from javadoc.destinationDir
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
from sourceSets.api.allSource
}
task apiJar(type: Jar) {
classifier = "api"
from sourceSets.api.output
include "appeng/api/**"
// TODO: when FG bug is fixed, remove allJava from the api jar.
// https://github.com/MinecraftForge/ForgeGradle/issues/369
// Gradle should be able to pull them from the -sources jar.
from sourceSets.api.allJava
}
artifacts {
archives javadocJar
archives sourcesJar
archives apiJar
}
//////////////////
// Maven publish
publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
from components.java
if (!version.endsWith("-SNAPSHOT")) {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = 'appliedenergistics2-fabric'
version = project.version
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifact javadocJar
artifact apiJar
}
}
}
repositories {
@@ -162,5 +279,93 @@ publishing {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/AppliedEnergistics/Applied-Energistics-2"
}
maven {
credentials {
username System.getenv("MODMAVEN_USER")
password System.getenv("MODMAVEN_PASSWORD")
}
name = "modmaven"
url = "https://modmaven.k-4u.nl/artifactory/local-releases/"
}
}
}
import net.fabricmc.loom.task.RunClientTask;
task generateData(type: RunClientTask, dependsOn: downloadAssets, group: "ae2", description: "Generates various JSON assets for the mod") {
classpath = configurations.runtimeClasspath
classpath sourceSets.api.output
classpath sourceSets.main.output
classpath sourceSets.datagen.output
systemProperty "appeng.generateData", "true"
}
build.dependsOn generateData
task runSiteExport(type: RunClientTask, dependsOn: downloadAssets, group: "ae2", description: "Export game assets for the website") {
classpath = configurations.runtimeClasspath
classpath sourceSets.api.output
classpath sourceSets.main.output
classpath sourceSets.siteexport.output
}
/////////////
// Spotless
spotless {
java {
target 'src/*/java/appeng/**/*.java'
indentWithSpaces()
eclipse().configFile 'codeformat/codeformat.xml'
importOrderFile 'codeformat/ae2.importorder'
}
format 'json', {
target 'src/*/resources/**/*.json'
targetExclude 'src/generated/resources/**'
prettier().config(['parser': 'json'])
}
}
////////////////
// Curse Forge
if (System.getenv("CURSEFORGE") && !version.endsWith("-SNAPSHOT")) {
def cfReleaseType = "release"
if (ext.isAlpha) {
cfReleaseType = "alpha"
} else if (ext.isBeta) {
cfReleaseType = "beta"
}
curseforge {
apiKey = System.getenv("CURSEFORGE")
project {
id = project.curseforge_project
changelogType = "markdown"
changelog = System.getenv("CHANGELOG") ?: "Please visit our [releases](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) for a changelog"
releaseType = cfReleaseType
addGameVersion project.minecraft_version
addGameVersion "Fabric"
mainArtifact(remapJar.archiveFile) {
displayName = "${project.version} [FABRIC]"
}
}
options {
forgeGradleIntegration = false
}
afterEvaluate {
tasks.getByName("curseforge${project.curseforge_project}").dependsOn remapJar
}
}
}
////////////////
// 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()
}
}
}
+20 -26
View File
@@ -1,34 +1,28 @@
version_major=0
version_minor=0
version_patch=0
version=0.0.0-SNAPSHOT
artifact_group=appeng
artifact_basename=appliedenergistics2
artifact_basename=appliedenergistics2-fabric
#########################################################
# Minecraft Versions #
#########################################################
minecraft_release=1.15
minecraft_version=1.15.2
mcp_mappings=20200613-1.15.1
forge_version=31.2.20
org.gradle.jvmargs=-Xmx2G
#########################################################
# Provided APIs #
#########################################################
jei_version=6.0.0.4
top_version=2.0.4-5
hwyla_version=1.10.8-B72_1.15.2
ctm_version=MC1.15.2-1.1.0.9
# Fabric Properties
# Check these on https://modmuss50.me/fabric.html
minecraft_version=1.16.3
yarn_mappings=1.16.3+build.11
loader_version=0.9.3+build.207
#Fabric api
fabric_version=0.21.0+build.407-1.16
loom_version=0.5-SNAPSHOT
# Dependencies
libblockattributes_version=0.8.0
tr_energy_version=0.1.0
rei_version=5.2.10
#########################################################
# Deployment #
#########################################################
website_version=1.15.2
curse_versions=1.15.2
#########################################################
# Gradle #
#########################################################
# Various tasks like runData will fail when run as daemon
org.gradle.daemon=false
curseforge_project=223794
-78
View File
@@ -1,78 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, 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 <http://www.gnu.org/licenses/lgpl>.
*/
processResources {
exclude '.cache'
}
jar {
from sourceSets.main.output.classesDirs
from sourceSets.api.output.classesDirs
from sourceSets.main.output.resourcesDir
from sourceSets.api.output.resourcesDir
manifest {
attributes([
"Specification-Title": "Applied Energistics 2",
"Specification-Vendor": "TeamAppliedEnergistics",
"Specification-Version": "${project.version}",
"Implementation-Title": "${project.name}",
"Implementation-Version": "${project.version}",
"Implementation-Vendor" :"TeamAppliedEnergistics",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
])
}
}
task javadocs(type: Javadoc) {
classpath = sourceSets.main.compileClasspath
source = sourceSets.api.java
include "appeng/api/**"
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
}
task javadocJar(type: Jar, dependsOn: javadocs) {
classifier = "javadoc"
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = "sources"
from sourceSets.main.allJava
from sourceSets.api.allJava
}
task apiJar(type: Jar) {
classifier = "api"
from sourceSets.api.output
include "appeng/api/**"
// TODO: when FG bug is fixed, remove allJava from the api jar.
// https://github.com/MinecraftForge/ForgeGradle/issues/369
// Gradle should be able to pull them from the -sources jar.
from sourceSets.api.allJava
}
artifacts {
archives javadocJar
archives sourcesJar
archives apiJar
}
-87
View File
@@ -1,87 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, 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 <http://www.gnu.org/licenses/lgpl>.
*/
repositories {
mavenLocal()
maven { // modmaven, maven proxy
name 'modmaven'
url "https://modmaven.k-4u.nl/"
}
maven {
name "Mobius"
url "http://mobiusstrip.eu/maven"
}
maven {
name = "JEI repo"
url "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "Tesla repo"
url "http://maven.mcmoddev.com"
}
maven {
name = "IC2 repo"
url = "http://maven.ic2.player.to"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven { // TheOneProbe
name 'tterrag maven'
url "http://maven.tterrag.com/"
}
maven {
name 'mcjty'
url "http://maven.k-4u.nl/"
}
maven { // CraftTweaker
name 'jared maven'
url "http://maven.blamejared.com/"
}
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// compile against provided APIs
compileOnly "mezz.jei:jei-${minecraft_version}:${jei_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe-${minecraft_release}:${minecraft_release}-${top_version}:api"
// Runtime, Mods
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}")
runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-${minecraft_release}:${minecraft_release}-${top_version}")
runtimeOnly fg.deobf("team.chisel.ctm:CTM:${ctm_version}")
// unit test dependencies
testCompile "junit:junit:4.13"
}
-32
View File
@@ -1,32 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2020, 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
*g 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 <http://www.gnu.org/licenses/lgpl>.
*/
spotless {
java {
target 'src/*/java/appeng/**/*.java'
indentWithSpaces()
eclipse().configFile 'codeformat/codeformat.xml'
importOrderFile 'codeformat/ae2.importorder'
}
format 'json', {
target 'src/*/resources/**/*.json'
targetExclude 'src/generated/resources/**'
prettier().config(['parser': 'json'])
}
}
Binary file not shown.
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+31 -20
View File
@@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
@@ -138,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -159,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
Vendored
+20 -1
View File
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
+15
View File
@@ -0,0 +1,15 @@
pluginManagement {
repositories {
jcenter()
maven {
name = "Fabric"
url = "https://maven.fabricmc.net/"
}
gradlePluginPortal()
}
plugins {
id "fabric-loom" version loom_version
}
}
@@ -26,12 +26,16 @@ import java.lang.annotation.Target;
/**
* Use this annotation on a class in your Mod to have it instantiated during the
* initialization phase of Applied Energistics. AE expects your class to have a
* single constructor and can supply certain arguments to your constructor using
* dependency injection.
* initialization phase of Applied Energistics.
* <p>
* The class also needs to implement {@link IAEAddon}.
* <p>
* AE expects your class to have a single constructor without any parameters.
* <p>
* This is the only way to get access to the public {@link IAppEngApi} instance.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Retention(RetentionPolicy.CLASS)
@Documented
public @interface AEPlugin {
public @interface AEAddon {
}
-67
View File
@@ -1,67 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api;
import java.lang.reflect.Field;
import appeng.api.exceptions.CoreInaccessibleException;
/**
* Entry point for api.
*/
public enum AEApi {
;
private static final String CORE_API_FQN = "appeng.core.Api";
private static final String CORE_API_FIELD = "INSTANCE";
private static final IAppEngApi HELD_API;
static {
try {
final Class<?> apiClass = Class.forName(CORE_API_FQN);
final Field apiField = apiClass.getField(CORE_API_FIELD);
HELD_API = (IAppEngApi) apiField.get(apiClass);
} catch (final ClassNotFoundException e) {
throw new CoreInaccessibleException(
"AE2 API tried to access the " + CORE_API_FQN + " class, without it being declared.");
} catch (final NoSuchFieldException e) {
throw new CoreInaccessibleException("AE2 API tried to access the " + CORE_API_FIELD + " field in "
+ CORE_API_FQN + " without it being declared.");
} catch (final IllegalAccessException e) {
throw new CoreInaccessibleException("AE2 API tried to access the " + CORE_API_FIELD + " field in "
+ CORE_API_FQN + " without enough access permissions.");
}
}
/**
* API Entry Point.
*
* @return the {@link IAppEngApi}
*/
public static IAppEngApi instance() {
return HELD_API;
}
}
-33
View File
@@ -1,33 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, 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 <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks interfaces that can be used as injectable constructor arguments for an
* {@link AEPlugin}.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface AEInjectable {
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2020 TeamAppliedEnergistics
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -21,26 +21,25 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.implementations;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.networking.crafting.ICraftingPatternDetails;
package appeng.api;
/**
* Implemented on {@link Item}
* Every AE2 addon requiring access to {@link IAppEngApi}, needs to provide at
* least one class implementing this interface.
* <p>
* Further it requires the class to be annotated with {@link AEAddon}.
*/
public interface ICraftingPatternItem {
public interface IAEAddon {
/**
* Access Details about a pattern
* This gets called once the API is successfully constructed and ready to be
* used.
* <p>
* Each addon is responsible to maintain a reference to {@link IAppEngApi} for
* future use. Otherwise there is no alternative to access it later.
*
* @param is pattern
* @param w crafting world
*
* @return details of pattern
* @param api The API instance when ready.
*/
ICraftingPatternDetails getPatternForItem(ItemStack is, World w);
void onAPIAvailable(IAppEngApi api);
}
+13 -7
View File
@@ -23,16 +23,22 @@
package appeng.api;
import appeng.api.client.IClientHelper;
import appeng.api.crafting.ICraftingHelper;
import appeng.api.definitions.IDefinitions;
import appeng.api.features.IRegistryContainer;
import appeng.api.networking.IGridHelper;
import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
import appeng.api.util.IClientHelper;
@AEInjectable
public interface IAppEngApi {
/**
* @return An accessible list of all AE definitions
*/
IDefinitions definitions();
/**
* @return Registry Container for the numerous registries in AE2.
*/
@@ -43,6 +49,11 @@ public interface IAppEngApi {
*/
IStorageHelper storage();
/**
* @return A helper for working with crafting related tasks.
*/
ICraftingHelper crafting();
/**
* @return A helper to create {@link IGridNode} and other grid related objects.
*/
@@ -53,11 +64,6 @@ public interface IAppEngApi {
*/
IPartHelper partHelper();
/**
* @return An accessible list of all AE definitions
*/
IDefinitions definitions();
/**
* @return Utility methods primarily useful for client side stuff
*/
@@ -0,0 +1,89 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 TeamAppliedEnergistics
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.client;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.Item;
import net.minecraft.util.Identifier;
/**
* A registry for 3D models used to render storage cells in the world, when they
* are inserted into a drive or similar machines.
*/
public interface ICellModelRegistry {
/**
* Register a new model for a storage cell item.
*
* <p>
* You are responsible for ensuring that the given model is actually loaded by
* the game. See
* {@see net.minecraftforge.client.model.ModelLoader#addSpecialModel}.
* <p>
* This method only maps an {@link Item} to a {@link Identifier} which can be
* looked up from the
* {@link net.minecraft.client.render.model.BakedModelManager}. No validation
* about missing models will be done.
* <p>
* Will throw an exception in case a model is already registered for an item.
* <p>
* For examples look at our cell part models within the drive model directory.
*
* @param item The cell item
* @param model The {@link net.minecraft.util.Identifier} representing the
* model.
* @return
*/
void registerModel(@Nonnull Item item, @Nonnull Identifier model);
/**
* The {@link Identifier} of the model used to render the given storage cell
* {@link Item} when inserted into a drive or similar.
*
* @param item
* @return null, if no model is registered.
*/
@Nullable
Identifier model(@Nonnull Item item);
/**
* An unmodifiable map of all registered mappings.
*
* @return
*/
@Nonnull
Map<Item, Identifier> models();
/**
* Returns the default model, which can be used when no explicit model is
* registered.
*/
@Nonnull
Identifier getDefaultModel();
}
@@ -21,11 +21,11 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.util;
package appeng.api.client;
import java.util.List;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.storage.cells.ICellInventoryHandler;
import appeng.api.storage.data.IAEStack;
@@ -37,6 +37,13 @@ public interface IClientHelper {
* @param handler Cell handler.
* @param lines List of lines to add to.
*/
<T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<ITextComponent> lines);
<T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<Text> lines);
/**
* A helper to work with clientside related tasks for cells.
*
* @return
*/
ICellModelRegistry cells();
}
+2 -13
View File
@@ -23,26 +23,15 @@
package appeng.api.config;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
public enum Actionable {
/**
* Perform the intended action.
*/
MODULATE(FluidAction.EXECUTE),
MODULATE,
/**
* Pretend to perform the action.
*/
SIMULATE(FluidAction.SIMULATE);
SIMULATE
private final FluidAction fluidAction;
Actionable(FluidAction fluidAction) {
this.fluidAction = fluidAction;
}
public FluidAction getFluidAction() {
return fluidAction;
}
}
+20 -11
View File
@@ -23,46 +23,55 @@
package appeng.api.config;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
public enum PowerUnits {
AE("gui.appliedenergistics2.units.appliedenergstics"), // Native Units - AE Energy
EU("gui.appliedenergistics2.units.ic2"), // IndustrialCraft 2 - Energy Units
RF("gui.appliedenergistics2.units.rf"); // RF - Redstone Flux
AE("gui.appliedenergistics2.units.appliedenergstics", "AE"), // Native Units - AE Energy
EU("gui.appliedenergistics2.units.ic2", "EU"), // IndustrialCraft 2 - Energy Units
TR("gui.appliedenergistics2.units.tr", "E"); // TR - TechReborn energy
/**
* unlocalized name for the power unit.
*/
public final String unlocalizedName;
/**
* unlocalized name for the power unit's symbol used to display values.
*/
public final String symbolName;
/**
* please do not edit this value, it is set when AE loads its config files.
*/
public double conversionRatio = 1.0;
PowerUnits(final String un) {
PowerUnits(final String un, String symbolName) {
this.unlocalizedName = un;
this.symbolName = symbolName;
}
/**
* do power conversion using AE's conversion rates.
*
* <p>
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
*
* <p>
* will normally returns 64, as it will convert the EU, to AE with AE's power
* settings.
*
* @param target target power unit
* @param value value
*
* @return value converted to target units, from this units.
*/
public double convertTo(final PowerUnits target, final double value) {
return (value * this.conversionRatio) / target.conversionRatio;
}
public ITextComponent textComponent() {
return new TranslationTextComponent(unlocalizedName);
public Text textComponent() {
return new TranslatableText(unlocalizedName);
}
public String getSymbolName() {
return symbolName;
}
}
@@ -23,6 +23,11 @@
package appeng.api.config;
import java.util.Locale;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
/**
* Represent the security systems basic permissions, these are not for
* anti-griefing, they are part of the mod as a gameplay feature.
@@ -58,13 +63,22 @@ public enum SecurityPermissions {
*/
SECURITY;
private final String translationKey = "gui.appliedenergistics2.security." + this.name().toLowerCase();
private final String translationKey = "gui.appliedenergistics2.security." + this.name().toLowerCase(Locale.ROOT);
public String getTranslatedName() {
return this.translationKey + ".name";
}
public Text nameText() {
return new TranslatableText(getTranslatedName());
}
public String getTranslatedTip() {
return this.translationKey + ".tip";
}
public Text tooltipText() {
return new TranslatableText(getTranslatedTip());
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ public enum Settings {
CONDENSER_OUTPUT(EnumSet.allOf(CondenserOutput.class)),
POWER_UNITS(EnumSet.allOf(PowerUnits.class)),
POWER_UNITS(EnumSet.of(PowerUnits.AE, PowerUnits.TR)),
ACCESS(EnumSet.of(AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE)),
@@ -25,12 +25,8 @@ package appeng.api.config;
public enum TunnelType {
ME, // Network Tunnel
IC2_POWER, // EU Tunnel
FE_POWER, // Forge Energy tunnel
REDSTONE, // Redstone Tunnel
FLUID, // Fluid Tunnel
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE // Computer Message Tunnel
}
+110 -18
View File
@@ -23,12 +23,24 @@
package appeng.api.config;
import java.util.HashMap;
import java.util.Map;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.minecraft.item.ItemStack;
import javax.annotation.Nullable;
import appeng.api.definitions.IItemDefinition;
import com.google.common.base.Preconditions;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
public enum Upgrades {
/**
@@ -42,7 +54,8 @@ public enum Upgrades {
FUZZY(1), SPEED(1), INVERTER(1);
private final int tier;
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
private final List<Supported> supported = new ArrayList<>();
private List<Text> supportedTooltipLines;
Upgrades(final int tier) {
this.tier = tier;
@@ -52,8 +65,12 @@ public enum Upgrades {
* @return list of Items/Blocks that support this upgrade, and how many it
* supports.
*/
public Map<ItemStack, Integer> getSupported() {
return this.supportedMax;
public List<Supported> getSupported() {
return this.supported;
}
public void registerItem(final ItemConvertible item, final int maxSupported) {
this.registerItem(item, maxSupported, null);
}
/**
@@ -61,24 +78,99 @@ public enum Upgrades {
*
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
* @param tooltipGroup If more than one item of the same group are supported,
* the tooltip will show this translation key instead. If
* the items have different maxSupported values, the highest
* will be shown.
*/
public void registerItem(final IItemDefinition item, final int maxSupported) {
item.maybeStack(1).ifPresent(is -> this.registerItem(is, maxSupported));
public void registerItem(final ItemConvertible item, final int maxSupported, @Nullable String tooltipGroup) {
Preconditions.checkNotNull(item);
this.supported.add(new Supported(item.asItem(), maxSupported, tooltipGroup));
supportedTooltipLines = null; // Reset tooltip
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param stack machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem(final ItemStack stack, final int maxSupported) {
if (stack != null) {
this.supportedMax.put(stack, maxSupported);
@Environment(EnvType.CLIENT)
public List<Text> getTooltipLines() {
if (supportedTooltipLines == null) {
supported.sort(Comparator.comparingInt(o -> o.maxCount));
supportedTooltipLines = new ArrayList<>(supported.size());
// Use a separate set because the final text will include numbers
Set<Text> namesAdded = new HashSet<>();
for (int i = 0; i < supported.size(); i++) {
Supported supported = this.supported.get(i);
Text name = supported.item.getName();
// If the group was already added by a previous item, skip this
if (supported.getTooltipGroup() != null && namesAdded.contains(supported.getTooltipGroup())) {
continue;
}
// If any of the following items would be of the same group, use the group name
// instead
if (supported.getTooltipGroup() != null) {
for (int j = i + 1; j < this.supported.size(); j++) {
Text otherGroup = this.supported.get(j).getTooltipGroup();
if (supported.getTooltipGroup().equals(otherGroup)) {
name = supported.getTooltipGroup();
break;
}
}
}
if (namesAdded.add(name)) {
// append the supported count only if its > 1
if (supported.maxCount > 1) {
name = name.copy().append(" (" + supported.maxCount + ")");
}
supportedTooltipLines.add(name);
}
}
}
return supportedTooltipLines;
}
public int getTier() {
return this.tier;
}
public static class Supported {
private final Item item;
private final Block block;
private final int maxCount;
// Translation key of the tooltip group
@Nullable
private final String tooltipGroup;
public Supported(Item item, int maxCount, @Nullable String tooltipGroup) {
this.item = item;
if (item instanceof BlockItem) {
this.block = ((BlockItem) item).getBlock();
} else {
this.block = null;
}
this.maxCount = maxCount;
this.tooltipGroup = tooltipGroup;
}
public int getMaxCount() {
return maxCount;
}
public boolean isSupported(Block block) {
return block != null && this.block == block;
}
public boolean isSupported(Item item) {
return item != null && this.item == item;
}
public Text getTooltipGroup() {
return this.tooltipGroup != null ? new TranslatableText(this.tooltipGroup) : null;
}
}
}
@@ -0,0 +1,112 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 TeamAppliedEnergistics
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.crafting;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.CraftingRecipe;
import net.minecraft.world.World;
import appeng.api.networking.crafting.ICraftingPatternDetails;
import appeng.api.storage.data.IAEItemStack;
public interface ICraftingHelper {
/**
* Checks that the given item stack is an encoded pattern.
*/
boolean isEncodedPattern(@Nullable IAEItemStack item);
/**
* Checks that the given item stack is an encoded pattern.
*/
boolean isEncodedPattern(ItemStack item);
/**
* Encodes a processing pattern which represents the ability to convert the
* given inputs into the given outputs using some process external to the ME
* system.
*
* @param stack If null, a new item will be created to hold the encoded pattern.
* Otherwise the given item must already contains an encoded
* pattern that will be overwritten.
* @return A new encoded pattern, or the given stack with the pattern encoded in
* it.
* @throws IllegalArgumentException If either in or out contain only empty
* ItemStacks.
*/
ItemStack encodeProcessingPattern(@Nullable ItemStack stack, ItemStack[] in, ItemStack[] out);
/**
* Encodes a crafting pattern which represents a Vanilla crafting recipe.
*
* @param stack If null, a new item will be created to hold the
* encoded pattern. Otherwise the given item must
* already contains an encoded pattern that will be
* overwritten.
* @param recipe The Vanilla crafting recipe to be encoded.
* @param in The items in the crafting grid, which are used to
* determine what items are supplied from the ME system
* to craft using this pattern.
* @param out What is to be expected as the result of this crafting
* operation by the ME system.
* @param allowSubstitutes Controls whether the ME system will allow the use of
* equivalent items to craft this recipe.
* @throws IllegalArgumentException If either in or out contain only empty
* ItemStacks.
*/
ItemStack encodeCraftingPattern(@Nullable ItemStack stack, CraftingRecipe recipe, ItemStack[] in, ItemStack out,
boolean allowSubstitutes);
/**
* Same as {@link #decodePattern(ItemStack, World, boolean)} with no auto
* recovery of changed recipe ids.
*/
@Nullable
default ICraftingPatternDetails decodePattern(@Nonnull ItemStack itemStack, @Nonnull World world) {
return decodePattern(itemStack, world, false);
}
/**
* Decodes an encoded crafting pattern and returns the pattern details.
* <p>
* The item backing the {@link ItemStack} needs to be an item returned by the
* encode methods of this class.
*
* @param itemStack pattern
* @param world world used to access the
* {@link net.minecraft.recipe.RecipeManager}.
* @param autoRecovery If true, the method will try to recover from changed
* recipe ids by searching the entire recipe manager for a
* recipe matching the inputs. If this is successful, the
* given item stack will be changed to reflect the new
* recipe id.
* @return The pattern details if the pattern could be decoded. Otherwise null.
*/
@Nullable
ICraftingPatternDetails decodePattern(@Nonnull ItemStack itemStack, @Nonnull World world, boolean autoRecovery);
}
@@ -23,7 +23,7 @@ import java.util.Optional;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
public interface IBlockDefinition extends IItemDefinition {
/**
@@ -49,8 +49,7 @@ public interface IBlockDefinition extends IItemDefinition {
*
* @param world world of block
* @param pos location
*
* @return if the block is placed in the world at the specific location.
*/
boolean isSameAs(IBlockReader world, BlockPos pos);
boolean isSameAs(BlockView world, BlockPos pos);
}
@@ -32,7 +32,6 @@ public interface IComparableDefinition {
* Compare {@link ItemStack} with this
*
* @param comparableStack compared item
*
* @return true if the item stack is a matching item.
*/
boolean isSameAs(ItemStack comparableStack);
@@ -29,11 +29,12 @@ import java.util.Set;
import javax.annotation.Nonnull;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.ItemStack;
import appeng.api.features.AEFeature;
public interface IItemDefinition extends IComparableDefinition {
public interface IItemDefinition extends IComparableDefinition, ItemConvertible {
/**
* @return the unique name of the definition which will be used to register the
* underlying structure. Will never be null
@@ -63,4 +64,10 @@ public interface IItemDefinition extends IComparableDefinition {
* @return an immutable set of the features of this item
*/
Set<AEFeature> features();
@Override
default Item asItem() {
return item();
}
}
@@ -71,10 +71,6 @@ public interface IParts {
IItemDefinition p2PTunnelFluids();
IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelFE();
IItemDefinition p2PTunnelLight();
IItemDefinition cableAnchor();
@@ -20,11 +20,11 @@ package appeng.api.definitions;
import java.util.Optional;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
public interface ITileDefinition extends IBlockDefinition {
/**
* @return the {@link TileEntity} Class if applicable.
* @return the {@link BlockEntity} Class if applicable.
*/
Optional<? extends Class<? extends TileEntity>> maybeEntity();
Optional<? extends Class<? extends BlockEntity>> maybeEntity();
}
@@ -1,6 +1,6 @@
package appeng.api.definitions;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
// Private helper class to create AE2 resource locations
final class IdHelper {
@@ -11,8 +11,8 @@ final class IdHelper {
/**
* Creates a ResourceLocation namespaced to AE2.
*/
static ResourceLocation id(String id) {
return new ResourceLocation("appliedenergistics2", id);
static Identifier id(String id) {
return new Identifier("appliedenergistics2", id);
}
}
@@ -23,26 +23,28 @@
package appeng.api.events;
import net.minecraftforge.eventbus.api.Event;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import appeng.api.features.ILocatable;
/**
* Input Event:
*
* <p>
* Used to Notify the Location Registry of objects, and their availability.
*/
public class LocatableEventAnnounce extends Event {
public interface LocatableEventAnnounce {
public final ILocatable target;
public final LocatableEvent change;
Event<LocatableEventAnnounce> EVENT = EventFactory.createArrayBacked(LocatableEventAnnounce.class,
listeners -> (ILocatable target, LocatableEvent change) -> {
for (LocatableEventAnnounce listener : listeners) {
listener.onLocatableAnnounce(target, change);
}
});
public LocatableEventAnnounce(final ILocatable o, final LocatableEvent ev) {
this.target = o;
this.change = ev;
}
void onLocatableAnnounce(final ILocatable target, final LocatableEvent change);
public enum LocatableEvent {
enum LocatableEvent {
/**
* Adds the locatable to the registry
*/
@@ -0,0 +1,8 @@
package appeng.api.events;
@FunctionalInterface
public interface LocatableEventCallback {
void onLocatable(LocatableEventAnnounce.LocatableEvent evt);
}
@@ -28,7 +28,7 @@ import appeng.api.networking.IGridNode;
/**
* Exception occurred because of an already existing connection between the two
* {@link IGridNode}s
*
* <p>
* Intended to signal an internal exception and not intended to be thrown by any
* 3rd party module.
*
@@ -27,10 +27,10 @@ import appeng.api.networking.IGridNode;
/**
* Exception indicating a failed connection between two {@link IGridNode}s.
*
* <p>
* Intended to signal an internal exception and not intended to be thrown by any
* 3rd party module.
*
* <p>
* See any subclass for a more specific reason.
*
* @author AlgorithmX2
@@ -25,7 +25,7 @@ package appeng.api.exceptions;
/**
* Exception due to trying to connect one or more null values.
*
* <p>
* Intended to signal an internal exception and not intended to be thrown by any
* 3rd party module.
*
@@ -25,7 +25,7 @@ package appeng.api.exceptions;
/**
* Exception due to trying to connect different security realms.
*
* <p>
* Intended to signal an internal exception and not intended to be thrown by any
* 3rd party module.
*
@@ -33,12 +33,12 @@ import appeng.api.implementations.items.IAEItemPowerStorage;
/**
* A registry to allow mapping {@link Item}s to a specific charge rate when
* being placed inside a charger.
*
* <p>
* The registry is used in favor of an additional method for
* {@link IAEItemPowerStorage} with a fixed value per item. This allows more
* flexibility for other charger like machines to choose their own values when
* needed.
*
* <p>
* There is no guarantee that this is charged per tick, it only represents the
* value per operation. By default this is one charging operation every 10 ticks
* in case of an AE2 charger.
@@ -51,7 +51,7 @@ public interface IChargerRegistry {
/**
* Fetch a charge rate for a specific item.
*
* <p>
* The specific item does not need to have a mapping registered at all. In this
* case it will use a default value of 160 AE.
*
@@ -63,7 +63,7 @@ public interface IChargerRegistry {
/**
* Register a custom charge rate for a specific item.
*
* <p>
* Capped at 16000 to avoid extracting too much energy from a network for each
* operation. This is done silently without any feedback or exception. Further
* the cap is not fixed, it can change at any time in the future should power
@@ -76,7 +76,7 @@ public interface IChargerRegistry {
/**
* Remove the custom rate for a specific item.
*
* <p>
* It will revert to the default value afterwards.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
@@ -37,7 +37,6 @@ public interface IItemComparisonProvider {
* supplied item.
*
* @param is item
*
* @return IItemComparison, or null
*/
IItemComparison getComparison(ItemStack is);
@@ -47,7 +46,6 @@ public interface IItemComparisonProvider {
* function. )
*
* @param stack item
*
* @return true, if getComparison will return a valid IItemComparison Object
*/
boolean canHandle(ItemStack stack);
@@ -32,7 +32,6 @@ public interface ILocatableRegistry {
* Gets the {@link ILocatable} with the registered serial, if available
*
* @param serial serial
*
* @return requestedObject, or null, if the object does not exist anymore
*/
ILocatable getLocatableBy(long serial);
@@ -25,7 +25,7 @@ package appeng.api.features;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
public interface IMatterCannonAmmoRegistry {
@@ -45,13 +45,12 @@ public interface IMatterCannonAmmoRegistry {
* @param ammoTag item tag id
* @param weight atomic weight
*/
void registerAmmoTag(ResourceLocation ammoTag, double weight);
void registerAmmoTag(Identifier ammoTag, double weight);
/**
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
*
* @param is ammo
*
* @return 0 or a valid penetration value.
*/
float getPenetration(ItemStack is);
@@ -31,7 +31,6 @@ public interface INetworkEncodable {
* Used to get the current key from the item.
*
* @param item item
*
* @return string key of item
*/
String getEncryptionKey(ItemStack item);
@@ -27,7 +27,8 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.capabilities.Capability;
import alexiil.mc.lib.attributes.Attribute;
import appeng.api.config.TunnelType;
@@ -48,13 +49,12 @@ public interface IP2PTunnelRegistry {
void addNewAttunement(@Nonnull String ModId, @Nullable TunnelType type);
void addNewAttunement(@Nonnull Capability<?> cap, @Nullable TunnelType type);
void addNewAttunement(@Nonnull Attribute<?> attr, @Nullable TunnelType type);
/**
* returns null if no attunement can be found.
*
* @param trigger attunement trigger
*
* @return null if no attunement can be found or attunement
*/
@Nonnull
@@ -38,21 +38,18 @@ public interface IPlayerRegistry {
/**
* @param gameProfile user game profile
*
* @return user id of a username.
*/
int getID(GameProfile gameProfile);
/**
* @param player player
*
* @return user id of a player entity.
*/
int getID(PlayerEntity player);
/**
* @param playerID to be found player id
*
* @return PlayerEntity, or null if the player could not be found.
*/
@Nullable
@@ -23,7 +23,6 @@
package appeng.api.features;
import appeng.api.AEInjectable;
import appeng.api.movable.IMovableRegistry;
import appeng.api.networking.IGridCacheRegistry;
import appeng.api.parts.IPartModels;
@@ -36,7 +35,6 @@ import appeng.api.storage.ICellRegistry;
* @version 7
* @since rv0
*/
@AEInjectable
public interface IRegistryContainer {
/**
@@ -84,11 +82,6 @@ public interface IRegistryContainer {
*/
IPlayerRegistry players();
/**
* get access to the world-gen api.
*/
IWorldGen worldgen();
/**
* Register your IPart models before using them.
*/
@@ -35,7 +35,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
/**
* @param is wireless terminal
*
* @return true, if usePower, hasPower, etc... can be called for the provided
* item
*/
@@ -47,7 +46,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
* @param amount is in AE units ( 5 per MJ ), if you return false, the item
* should be dead and return false for hasPower
* @param is wireless terminal
*
* @return true if wireless terminal uses power
*/
boolean usePower(PlayerEntity player, double amount, ItemStack is);
@@ -56,7 +54,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
* gets the power status of the item.
*
* @param is wireless terminal
*
* @return returns true if there is any power left.
*/
boolean hasPower(PlayerEntity player, double amount, ItemStack is);
@@ -65,7 +62,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
* Return the config manager for the wireless terminal.
*
* @param is wireless terminal
*
* @return config manager of wireless terminal
*/
IConfigManager getConfigManager(ItemStack is);
@@ -26,7 +26,7 @@ package appeng.api.features;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.BlockView;
/**
* Registration record for a Custom Cell handler.
@@ -42,7 +42,6 @@ public interface IWirelessTermRegistry {
/**
* @param is item which might have a handler
*
* @return true if there is a handler for this item
*/
boolean isWirelessTerminal(ItemStack is);
@@ -58,5 +57,5 @@ public interface IWirelessTermRegistry {
* opens the wireless terminal gui, the wireless terminal item, must be in the
* active slot on the tool bar.
*/
void openWirelessTerminalGui(ItemStack item, IBlockReader world, PlayerEntity player, Hand hand);
void openWirelessTerminalGui(ItemStack item, BlockView world, PlayerEntity player, Hand hand);
}
@@ -1,43 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.features;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IWorld;
import net.minecraft.world.dimension.Dimension;
public interface IWorldGen {
void disableWorldGenForProviderID(WorldGenType type, Class<? extends Dimension> provider);
void enableWorldGenForDimension(WorldGenType type, ResourceLocation dimID);
void disableWorldGenForDimension(WorldGenType type, ResourceLocation dimID);
boolean isWorldGenEnabled(WorldGenType type, IWorld w);
enum WorldGenType {
CERTUS_QUARTZ, CHARGED_CERTUS_QUARTZ, METEORITES
}
}
@@ -23,7 +23,7 @@
package appeng.api.implementations;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
@@ -39,7 +39,7 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
/**
* the tile...
*
* @return tile entity
* @return block entity
*/
TileEntity getTile();
BlockEntity getTile();
}
@@ -1,38 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.implementations;
/**
* Defines the result of performing a transition from the world into a storage
* cell, if its possible, and what the energy usage is.
*/
public class TransitionResult {
public final boolean success;
public final double energyUsage;
public TransitionResult(final boolean success, final double power) {
this.success = success;
this.energyUsage = power;
}
}
@@ -35,7 +35,6 @@ import net.minecraft.world.World;
*/
public interface IGuiItem {
/**
*
* @param is The item used to open the container.
* @param playerInventorySlot The slot in the player's inventory the item is in.
* @param world The world the player is in.
@@ -23,7 +23,7 @@
package appeng.api.implementations.guiobjects;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.FixedItemInv;
import appeng.api.networking.IGridHost;
@@ -33,5 +33,5 @@ import appeng.api.networking.IGridHost;
public interface INetworkTool extends IGuiItemObject {
IGridHost getGridHost(); // null for most purposes.
IItemHandler getInventory();
FixedItemInv getInventory();
}
@@ -46,7 +46,6 @@ public interface IAEItemPowerStorage {
* return it.
*
* @param amount to be extracted power from device
*
* @return what it could extract
*/
double extractAEPower(ItemStack stack, double amount, Actionable mode);
@@ -38,7 +38,6 @@ public interface IAEWrench {
*
* @param player wrenching player
* @param pos of block.
*
* @return true if wrench can be used
*/
boolean canWrench(ItemStack wrench, PlayerEntity player, BlockPos pos);
@@ -48,7 +48,6 @@ public interface IBiometricCard {
/**
* @param itemStack card
*
* @return the full list of permissions encoded on the card.
*/
EnumSet<SecurityPermissions> getPermissions(ItemStack itemStack);
@@ -57,7 +56,6 @@ public interface IBiometricCard {
* Check if a permission is encoded on the card.
*
* @param permission card
*
* @return true if this permission is set on the card.
*/
boolean hasPermission(ItemStack is, SecurityPermissions permission);
@@ -23,13 +23,23 @@
package appeng.api.implementations.items;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import javax.annotation.Nullable;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IGrowableCrystal {
ItemStack triggerGrowth(ItemStack is);
float getMultiplier(Block blk, Material mat);
/**
* Gets the crystal growth multiplier based on the material it is submerged in.
*
* @param state The blockstate of the block the crystal is currently in.
* @return The multiplier for the growth tick progress. Zero if the crystal
* cannot grow in the current material.
*/
float getMultiplier(BlockState state, @Nullable World world, @Nullable BlockPos pos);
}
@@ -1,43 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.implementations.items;
import java.util.Set;
import net.minecraft.item.ItemStack;
/**
* Lets you specify the name of the group of items this falls under.
*/
public interface IItemGroup {
/**
* returning null, is the same as not implementing the interface at all.
*
* @param is item
*
* @return an unlocalized string to use for the items group name.
*/
String getUnlocalizedGroupName(Set<ItemStack> otherItems, ItemStack is);
}
@@ -25,13 +25,13 @@ package appeng.api.implementations.items;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
import appeng.api.util.AEColor;
/**
* Memory Card API
*
* <p>
* AE's Memory Card Item Class implements this interface.
*/
public interface IMemoryCard {
@@ -39,21 +39,21 @@ public interface IMemoryCard {
/**
* Configures the data stored on the memory card, the SettingsName, will be
* localized when displayed.
*
* <p>
* The data can contain an optional string with the key "tooltip", which will be
* used as unlocalized string to display it after the settings name.
*
* <p>
* The data can contain an optional intArray using "colorCode" to be displayed
* on the model itself. It needs to have exactly 8 elements representing the
* ordinal of the matching {@link AEColor}. The first 4 values represent the top
* row, left to right. The second 4 the bottom row.
*
* @param is item
* @param settingsName unlocalized string that represents the tile entity.
* @param settingsName unlocalized string that represents the block entity.
* @param data the NBT tag, refer to the normal comment for special
* keys.
*/
void setMemoryCardContents(ItemStack is, String settingsName, CompoundNBT data);
void setMemoryCardContents(ItemStack is, String settingsName, CompoundTag data);
/**
* returns the settings name provided by a previous call to
@@ -61,27 +61,24 @@ public interface IMemoryCard {
* call to setMemoryCardContents.
*
* @param is item
*
* @return setting name
*/
String getSettingsName(ItemStack is);
/**
* @param is item
*
* @return the NBT Data previously saved by setMemoryCardContents, or an empty
* NBTCompound
*/
CompoundNBT getData(ItemStack is);
CompoundTag getData(ItemStack is);
/**
* This represent as 4x2 grid of {@link AEColor} without transparent/fluix
* color.
*
* <p>
* First 4 colors are used for the top row, second for the bottom one.
*
* @param is item
*
* @return a hash representation of the memory card content
*/
AEColor[] getColorCode(ItemStack is);
@@ -25,10 +25,8 @@ package appeng.api.implementations.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.server.world.ServerWorld;
import appeng.api.implementations.TransitionResult;
import appeng.api.util.WorldCoord;
/**
@@ -38,26 +36,23 @@ public interface ISpatialStorageCell {
/**
* @param is spatial storage cell
*
* @return true if this item is a spatial storage cell
*/
boolean isSpatialStorage(ItemStack is);
/**
* @param is spatial storage cell
*
* @return the maximum size of the spatial storage cell along any given axis
*/
int getMaxStoredDim(ItemStack is);
/**
* get the currently stored Dimension id.
* get the currently stored spatial storage plot id.
*
* @param is spatial storage cell
*
* @return dimension id or -1
* @return plot id or -1
*/
DimensionType getStoredDimension(ItemStack is);
int getAllocatedPlotId(ItemStack is);
/**
* Perform a spatial swap with the contents of the cell, and the world.
@@ -67,8 +62,7 @@ public interface ISpatialStorageCell {
* @param min min coord
* @param max max coord
* @param playerId owner of current grid or -1
*
* @return result of transition
* @return success of transition
*/
TransitionResult doSpatialTransition(ItemStack is, World w, WorldCoord min, WorldCoord max, int playerId);
boolean doSpatialTransition(ItemStack is, ServerWorld w, WorldCoord min, WorldCoord max, int playerId);
}
@@ -28,18 +28,25 @@ import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.cells.ICellHandler;
import appeng.api.storage.cells.ICellInventory;
import appeng.api.storage.cells.ICellWorkbenchItem;
import appeng.api.storage.data.IAEStack;
/**
* Any item which implements this can be treated as an IMEInventory via
* Util.getCell / Util.isCell It automatically handles the internals and NBT
* data, which is both nice, and bad for you!
*
* {@link ICellHandler#getCellInventory(ItemStack, appeng.api.storage.cells.ISaveProvider, IStorageChannel)}
* or {@link ICellHandler#isCell(ItemStack)}. It automatically handles the
* internals and NBT data, which is both nice, and bad for you!
* <p>
* Good cause it means you don't have to do anything, bad because you have
* little to no control over it.
*
* The standard AE implementation only provides 1-63 Types
* <p>
* Limited to {@link Integer} internally for most calculations. E.g. if the used
* or remaining bytes would overflow {@link Integer#MAX_VALUE} the behaviour is
* no longer specified. Even if {@link ICellInventory} is using {@link Long}.
* <p>
* The standard AE implementation also only provides 1-63 Types.
*/
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem {
@@ -48,7 +55,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
* ({@link Integer#MAX_VALUE} + 1) / 8.
*
* @param cellItem item
*
* @return number of bytes
*/
int getBytes(@Nonnull ItemStack cellItem);
@@ -57,7 +63,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
* Determines the number of bytes used for any type included on the cell.
*
* @param cellItem item
*
* @return number of bytes
*/
int getBytesPerType(@Nonnull ItemStack cellItem);
@@ -67,7 +72,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
* item.
*
* @param cellItem item
*
* @return number of types
*/
int getTotalTypes(@Nonnull ItemStack cellItem);
@@ -79,7 +83,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @param cellItem item
* @param requestedAddition requested addition
*
* @return true to preventAdditionOfItem
*/
boolean isBlackListed(@Nonnull ItemStack cellItem, @Nonnull T requestedAddition);
@@ -99,7 +102,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
* Allows an item to selectively enable or disable its status as a storage cell.
*
* @param i item
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell(@Nonnull ItemStack i);
@@ -37,7 +37,6 @@ public interface IStorageComponent {
* condenser.
*
* @param is item
*
* @return number of bytes
*/
int getBytes(ItemStack is);
@@ -46,7 +45,6 @@ public interface IStorageComponent {
* Just true or false for the item stack.
*
* @param is item
*
* @return true if item is a storage component
*/
boolean isStorageComponent(ItemStack is);
@@ -31,7 +31,6 @@ public interface IUpgradeModule {
/**
* @param itemstack item with potential upgrades
*
* @return null, or a valid upgrade type.
*/
Upgrades getType(ItemStack itemstack);
@@ -26,7 +26,7 @@ package appeng.api.implementations.parts;
import java.util.EnumSet;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.api.networking.IGridHost;
import appeng.api.parts.BusSupport;
@@ -62,14 +62,13 @@ public interface ICablePart extends IPart, IGridHost {
* something.
*
* @param newColor new color
*
* @return if the color change was successful.
*/
boolean changeColor(AEColor newColor, PlayerEntity who);
/**
* Change sides on the cables node.
*
* <p>
* Called by AE, do not invoke.
*
* @param sides sides of cable
@@ -80,7 +79,6 @@ public interface ICablePart extends IPart, IGridHost {
* used to tests if a cable connects to neighbors visually.
*
* @param side neighbor side
*
* @return true if this side is currently connects to an external block.
*/
boolean isConnected(Direction side);
@@ -41,7 +41,6 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable {
/**
* @param slot slot index
*
* @return status of the slot, one of the above indices.
*/
CellState getCellStatus(int slot);
@@ -54,7 +53,6 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable {
/**
* @param slot slot index
*
* @return is the cell currently blinking to show activity.
*/
boolean isCellBlinking(int slot);
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.api.util.AEColor;
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.api.networking.crafting.ICraftingPatternDetails;
@@ -36,7 +36,6 @@ public interface ICraftingMachine {
* @param patternDetails details of pattern
* @param table crafting table
* @param ejectionDirection ejection direction
*
* @return if it was accepted, all or nothing.
*/
boolean pushPattern(ICraftingPatternDetails patternDetails, CraftingInventory table, Direction ejectionDirection);
@@ -23,17 +23,17 @@
package appeng.api.implementations.tiles;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
/**
* Crank/Crankable API,
*
* <p>
* Tiles that Implement this can receive power, from the crank, and have the
* crank placed on them.
*
* <p>
* Tiles that access other tiles that implement this method can act as Cranks.
*
* This interface must be implemented by a tile entity.
* <p>
* This interface must be implemented by a block entity.
*/
public interface ICrankable {
@@ -23,7 +23,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.FixedItemInv;
public interface ISegmentedInventory {
@@ -33,8 +33,7 @@ public interface ISegmentedInventory {
* duplication.
*
* @param name inventory name
*
* @return inventory with inventory name
*/
IItemHandler getInventoryByName(String name);
FixedItemInv getInventoryByName(String name);
}
@@ -23,7 +23,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.FixedItemInv;
public interface IViewCellStorage {
@@ -32,5 +32,5 @@ public interface IViewCellStorage {
*
* @return inventory with at least 5 slot
*/
IItemHandler getViewCellStorage();
FixedItemInv getViewCellStorage();
}
@@ -23,7 +23,7 @@
package appeng.api.movable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -33,28 +33,27 @@ public interface IMovableHandler {
* if you return true from this, your saying you can handle the class, not that
* single entity, you cannot opt out of single entities.
*
* @param myClass tile entity class
* @param tile tile entity
*
* @param myClass block entity class
* @param tile block entity
* @return true if it can handle moving
*/
boolean canHandle(Class<? extends TileEntity> myClass, TileEntity tile);
boolean canHandle(Class<? extends BlockEntity> myClass, BlockEntity tile);
/**
* request that the handler move the the tile from its current location to the
* new one. the tile has already been invalidated, and the blocks have already
* been fully moved.
*
* <p>
* Potential Example:
*
* <pre>
* {
* &#064;code
* Chunk c = world.getChunkAt(x, z);
* Chunk c = world.getChunk(x, z);
* c.setChunkBlockTileEntity(x &amp; 0xF, y + y, z &amp; 0xF, tile);
*
* if (c.isChunkLoaded) {
* world.addTileEntity(tile);
* world.addBlockEntity(tile);
* world.markBlockForUpdate(x, y, z);
* }
* }
@@ -64,5 +63,5 @@ public interface IMovableHandler {
* @param world world of tile
* @param newPosition the new location
*/
void moveTile(TileEntity tile, World world, BlockPos newPosition);
void moveTile(BlockEntity tile, World world, BlockPos newPosition);
}
@@ -24,37 +24,37 @@
package appeng.api.movable;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
/**
* Used to determine if a tile is marked as movable, a block will be considered
* movable, if...
*
* <p>
* 1. The Tile or its super classes have been white listed with
* whiteListTileEntity.
*
* <p>
* 2. The Tile implements IMovableTile
*
* <p>
* 3. A IMovableHandler is register that returns canHandle = true for the
* {@link TileEntity} subclass
*
*
* {@link BlockEntity} subclass
* <p>
* <p>
* The movement process is as follows,
*
* <p>
* 1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your
* opt-in method. 2. The tile will be removed from the world. 3. Its world,
* coordinates will be changed. *** this can be overridden with a
* IMovableHandler *** 4. It will then be re-added to the world, or a new world.
* 5. TileEntity.validate() 6. IMovableTile.doneMoving ( if you implemented
* 5. TileEntity.cancelRemoval() 6. IMovableTile.doneMoving ( if you implemented
* IMovableTile )
*
* <p>
* Please note, this is a 100% white list only feature, I will never opt in any
* non-vanilla, non-AE blocks. If you do not want to support your tiles being
* moved, you don't have to do anything.
*
* <p>
* I appreciate anyone that takes the effort to get their tiles to work with
* this system to create a better use experience.
*
* <p>
* If you need a build of deobf build of AE for testing, do not hesitate to ask.
*/
public interface IMovableRegistry {
@@ -67,26 +67,25 @@ public interface IMovableRegistry {
void blacklistBlock(Block blk);
/**
* White list your tile entity with the registry.
*
* White list your block entity with the registry.
* <p>
* If you tile is handled with IMovableHandler or IMovableTile you do not need
* to white list it.
*/
void whiteListTileEntity(Class<? extends TileEntity> c);
void whiteListBlockEntity(Class<? extends BlockEntity> c);
/**
* @param te to be moved tile entity
*
* @param te to be moved block entity
* @return true if the tile has accepted your request to move it
*/
boolean askToMove(TileEntity te);
boolean askToMove(BlockEntity te);
/**
* tells the tile you are done moving it.
*
* @param te moved tile entity
* @param te moved block entity
*/
void doneMoving(TileEntity te);
void doneMoving(BlockEntity te);
/**
* add a new handler movable handler.
@@ -98,14 +97,13 @@ public interface IMovableRegistry {
/**
* handlers are used to perform movement, this allows you to override AE's
* internal version.
*
* <p>
* only valid after askToMove(...) = true
*
* @param te tile entity
*
* @return moving handler of tile entity
* @param te block entity
* @return moving handler of block entity
*/
IMovableHandler getHandler(TileEntity te);
IMovableHandler getHandler(BlockEntity te);
/**
* @return a copy of the default handler
@@ -114,7 +112,6 @@ public interface IMovableRegistry {
/**
* @param blk block
*
* @return true if this block is blacklisted
*/
boolean isBlacklisted(Block blk);
@@ -28,4 +28,9 @@ public enum GridNotification {
* the visible connections for this node have changed, useful for cable.
*/
CONNECTIONS_CHANGED,
/**
* the owner of the grid node has changed, and the node needs to be re-saved
*/
OWNER_CHANGED
}
@@ -30,7 +30,7 @@ import appeng.api.util.IReadOnlyCollection;
/**
* Gives you access to Grid based information.
*
* <p>
* Don't Implement.
*/
public interface IGrid {
@@ -39,7 +39,6 @@ public interface IGrid {
* Get Access to various grid modules
*
* @param iface face
*
* @return the IGridCache you requested.
*/
@Nonnull
@@ -49,7 +48,6 @@ public interface IGrid {
* Post an event into the network event bus.
*
* @param ev - event to post
*
* @return returns ev back to original poster
*/
@Nonnull
@@ -59,7 +57,6 @@ public interface IGrid {
* Post an event into the network event bus, but direct it at a single node.
*
* @param ev event to post
*
* @return returns ev back to original poster
*/
@Nonnull
@@ -79,7 +76,6 @@ public interface IGrid {
* Get machines on the network.
*
* @param gridHostClass class of the grid host
*
* @return IMachineSet of all nodes belonging to hosts of specified class.
*/
@Nonnull
@@ -29,7 +29,7 @@ import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Direction;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
@@ -37,14 +37,14 @@ import appeng.api.util.DimensionalCoord;
/**
* An Implementation is required to create your node for IGridHost
*
* <p>
* Implement for use with IGridHost
*/
public interface IGridBlock {
/**
* how much power to drain per tick as part of idle network usage.
*
* <p>
* if the value of this changes, you must post a MENetworkPowerIdleChange
*
* @return ae/t to use.
@@ -87,20 +87,11 @@ public interface IGridBlock {
AEColor getGridColor();
/**
* Notifies your IGridBlock that changes were made to your connections
* Called by the {@link IGridNode} to notify its {@link IGridBlock} about
* events.
*/
void onGridNotification(@Nonnull GridNotification notification);
/**
* Update Blocks network/connection/booting status. grid,
*
* @param grid grid
* @param channelsInUse used channels
* @deprecated to be removed in rv7
*/
@Deprecated
void setNetworkStatus(IGrid grid, int channelsInUse);
/**
* Determine which sides of the block can be connected too, only used when
* isWorldAccessible returns true, not used for {@link IPart} implementations.
@@ -26,9 +26,9 @@ package appeng.api.networking;
import javax.annotation.Nonnull;
/**
* Allows you to create a network wise service, AE2 uses these for providing
* Allows you to create a network wide service, AE2 uses these for providing
* item, spatial, and tunnel services.
*
* <p>
* Any Class that implements this, should have a public default constructor that
* takes a single argument of type IGrid.
*/
@@ -42,7 +42,7 @@ public interface IGridCache {
/**
* inform your cache, that a machine was removed from the grid.
*
* <p>
* Important: Do not trust the grids state in this method, interact only with
* the node you are passed, if you need to manage other grid information, do it
* on the next updateTick.
@@ -54,7 +54,7 @@ public interface IGridCache {
/**
* informs you cache that a machine was added to the grid.
*
* <p>
* Important: Do not trust the grids state in this method, interact only with
* the node you are passed, if you need to manage other grid information, do it
* on the next updateTick.
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -21,20 +21,23 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.recipes;
import java.io.BufferedReader;
package appeng.api.networking;
import javax.annotation.Nonnull;
@Deprecated
public interface IRecipeLoader {
/**
* A factory for grid cache implementations.
*/
@FunctionalInterface
public interface IGridCacheFactory<T extends IGridCache> {
/**
* @param filePath the path to the to be loaded file
* Creates a grid cache for the given grid.
*
* @return reader handler of the file
*
* @throws Exception if reading goes wrong
* @param grid The grid for which the cache should be created.
* @return A new grid cache instance.
*/
BufferedReader getFile(@Nonnull String filePath) throws Exception;
@Nonnull
T createCache(IGrid grid);
}
@@ -36,16 +36,15 @@ public interface IGridCacheRegistry {
* Register a new grid cache for use during operation, must be called during the
* loading phase.
*
* @param iface grid cache class
* @param iface grid cache class
* @param factory Factory for creating a new instance for each constructed grid
*/
void registerGridCache(@Nonnull Class<? extends IGridCache> iface,
@Nonnull Class<? extends IGridCache> implementation);
<T extends IGridCache> void registerGridCache(@Nonnull Class<T> iface, @Nonnull IGridCacheFactory<T> factory);
/**
* requests a new INSTANCE of a grid cache for use, used internally
*
* @param grid grid
*
* @return a new Map of IGridCaches from the registry, called from IGrid when
* constructing a new grid.
*/
@@ -29,10 +29,10 @@ import appeng.api.util.AEPartLocation;
/**
* Access to AE's internal grid connections.
*
* <p>
* Messing with connection is generally completely unnecessary, you should be
* able to just use IGridNode.updateState() to have AE manage them for you.
*
* <p>
* Don't Implement.
*/
public interface IGridConnection {
@@ -41,7 +41,6 @@ public interface IGridConnection {
* lets you get the opposing node of the connection by passing your own node.
*
* @param gridNode current grid node
*
* @return the IGridNode which represents the opposite side of the connection.
*/
@Nonnull
@@ -51,7 +50,6 @@ public interface IGridConnection {
* determine the direction of the connection based on your node.
*
* @param gridNode current grid node
*
* @return the direction of the connection, only valid for in world connections.
*/
@Nonnull
@@ -39,12 +39,11 @@ public interface IGridHelper {
/**
* Create a grid node for your {@link IGridHost}
*
* <p>
* The passed {@link IGridBlock} represents the definition for properties like
* connectable sides. Refer to its documentation for further details.
*
* @param block grid block
*
* @return grid node of block
*/
@Nonnull
@@ -52,13 +51,12 @@ public interface IGridHelper {
/**
* Create a direct connection between two {@link IGridNode}.
*
* <p>
* This will be considered as having a distance of 1, regardless of the location
* of both nodes.
*
* @param a to be connected gridnode
* @param b to be connected gridnode
*
* @throws appeng.api.exceptions.FailedConnectionException
*/
@Nonnull
@@ -26,15 +26,15 @@ package appeng.api.networking;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import appeng.api.parts.IPart;
import appeng.api.util.AECableType;
import appeng.api.util.AEPartLocation;
/**
* Implement to create a networked {@link TileEntity} or {@link IPart} must be
* implemented for a part, or tile entity to become part of a grid.
* Implement to create a networked {@link BlockEntity} or {@link IPart} must be
* implemented for a part, or block entity to become part of a grid.
*/
public interface IGridHost {
@@ -45,7 +45,6 @@ public interface IGridHost {
*
* @param dir feel free to ignore this, most blocks will use the same node for
* every side.
*
* @return a new IGridNode, create these with AEApi.INSTANCE().createGridNode(
* MyIGridBlock )
*/
@@ -27,8 +27,8 @@ import java.util.EnumSet;
import javax.annotation.Nonnull;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.world.IWorld;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.WorldAccess;
import appeng.api.IAppEngApi;
import appeng.api.util.AEPartLocation;
@@ -36,9 +36,9 @@ import appeng.api.util.IReadOnlyCollection;
/**
* Gives you a view into your Nodes connections and information.
*
* <p>
* updateState, getGrid, destroy are required to implement a proper IGridHost.
*
* <p>
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
*/
public interface IGridNode {
@@ -54,10 +54,10 @@ public interface IGridNode {
/**
* inform the node that your IGridBlock has changed its internal state, and
* force the node to update.
*
* ALWAYS make sure that your tile entity is in the world, and has its node
* <p>
* ALWAYS make sure that your block entity is in the world, and has its node
* properly saved to be returned from the host before updating state,
*
* <p>
* If your entity is not in the world, or if you IGridHost returns a different
* node for the same side you will likely crash the game.
*/
@@ -89,7 +89,7 @@ public interface IGridNode {
* @return the world the node is located in
*/
@Nonnull
IWorld getWorld();
WorldAccess getWorld();
/**
* @return a set of the connected sides, INTERNAL represents an invisible
@@ -124,13 +124,13 @@ public interface IGridNode {
* this should be called for each node you create, if you have a nodeData
* compound to load from, you can store all your nods on a single compound using
* name.
*
* <p>
* Important: You must call this before updateState.
*
* @param name nbt name
* @param nodeData to be loaded data
*/
void loadFromNBT(@Nonnull String name, @Nonnull CompoundNBT nodeData);
void loadFromNBT(@Nonnull String name, @Nonnull CompoundTag nodeData);
/**
* this should be called for each node you maintain, you can save all your nodes
@@ -140,7 +140,7 @@ public interface IGridNode {
* @param name nbt name
* @param nodeData to be saved data
*/
void saveToNBT(@Nonnull String name, @Nonnull CompoundNBT nodeData);
void saveToNBT(@Nonnull String name, @Nonnull CompoundTag nodeData);
/**
* @return if the node's channel requirements are currently met, use this for
@@ -152,7 +152,6 @@ public interface IGridNode {
* see if this node has a certain flag
*
* @param flag flags
*
* @return true if has flag
*/
boolean hasFlag(@Nonnull GridFlags flag);
@@ -25,15 +25,15 @@ package appeng.api.networking;
import javax.annotation.Nonnull;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
public interface IGridStorage {
/**
* @return an CompoundNBT that can be read, and written too.
* @return an CompoundTag that can be read, and written too.
*/
@Nonnull
CompoundNBT dataObject();
CompoundTag dataObject();
/**
* @return the id for this grid storage object, used internally
@@ -32,12 +32,11 @@ public interface IGridVisitor {
/**
* Called for each node on the network.
*
* <p>
* By returning false your informing the host to stop visiting nodes beyond the
* current node.
*
* @param n the current node.
*
* @return true to continue visiting nodes beyond this node.
*/
boolean visitNode(@Nonnull IGridNode n);
@@ -23,7 +23,7 @@
package appeng.api.networking.crafting;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.networking.security.IActionSource;
import appeng.api.networking.storage.IBaseMonitor;
@@ -54,5 +54,5 @@ public interface ICraftingCPU extends IBaseMonitor<IAEItemStack> {
/**
* @return a null or the name of the cpu.
*/
ITextComponent getName();
Text getName();
}
@@ -42,7 +42,6 @@ public interface ICraftingGrid extends IGridCache {
* @param world crafting world
* @param slot slot index
* @param details pattern details
*
* @return a collection of crafting patterns for the item in question.
*/
ImmutableCollection<ICraftingPatternDetails> getCraftingFor(IAEItemStack whatToCraft,
@@ -56,7 +55,6 @@ public interface ICraftingGrid extends IGridCache {
* @param actionSrc source
* @param craftWhat result
* @param callback callback -- optional
*
* @return a future which will at an undetermined point in the future get you
* the {@link ICraftingJob} do not wait on this, your be waiting
* forever.
@@ -79,7 +77,6 @@ public interface ICraftingGrid extends IGridCache {
* this will be used for extracting items, should
* usually be the same as the one provided to
* beginCraftingJob.
*
* @return null ( if failed ) or an {@link ICraftingLink} other wise, if you
* send requestingMachine you need to properly keep track of this and
* handle the nbt saving and loading of the object as well as the
@@ -96,7 +93,6 @@ public interface ICraftingGrid extends IGridCache {
/**
* @param what to be requested item
*
* @return true if the item can be requested via a crafting emitter.
*/
boolean canEmitFor(IAEItemStack what);
@@ -105,7 +101,6 @@ public interface ICraftingGrid extends IGridCache {
* is this item being crafted?
*
* @param what item being crafted
*
* @return true if it is being crafting
*/
boolean isRequesting(IAEItemStack what);
@@ -114,7 +109,6 @@ public interface ICraftingGrid extends IGridCache {
* The total amount being requested across all crafting cpus of a grid.
*
* @param what item being requested, ignores stacksize
*
* @return The total amount being requested.
*/
long requesting(IAEItemStack what);
@@ -23,7 +23,7 @@
package appeng.api.networking.crafting;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompoundTag;
public interface ICraftingLink {
@@ -53,7 +53,7 @@ public interface ICraftingLink {
*
* @param tag to be written data
*/
void writeToNBT(CompoundNBT tag);
void writeToNBT(CompoundTag tag);
/**
* @return the crafting ID for this link.
@@ -37,7 +37,6 @@ public interface ICraftingMedium {
*
* @param patternDetails details
* @param table crafting table
*
* @return if the pattern was successfully pushed.
*/
boolean pushPattern(ICraftingPatternDetails patternDetails, CraftingInventory table);
@@ -23,22 +23,25 @@
package appeng.api.networking.crafting;
import java.util.List;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.implementations.ICraftingPatternItem;
import appeng.api.storage.data.IAEItemStack;
/**
* do not implement provided by {@link ICraftingPatternItem}
*
* caching this INSTANCE will increase performance of validation and checks.
* Describes a crafting or processing pattern decoded by
* {@link appeng.api.crafting.ICraftingHelper}.
* <p>
* Do not cache instances of this class unless you handle recipe reloads on the
* server and client correctly.
*/
public interface ICraftingPatternDetails {
/**
* @return source item.
* @return encodes this crafting pattern into a new item stack.
*/
ItemStack getPattern();
@@ -46,35 +49,77 @@ public interface ICraftingPatternDetails {
* @param slotIndex specific slot index
* @param itemStack item in slot
* @param world crafting world
*
* @return if an item can be used in the specific slot for this pattern.
*/
boolean isValidItemForSlot(int slotIndex, ItemStack itemStack, World world);
/**
* @return if this pattern is a crafting pattern ( work bench )
* @return if this pattern is for a Vanilla
* {@link net.minecraft.item.crafting.IRecipeType#CRAFTING crafting
* recipe}.
*/
boolean isCraftable();
/**
* Equal itemstacks will be aggregated into one, respectively 3*64 will be
* returned as one stack of 192, up to 576 of a single type.
* <p>
* This should be the preferred way to deal with the list of inputs.
* <p>
* The list will be sorted in descending order by stack size. However there is
* no guarantee about maintaining the placement order of the inputs in case of
* equal values.
*
* @return an immutable list of inputs without nulls
*/
List<IAEItemStack> getInputs();
/**
* Equal itemstacks will be aggregated into one, respectively 2*32 will be
* returned as one stack of 64, up to 192 of a single type.
* <p>
* This should be the preferred way to deal with the list of outputs.
* <p>
* <p>
* The list will be sorted in descending order by stack size. However there is
* no guarantee about maintaining the placement order of the outputs in case of
* equal values.
*
* @return an immutable list of outputs without nulls
*/
List<IAEItemStack> getOutputs();
/**
* A sparse list representing the placement order of a crafting grid, left to
* right, then top to bottom.
* <p>
* Only use when absolutely necessary, always prefer
* {@link ICraftingPatternDetails#getInputs()}
* <p>
* This will contain exactly 9 entries.
* <p>
* This can return a copy from the internal structure, so there are no
* guarantees about modifications.
*
* @return a list of the inputs, will include nulls.
*/
IAEItemStack[] getInputs();
/**
* @return a list of the inputs, will be clean
*/
IAEItemStack[] getCondensedInputs();
/**
* @return a list of the outputs, will be clean
*/
IAEItemStack[] getCondensedOutputs();
IAEItemStack[] getSparseInputs();
/**
* A sparse list representing the placement order of the respective output
* slots.
* <p>
* Only use when absolutely necessary, always prefer
* {@link ICraftingPatternDetails#getOutputs()}
* <p>
* This will either contain 1 entry for crafting patterns or 3 for processing.
* <p>
* This can return a copy from the internal structure, so there are no
* guarantees about modifications.
*
* @return a list of the outputs, will include nulls.
*/
IAEItemStack[] getOutputs();
IAEItemStack[] getSparseOutputs();
/**
* @return if this pattern is enabled to support substitutions.
@@ -87,7 +132,6 @@ public interface ICraftingPatternDetails {
*
* @param craftingInv inventory
* @param world crafting world
*
* @return the crafted ( work bench ) item.
*/
ItemStack getOutput(CraftingInventory craftingInv, World world);
@@ -23,6 +23,7 @@
package appeng.api.networking.crafting;
import appeng.api.crafting.ICraftingHelper;
import appeng.api.storage.data.IAEItemStack;
/**
@@ -33,6 +34,9 @@ public interface ICraftingProviderHelper {
/**
* Add new Pattern to AE's crafting cache.
* <p>
* This will only accept instances created by
* {@link ICraftingHelper#decodePattern(net.minecraft.item.ItemStack, net.minecraft.world.World)}
*/
void addCraftingOption(ICraftingMedium medium, ICraftingPatternDetails api);
@@ -45,7 +45,6 @@ public interface ICraftingRequester extends IActionHost {
*
* @param items item
* @param mode action mode
*
* @return unwanted item
*/
IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode);
@@ -53,7 +52,7 @@ public interface ICraftingRequester extends IActionHost {
/**
* called when the job changes from in progress, to either complete, or
* canceled.
*
* <p>
* after this call the crafting link is "dead" and should be discarded.
*/
void jobStateChange(ICraftingLink link);
@@ -27,13 +27,13 @@ import appeng.api.storage.data.IAEStack;
/**
* DO NOT IMPLEMENT.
*
* <p>
* Will be injected when adding an {@link ICraftingWatcherHost} to a grid.
*/
public interface ICraftingWatcher {
/**
* Add a specific {@link IAEStack} to watch.
*
* <p>
* Supports multiple values, duplicate ones will not be added.
*
* @param stack
@@ -27,6 +27,7 @@ import javax.annotation.Nonnull;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.networking.IGrid;
/**
* Used to access information about AE's various power accepting blocks for
@@ -40,7 +41,6 @@ public interface IAEPowerStorage extends IEnergySource {
*
* @param amt to be injected amount
* @param mode action mode
*
* @return amount of power which was unable to be stored
*/
double injectAEPower(double amt, @Nonnull Actionable mode);
@@ -71,4 +71,22 @@ public interface IAEPowerStorage extends IEnergySource {
*/
@Nonnull
AccessRestriction getPowerFlow();
}
/**
* The priority to use this energy storage.
* <p>
* A higher value means it is more likely to be extracted from first, and less
* likely to be inserted into first.
* <p>
* The value needs to be constant once added to a {@link IGrid}. Should it ever
* need to be changed, it has to be removed from the grid, then update the
* value, and finally added back to the grid.
* <p>
* This should never use {@link Integer#MIN_VALUE} or {@link Integer#MAX_VALUE}.
*
* @return the priority for this storage
*/
default int getPriority() {
return 0;
}
}
@@ -61,7 +61,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* condenses this into a single operation that determines the networks "powered
* state" if the network is considered off-line, your machines should not
* function.
*
* <p>
* {@link MENetworkPowerStatusChange} events are posted when this value changes
* if you need to be notified of the change, most machines can simply test the
* value when they operate.
@@ -73,21 +73,20 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
/**
* AE will accept any power, and store it, to maintain sanity please don't send
* more then 10,000 at a time.
*
* <p>
* IMPORTANT: Network power knows no bounds, for less spamy power flow, networks
* can store more then their allotted storage, however, it should be kept to a
* minimum, to help with this, this method returns the networks current
* OVERFLOW, this is not energy you can store some where else, its already
* stored in the network, you can extract it if you want, however it it owned by
* the network, this is different then IAEEnergyStore
*
* <p>
* Another important note, is that if a network that had overflow is deleted,
* its power is gone, this is one of the reasons why keeping overflow to a
* minimum is important.
*
* @param amt power to inject into the network
* @param mode should the action be simulated or performed?
*
* @return the amount of power that the network has OVER the limit.
*/
@Nonnegative
@@ -36,15 +36,15 @@ import appeng.api.config.Actionable;
public interface IEnergyGridProvider {
/**
* internal use only
*
* <p>
* Can return a list of providers behind the current.
*
* <p>
* An example would be something acting as proxy between different
* {@link IEnergyGrid}s.
*
* <p>
* This can contain duplicate entries, AE will ensure that each provider is only
* visited once.
*
* <p>
* internal use only
*/
@Nonnull
@@ -52,9 +52,9 @@ public interface IEnergyGridProvider {
/**
* internal use only
*
* <p>
* Extracts the requested amount from the provider.
*
* <p>
* This should never forward a call to another {@link IEnergyGridProvider},
* instead return them via {@link IEnergyGridProvider#providers()}
*
@@ -65,10 +65,10 @@ public interface IEnergyGridProvider {
/**
* Injects the offered amount into the provider.
*
* <p>
* This should never forward a call to another {@link IEnergyGridProvider},
* instead return them via {@link IEnergyGridProvider#providers()}
*
* <p>
* internal use only
*
* @return the leftover amount
@@ -78,13 +78,12 @@ public interface IEnergyGridProvider {
/**
* internal use only
*
* <p>
* Returns the current demand of an provider.
*
* <p>
* This should never forward a call to another {@link IEnergyGridProvider},
* instead return them via {@link IEnergyGridProvider#providers()}
*
*
* @param d the max amount offered, the demand should never exceed it.
* @return the total amount demanded
*/
@@ -93,31 +92,29 @@ public interface IEnergyGridProvider {
/**
* internal use only
*
* <p>
* AE currently uses this to enqueue the next visited provider.
*
* <p>
* There is no guarantee that this works on in a perfect way. It can be limited
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not
* any future one discovered by visiting further providers.
*
* <p>
* E.g. inject into the the lowest one first or extract from the highest one.
*
* @return the current stored amount.
*
*
*/
@Nonnegative
double getProviderStoredEnergy();
/**
* internal use only
*
* <p>
* AE currently uses this to enqueue the next visited provider.
*
* <p>
* There is no guarantee that this works on in a perfect way. It can be limited
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not
* any future one discovered by visiting further providers.
*
* <p>
* E.g. inject into the the lowest one first or extract from the highest one.
*
* @return the maximum amount stored.
@@ -36,7 +36,6 @@ public interface IEnergySource {
*
* @param amt extracted power
* @param mode should the action be simulated or performed?
*
* @return returns extracted power.
*/
@Nonnegative
@@ -27,13 +27,13 @@ import javax.annotation.Nonnegative;
/**
* DO NOT IMPLEMENT.
*
* <p>
* Will be injected when adding an {@link IEnergyWatcherHost} to a grid.
*/
public interface IEnergyWatcher {
/**
* Add a specific threshold to watch.
*
* <p>
* Supports multiple values, duplicate ones will not be added.
*
* @param amount

Some files were not shown because too many files have changed in this diff Show More