Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.20.1' into 1.21
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	gradle.properties
#	settings.gradle
#	src/main/java/argent_matter/gcyr/common/machine/multiblock/electric/DysonSystemControllerMachine.java
  • Loading branch information
screret committed Sep 14, 2024
2 parents ad88fe9 + 703853d commit 23bcd1c
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 24 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
### ADDITIONS:

### FIXES:
- fix black hole shader on 1.21
- fix neoforge tags

### CHANGES:
- updated to GT 1.4.1

## WIP Documentation!:

Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ repositories {
url = "https://maven.saps.dev/minecraft"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.latvian.apps"
}
}
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
Expand Down Expand Up @@ -165,11 +166,11 @@ configurations {

dependencies {
// LDLib
implementation(forge.gtceu.forge) { transitive = false }
implementation(forge.gtceu.forge)
implementation(forge.ldlib.neoforge) { transitive = false }

// Registrate
implementation("com.tterrag.registrate:Registrate:${forge.versions.registrate.get()}")
//implementation("com.tterrag.registrate:Registrate:${forge.versions.registrate.get()}")

runtimeOnly forge.emi

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ loader_version_range=[4,)

mod_id=gcyr
mod_name=Gregicality Rocketry
mod_version=0.2.1+1
mod_version=0.2.2
maven_group=argent_matter
10 changes: 4 additions & 6 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ dependencyResolutionManagement {
versionCatalogs {
// Minecraft Version
def minecraftVersionVeryOld = "1.20.1"
def minecraftVersionOld = "1.21"
def minecraftVersion = "1.21.1"

// Mod Dependencies Versions
// Common
def emiVersion = "1.1.11"
def kjsVersion = "2100.7.0-build.120"
def emiVersion = "1.1.13"
def kjsVersion = "2101.7.0-build.171"

// NeoForge
def neoForgeVersion = "21.1.4"
Expand All @@ -36,7 +35,7 @@ dependencyResolutionManagement {
// Libs
def parchmentVersion = "2024.07.28" // https://parchmentmc.org/docs/getting-started
def configurationVersion = "5573796"
def gtCeuVersion = "1.4.0"
def gtCeuVersion = "1.4.1"
def ldLibVersion = "1.0.27.a"
def moddevgradleVersion = "2.0.15-beta"

Expand All @@ -53,7 +52,7 @@ dependencyResolutionManagement {
def registrate = version("registrate", registrateForgeVersion)
library("registrate", "com.tterrag.registrate", "Registrate").versionRef(registrate)

def emi = version("emi", emiVersion + "+" + minecraftVersionOld)
def emi = version("emi", emiVersion + "+" + minecraftVersion)
library("emi", "dev.emi", "emi-neoforge").versionRef(emi)

def theoneprobe = version("theoneprobe", topForgeVersion)
Expand All @@ -73,7 +72,6 @@ dependencyResolutionManagement {
version("parchment", parchmentVersion)

version("minecraft", minecraftVersion)
version("minecraftOld", minecraftVersionOld)
version("minecraftVeryOld", minecraftVersionVeryOld)

def neogradle = version("moddevgradle", moddevgradleVersion)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"values": [
"gcyr:bisalloy_400_bucket",
"gcyr:molten_bisalloy_400_bucket",
"gcyr:chromic_acid_bucket",
"gcyr:trinaquadalloy_bucket",
"gcyr:molten_trinaquadalloy_bucket",
"gcyr:cobalt_bromide_bucket",
"gcyr:manganese_bromide_bucket",
"gcyr:manganese_acetate_bucket",
"gcyr:hydrobromic_acid_bucket",
"gcyr:co_mn_br_catalyst_bucket",
"gcyr:fiberglass_bucket",
"gcyr:pyrometillic_dianhydride_bucket",
"gcyr:durene_bucket",
"gcyr:dimethylformamide_bucket",
"gcyr:oxydianiline_bucket",
"gcyr:oxydianiline_sludge_bucket",
"gcyr:kapton_k_bucket",
"gcyr:para_xylene_bucket",
"gcyr:bis_trichloromethyl_benzene_bucket",
"gcyr:therephthalic_acid_bucket",
"gcyr:terephthaloyl_chloride_bucket",
"gcyr:nitroaniline_bucket",
"gcyr:para_phenylenediamine_bucket",
"gcyr:para_aramid_bucket"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
@SuppressWarnings("unused")
public class GCYRDimensionMarkers {

static {
GCYRRegistries.REGISTRATE.creativeModeTab(() -> null);
}

public static final BlockEntry<Block> LUNA_MARKER = createMarker("luna");
public static final BlockEntry<Block> MARS_MARKER = createMarker("mars");
public static final BlockEntry<Block> MERCURY_MARKER = createMarker("mercury");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.gregtechceu.gtceu.data.recipe.GTRecipeTypes;
import com.lowdragmc.lowdraglib.side.fluid.FluidHelper;
import it.unimi.dsi.fastutil.ints.Int2IntFunction;
import it.unimi.dsi.fastutil.ints.Int2LongFunction;
import net.minecraft.core.Direction;
import net.minecraft.network.chat.Component;
import net.minecraft.world.level.block.Blocks;
Expand Down Expand Up @@ -61,6 +60,7 @@ public class GCYRMachines {
public final static MachineDefinition[] OXYGEN_SPREADER = registerTieredMachines("oxygen_spreader", OxygenSpreaderMachine::new,
(tier, builder) -> builder
.langValue("%s Oxygen Spreader".formatted(VNF[tier]))
.editableUI(SimpleTieredMachine.EDITABLE_UI_CREATOR.apply(GCYR.id("oxygen_spreader"), GCYRRecipeTypes.OXYGEN_SPREADER_RECIPES))
.rotationState(RotationState.NON_Y_AXIS)
.renderer(() -> new TieredHullMachineRenderer(tier, GCYR.id("block/machine/oxygen_spreader")))
.recipeType(GCYRRecipeTypes.OXYGEN_SPREADER_RECIPES)
Expand Down Expand Up @@ -258,11 +258,11 @@ public static MachineDefinition[] registerSimpleMachines(String name,
int... tiers) {
return registerTieredMachines(name, (holder, tier) -> new SimpleTieredMachine(holder, tier, tankScalingFunction), (tier, builder) -> builder
.langValue("%s %s %s".formatted(VLVH[tier], toEnglishName(name), VLVT[tier]))
.editableUI(SimpleTieredMachine.EDITABLE_UI_CREATOR.apply(GTCEu.id(name), recipeType))
.editableUI(SimpleTieredMachine.EDITABLE_UI_CREATOR.apply(GCYR.id(name), recipeType))
.rotationState(RotationState.NON_Y_AXIS)
.recipeType(recipeType)
.recipeModifier(GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.NON_PERFECT_OVERCLOCK))
.workableTieredHullRenderer(GTCEu.id("block/machines/" + name))
.workableTieredHullRenderer(GCYR.id("block/machines/" + name))
.tooltips(workableTiered(tier, GTValues.V[tier], GTValues.V[tier] * 64, recipeType, tankScalingFunction.apply(tier), true))
.compassNode(name)
.register(), tiers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.lowdragmc.lowdraglib.side.fluid.FluidHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.DustParticleOptions;
import net.neoforged.neoforge.fluids.crafting.FluidIngredient;
import net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient;
import org.joml.Vector3f;

import java.util.Set;
Expand All @@ -30,7 +30,8 @@ public void afterWorking() {
}

public boolean canDistribute(int oxygenBlocks) {
return ((FluidIngredient)recipeLogic.getLastRecipe().value().getInputContents(FluidRecipeCapability.CAP).get(0).content).getStacks()[0].getAmount() / FluidHelper.getBucket() >= oxygenBlocks;
return ((SizedFluidIngredient)recipeLogic.getLastRecipe().getInputContents(FluidRecipeCapability.CAP).getFirst().content)
.getFluids()[0].getAmount() / FluidHelper.getBucket() >= oxygenBlocks;
}

public void runAlgorithm() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity;
import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine;
import com.gregtechceu.gtceu.api.recipe.GTRecipe;
import com.gregtechceu.gtceu.api.recipe.logic.OCParams;
import com.gregtechceu.gtceu.api.recipe.logic.OCResult;
import com.gregtechceu.gtceu.data.damagesource.GTDamageTypes;
import com.lowdragmc.lowdraglib.gui.util.ClickData;
import net.minecraft.ChatFormatting;
Expand All @@ -19,10 +21,10 @@
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.EntitySelector;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.crafting.RecipeHolder;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.ParametersAreNonnullByDefault;
Expand Down Expand Up @@ -60,13 +62,13 @@ public void onStructureFormed() {
}

@Override
protected @Nullable RecipeHolder<GTRecipe> getRealRecipe(RecipeHolder<GTRecipe> recipe) {
protected @Nullable GTRecipe getRealRecipe(GTRecipe recipe, @NotNull OCParams params, @NotNull OCResult result) {
if (this.getLevel().dimensionType().hasCeiling()) return null;
if (recipe.value().data.contains("gcyr:repair_dyson_sphere")) {
if (recipe.data.contains("gcyr:repair_dyson_sphere")) {
IDysonSystem system = GCYRCapabilityHelper.getDysonSystem((ServerLevel) this.getLevel());
if (system != null && system.isDysonSphereActive() && (!system.activeDysonSphere().isNeedsMaintenance() || !this.getPos().equals(system.activeDysonSphere().getControllerPos()))) return null;
}
return super.getRealRecipe(recipe);
return super.getRealRecipe(recipe, params, result);
}

@Override
Expand All @@ -87,15 +89,15 @@ public boolean onWorking() {
@Override
public void afterWorking() {
super.afterWorking();
RecipeHolder<GTRecipe> recipe = this.getRecipeLogic().getLastRecipe();
GTRecipe recipe = this.getRecipeLogic().getLastRecipe();
if (recipe == null || this.isRemote()) return;
if (recipe.value().getInputContents(ItemRecipeCapability.CAP).isEmpty()) return; // assume the recipe is a dyson launch or repair if it has item inputs.
if (recipe.getInputContents(ItemRecipeCapability.CAP).isEmpty()) return; // assume the recipe is a dyson launch or repair if it has item inputs.

IDysonSystem system = GCYRCapabilityHelper.getDysonSystem((ServerLevel) this.getLevel());
if (system == null) return;
if (!system.isDysonSphereActive() && recipe.value().data.contains("gcyr:launch_dyson_sphere")) {
if (!system.isDysonSphereActive() && recipe.data.contains("gcyr:launch_dyson_sphere")) {
system.addDysonSphere(this.getPos());
} else if (system.isDysonSphereActive() && recipe.value().data.contains("gcyr:repair_dyson_sphere") && system.activeDysonSphere().getControllerPos().equals(this.getPos())) {
} else if (system.isDysonSphereActive() && recipe.data.contains("gcyr:repair_dyson_sphere") && system.activeDysonSphere().getControllerPos().equals(this.getPos())) {
system.activeDysonSphere().fixMaintenance();
}
}
Expand Down

0 comments on commit 23bcd1c

Please sign in to comment.