Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into 1.16
  • Loading branch information
DonovanDMC committed Mar 30, 2022
2 parents 15b3390 + 5d43f5e commit 00571f5
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Do not contact them for support. If you want support, comment on the [curseforge

This is based on [ProjectEX](https://www.curseforge.com/minecraft/mc-mods/projectex-forge), which seems to be mostly abandoned at this point. This has been rewritten from the ground up, and has some new things.

If you want to get updates instantly or just generally chat with developers, come see us in our [Discord Server](https://discord.gg/SwxbbmMKQH).

## Features

### EMC Display
Expand Down Expand Up @@ -64,4 +66,4 @@ Due to the huge emc values that are present here, we shorten any emc values over
![EMC Short](https://butts-are.cool/mc/project-expansion/emc_short.png)
![EMC Long](https://butts-are.cool/mc/project-expansion/emc_long.png)

Use JEI or something similar for recipes.
Use JEI or something similar for recipes.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.daemon=false

cfProjectID = 579177
mcVersion = 1.16.5
localVersion = 1.0.12
localVersion = 1.0.13
mappingsVersion = 20210309
forgeVersion = 36.2.23
# 1.16.5-PE1.0.1B
Expand Down
2 changes: 1 addition & 1 deletion src/main/generation/generators/recipes/power_flower.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ module.exports = function run(outDir) {
return MATTER_TIERS.map((tier, index, arr) => {
writeFileSync(`${outDir}/power_flower/${tier}.json`, base.replace(/\$TIER\$/g, tier));
return [BASE, `${outDir}/power_flower/${tier}.json`];
});compressed_collector
});
}
7 changes: 4 additions & 3 deletions src/main/generation/generators/recipes/relay.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const BASE = `${__dirname}/relay.json`;
module.exports = function run(outDir) {
if(!existsSync(`${outDir}/relay`)) mkdirSync(`${outDir}/relay`);
const base = readFileSync(BASE).toString();
return MATTER_TIERS.filter(tier => !["basic", "dark", "red", "magenta", "final"].includes(tier)).map((tier, index, arr) => {
writeFileSync(`${outDir}/relay/${tier}.json`, base.replace(/\$TIER\$/g, tier).replace(/\$PREV\$/g, arr[index - 1] || "basic"));
return MATTER_TIERS.filter(tier => !["basic", "dark", "red", "final"].includes(tier)).map((tier, index, arr) => {
if(tier === "magenta") return; // we still need it for pink
writeFileSync(`${outDir}/relay/${tier}.json`, base.replace(/\$TIER\$/g, tier).replace(/\$PREV\$/g, arr[index - 1]));
return [BASE, `${outDir}/relay/${tier}.json`];
});
}).filter(Boolean);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
import cool.furry.mc.forge.projectexpansion.config.Config;
import moze_intel.projecte.api.ProjectEAPI;
import moze_intel.projecte.api.capabilities.IKnowledgeProvider;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;

@Mod.EventBusSubscriber(modid = Main.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE)
Expand All @@ -33,7 +29,7 @@ public static void onTick(TickEvent.ServerTickEvent event) {
tick = 0;
for(UUID uuid : stored.keySet()) {
BigInteger amount = stored.get(uuid);
ServerPlayerEntity player = Objects.requireNonNull(Minecraft.getInstance().getIntegratedServer()).getPlayerList().getPlayerByUUID(uuid);
ServerPlayerEntity player = Util.getPlayer(uuid);
IKnowledgeProvider provider = player == null ? null : player.getCapability(ProjectEAPI.KNOWLEDGE_CAPABILITY).orElse(null);
if(provider == null) continue;
provider.setEmc(provider.getEmc().add(amount));
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/cool/furry/mc/forge/projectexpansion/util/Util.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package cool.furry.mc.forge.projectexpansion.util;

import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraftforge.fml.server.ServerLifecycleHooks;

import javax.annotation.Nullable;
import java.util.UUID;

public class Util {
public static @Nullable ServerPlayerEntity getPlayer(UUID uuid) {
return ServerLifecycleHooks.getCurrentServer() == null ? null : ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayerByUUID(uuid);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"group": "projectexpansion:matter/pink",
"ingredients": [
{
"item": "projectexpansion:basic_relay"
"item": "projectexpansion:magenta_relay"
},
{
"item": "projectexpansion:pink_matter"
Expand Down
7 changes: 4 additions & 3 deletions updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"1.16.5-1.0.9": "https://github.com/DonovanDMC/ProjectExpansion/releases/tag/1.16.5-1.0.9",
"1.16.5-1.0.10": "https://github.com/DonovanDMC/ProjectExpansion/releases/tag/1.16.5-1.0.10",
"1.16.5-1.0.11": "https://github.com/DonovanDMC/ProjectExpansion/releases/tag/1.16.5-1.0.11",
"1.16.5-1.0.12": "https://github.com/DonovanDMC/ProjectExpansion/releases/tag/1.16.5-1.0.12"
"1.16.5-1.0.12": "https://github.com/DonovanDMC/ProjectExpansion/releases/tag/1.16.5-1.0.12",
"1.16.5-1.0.13": "https://github.com/DonovanDMC/ProjectExpansion/releases/tag/1.16.5-1.0.13"
},
"promos": {
"1.16.5-latest": "1.16.5-1.0.12",
"1.16.5-recommended": "1.16.5-1.0.12"
"1.16.5-latest": "1.16.5-1.0.13",
"1.16.5-recommended": "1.16.5-1.0.13"
}
}

0 comments on commit 00571f5

Please sign in to comment.