Skip to content

Commit

Permalink
Update deps, and bump min Neo version to 21.1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
pupnewfster committed Aug 20, 2024
1 parent 62a305b commit cd1cd94
Show file tree
Hide file tree
Showing 23 changed files with 71 additions and 72 deletions.
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {

tasks.named('wrapper', Wrapper).configure {
//Define wrapper values here so as to not have to always do so when updating gradlew.properties
gradleVersion = '8.9'
gradleVersion = '8.10'
distributionType = Wrapper.DistributionType.ALL
}

Expand Down Expand Up @@ -375,10 +375,7 @@ dependencies {
localRuntime(emi)
} else {
//We still need it to load in datagen regardless of if we are using emi or a different viewer so that we can access EMI related objects
//TODO - 1.21: Make a PR to EMI to bootstrap in datagen, and more importantly be able to somehow provide the registry access context
// rather than it trying to grab it from Minecraft.getInstance().level as Minecraft.getInstance() is null in datagen
// As https://github.com/emilyploszaj/emi/pull/600 broke it
//datagenMainRuntimeOnly(emi)
datagenMainRuntimeOnly(emi)
}

localRuntime("team.chisel.ctm:CTM:${previous_minor_minecraft_version}-${ctm_version}")
Expand Down
2 changes: 1 addition & 1 deletion docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Mekanism is developed for Minecraft 1.21 using NeoForge.

## Prerequisites

* Gradle - Version 8.9 is known to work, your mileage with other versions may vary
* Gradle - Version 8.10 is known to work, your mileage with other versions may vary
* JDK - Version 21 is the target as that is what Mojang ships, but to run gradle you must use a minimum of JDK 17.

## Directory Structure
Expand Down
26 changes: 13 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ minecraft_version=1.21.1
previous_minecraft_version=1.20.6
previous_minor_minecraft_version=1.21
loader_version_range=[4,)
forge_version=21.1.9
forge_version=21.1.22
mod_version=10.6.9
#This determines the minimum version of forge required to use Mekanism
# Only bump it whenever we need access to a feature in forge that is not available in earlier versions
forge_version_range=[21.1.9,)
forge_version_range=[21.1.21,)
minecraft_version_range=[1.21.1]
#This specifies what type of release it will be uploaded to CurseForge and Modrinth as
# options are: alpha, beta, release
release_type=alpha

#JUnit/Testing dependencies
junit_version=5.10.2
junit_version=5.11.0
jqwik_version=1.9.0

#NeoGradle Settings
Expand All @@ -39,15 +39,16 @@ yamlops_version=1.2.0
cc_tweaked_version=1.111.0
crafttweaker_version=21.0.1
ctm_version=1.2.0+2
curios_version=9.0.5+1.21
emi_version=1.1.10
curios_version=9.0.6+1.21
emi_version=1.1.12
grand_power_version=3.0.0
jade_api_id=5427895
jade_id=5572926
jei_version=19.8.4.116
jade_id=5639932
jei_version=19.8.5.118
json_things_version=0.12.1
top_version=1.21_neo-12.0.0-1
wthit_version=12.2.3
top_version=1.21_neo-12.0.3-5
wildfire_gender_mod_id=5579007
wthit_version=12.3.0

#Mod dependency min version ranges

Expand All @@ -56,10 +57,10 @@ wthit_version=12.2.3


#Mod dependencies for recipes (only used by our data generators)
ae2_version=19.0.17-beta
biomesoplenty_version=21.0.0.12
ae2_version=19.0.20-beta
biomesoplenty_version=21.0.0.18
farmers_delight_id=5566383
glitchcore_version=2.0.0.2
glitchcore_version=2.0.0.3
terrablender_version=4.0.0.1

#Outdated mod dependencies
Expand All @@ -68,7 +69,6 @@ jeitweaker_version=8.0.5
oc2_id=3896581
projecte_api_id=4860862
recipe_stages_version=8.0.0.2
wildfire_gender_mod_id=5357649

#Outdated mod dependencies for recipes
projecte_id=4860859
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 4 additions & 0 deletions src/api/java/mekanism/api/text/TextComponentUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.Fluid;
import net.neoforged.neoforge.fluids.FluidStack;
Expand Down Expand Up @@ -75,6 +76,7 @@ public static MutableComponent build(Object... components) {
case FluidStack stack -> current = stack.getHoverName().copy();
case Fluid fluid -> current = fluid.getFluidType().getDescription().copy();
case EntityType<?> entityType -> current = entityType.getDescription().copy();
case Level level -> current = level.getDescription().copy();
case Direction direction -> current = getTranslatedDirection(direction);
case Boolean bool -> current = getTranslatedBoolean(bool);
//Fallback to a generic replacement
Expand Down Expand Up @@ -207,6 +209,8 @@ public static MutableComponent smartTranslate(String key, Object... components)
current = fluid.getFluidType().getDescription().copy();
} else if (component instanceof EntityType<?> entityType) {
current = entityType.getDescription().copy();
} else if (component instanceof Level level) {
current = level.getDescription().copy();
} else if (component instanceof Direction direction) {
current = getTranslatedDirection(direction);
} else if (component instanceof Boolean bool) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions src/datagen/generated/mekanism/assets/emi/aliases/mekanism.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ private void addChemicalInjectorCoralRevivalRecipe(RecipeOutput consumer, String
private void addChemicalInjectorOxidizingRecipe(RecipeOutput consumer, String basePath) {
//Generate baseline recipes from weathering recipe set
ChemicalStackIngredient oxygen = IngredientCreatorAccess.chemicalStack().from(MekanismChemicals.OXYGEN, 1);
//TODO - 1.21: Switch this to being created at runtime and making use of the Neo DataMap?
// https://github.com/neoforged/NeoForge/commit/87875183dcd8239404cbddbe8717db1dbe4f64ee
for (Map.Entry<Block, Block> entry : WeatheringCopper.NEXT_BY_BLOCK.get().entrySet()) {
Block result = entry.getValue();
ItemStackChemicalToItemStackRecipeBuilder.injecting(
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/mekanism/client/ClientRegistration.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,19 +597,19 @@ public static void registerItemDecorations(RegisterItemDecorationsEvent event) {

@SubscribeEvent
public static void registerClientExtensions(RegisterClientExtensionsEvent event) {
event.registerItem(new MekCustomArmorRenderProperties(RenderJetpack.ARMORED_RENDERER, JetpackArmor.ARMORED_JETPACK), MekanismItems.ARMORED_JETPACK.get());
event.registerItem(new MekCustomArmorRenderProperties(RenderJetpack.RENDERER, JetpackArmor.JETPACK), MekanismItems.JETPACK.get());
event.registerItem(new MekCustomArmorRenderProperties(RenderFreeRunners.ARMORED_RENDERER, FreeRunnerArmor.ARMORED_FREE_RUNNERS), MekanismItems.ARMORED_FREE_RUNNERS.get());
event.registerItem(new MekCustomArmorRenderProperties(RenderFreeRunners.RENDERER, FreeRunnerArmor.FREE_RUNNERS), MekanismItems.FREE_RUNNERS.get());
event.registerItem(new MekCustomArmorRenderProperties(RenderScubaMask.RENDERER, ScubaMaskArmor.SCUBA_MASK), MekanismItems.SCUBA_MASK.get());
event.registerItem(new MekCustomArmorRenderProperties(RenderScubaTank.RENDERER, ScubaTankArmor.SCUBA_TANK), MekanismItems.SCUBA_TANK.get());
event.registerItem(new MekRenderProperties(RenderAtomicDisassembler.RENDERER), MekanismItems.ATOMIC_DISASSEMBLER.get());
event.registerItem(new MekRenderProperties(RenderFlameThrower.RENDERER), MekanismItems.FLAMETHROWER.get());

event.registerItem(MekaSuitArmor.HELMET, MekanismItems.MEKASUIT_HELMET.get());
event.registerItem(MekaSuitArmor.BODYARMOR, MekanismItems.MEKASUIT_BODYARMOR.get());
event.registerItem(MekaSuitArmor.PANTS, MekanismItems.MEKASUIT_PANTS.get());
event.registerItem(MekaSuitArmor.BOOTS, MekanismItems.MEKASUIT_BOOTS.get());
event.registerItem(new MekCustomArmorRenderProperties(RenderJetpack.ARMORED_RENDERER, JetpackArmor.ARMORED_JETPACK), MekanismItems.ARMORED_JETPACK);
event.registerItem(new MekCustomArmorRenderProperties(RenderJetpack.RENDERER, JetpackArmor.JETPACK), MekanismItems.JETPACK);
event.registerItem(new MekCustomArmorRenderProperties(RenderFreeRunners.ARMORED_RENDERER, FreeRunnerArmor.ARMORED_FREE_RUNNERS), MekanismItems.ARMORED_FREE_RUNNERS);
event.registerItem(new MekCustomArmorRenderProperties(RenderFreeRunners.RENDERER, FreeRunnerArmor.FREE_RUNNERS), MekanismItems.FREE_RUNNERS);
event.registerItem(new MekCustomArmorRenderProperties(RenderScubaMask.RENDERER, ScubaMaskArmor.SCUBA_MASK), MekanismItems.SCUBA_MASK);
event.registerItem(new MekCustomArmorRenderProperties(RenderScubaTank.RENDERER, ScubaTankArmor.SCUBA_TANK), MekanismItems.SCUBA_TANK);
event.registerItem(new MekRenderProperties(RenderAtomicDisassembler.RENDERER), MekanismItems.ATOMIC_DISASSEMBLER);
event.registerItem(new MekRenderProperties(RenderFlameThrower.RENDERER), MekanismItems.FLAMETHROWER);

event.registerItem(MekaSuitArmor.HELMET, MekanismItems.MEKASUIT_HELMET);
event.registerItem(MekaSuitArmor.BODYARMOR, MekanismItems.MEKASUIT_BODYARMOR);
event.registerItem(MekaSuitArmor.PANTS, MekanismItems.MEKASUIT_PANTS);
event.registerItem(MekaSuitArmor.BOOTS, MekanismItems.MEKASUIT_BOOTS);

ClientRegistrationUtil.registerItemExtensions(event, new MekRenderProperties(RenderEnergyCubeItem.RENDERER), MekanismBlocks.BASIC_ENERGY_CUBE,
MekanismBlocks.ADVANCED_ENERGY_CUBE, MekanismBlocks.ELITE_ENERGY_CUBE, MekanismBlocks.ULTIMATE_ENERGY_CUBE, MekanismBlocks.CREATIVE_ENERGY_CUBE);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mekanism/client/ClientRegistrationUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public static void registerItemExtensions(RegisterClientExtensionsEvent event, I
public static void registerBlockExtensions(RegisterClientExtensionsEvent event, BlockDeferredRegister allBlocks) {
for (DeferredHolder<Block, ? extends Block> primaryEntry : allBlocks.getPrimaryEntries()) {
if (primaryEntry.get() instanceof BlockMekanism) {
event.registerBlock(RenderPropertiesProvider.PARTICLE_HANDLER, primaryEntry.get());
event.registerBlock(RenderPropertiesProvider.PARTICLE_HANDLER, primaryEntry);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mekanism/common/block/BlockMekanism.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected void onRemove(@NotNull BlockState state, @NotNull Level world, @NotNul
hasBounding.removeBoundingBlocks(world, pos, state);
}
}
if (state.hasBlockEntity() && (!state.is(newState.getBlock()) || !newState.hasBlockEntity())) {
if (state.hasBlockEntity() && !state.is(newState.getBlock())) {
TileEntityUpdateable tile = WorldUtils.getTileEntity(TileEntityUpdateable.class, world, pos);
if (tile != null) {
tile.blockRemoved();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static int addChunksToRegen(CommandSourceStack source, ColumnPos start,
Mekanism.worldTickHandler.addRegenChunk(registryKey, new ChunkPos(chunkX, chunkZ));
int finalChunkX = chunkX, finalChunkZ = chunkZ;
source.sendSuccess(() -> MekanismLang.COMMAND_RETROGEN_CHUNK_QUEUED.translateColored(EnumColor.GRAY, EnumColor.INDIGO,
MekanismLang.GENERIC_WITH_COMMA.translate(finalChunkX, finalChunkZ), EnumColor.INDIGO, registryKey.location()), true);
MekanismLang.GENERIC_WITH_COMMA.translate(finalChunkX, finalChunkZ), EnumColor.INDIGO, world), true);
hasChunks = true;
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/mekanism/common/command/RadiationCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ private static int addRadiation(CommandSourceStack source, Vec3 pos, Level world
GlobalPos location = GlobalPos.of(world.dimension(), BlockPos.containing(pos));
IRadiationManager.INSTANCE.radiate(location, magnitude);
source.sendSuccess(() -> MekanismLang.COMMAND_RADIATION_ADD.translateColored(EnumColor.GRAY, RadiationScale.getSeverityColor(magnitude),
UnitDisplayUtils.getDisplayShort(magnitude, RadiationUnit.SVH, 3), EnumColor.INDIGO, getPosition(location.pos()), EnumColor.INDIGO,
location.dimension().location()), true);
UnitDisplayUtils.getDisplayShort(magnitude, RadiationUnit.SVH, 3), EnumColor.INDIGO, getPosition(location.pos()), EnumColor.INDIGO, world), true);
return 0;
}

Expand All @@ -233,7 +232,7 @@ private static int getRadiationLevel(CommandSourceStack source, Vec3 pos, Level
GlobalPos location = GlobalPos.of(world.dimension(), BlockPos.containing(pos));
double magnitude = IRadiationManager.INSTANCE.getRadiationLevel(location);
source.sendSuccess(() -> MekanismLang.COMMAND_RADIATION_GET.translateColored(EnumColor.GRAY, EnumColor.INDIGO, getPosition(location.pos()), EnumColor.INDIGO,
location.dimension().location(), RadiationScale.getSeverityColor(magnitude), UnitDisplayUtils.getDisplayShort(magnitude, RadiationUnit.SVH, 3)),
world, RadiationScale.getSeverityColor(magnitude), UnitDisplayUtils.getDisplayShort(magnitude, RadiationUnit.SVH, 3)),
true);
return 0;
}
Expand Down
Loading

0 comments on commit cd1cd94

Please sign in to comment.