Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bdce18a
Updated gradle wrapper to 9.6.1, updated readme, removed md files fro…
Pabilo8 Aug 6, 2026
eb3977b
Added nuclear explosion and EMP charge particles, reworked white phos…
Pabilo8 Aug 6, 2026
89f1351
Improved screen shake effect to look smoother
Pabilo8 Aug 6, 2026
2625f77
Added nuke, EMP (tesla), and improved shrapnel particle effects
Pabilo8 Aug 9, 2026
96e542b
Added a fork of Resource Loader mod to build dependencies
Pabilo8 Aug 9, 2026
a463c70
Added DecoPlayerDisplay, miscellaneous GUI improvements
Pabilo8 Aug 9, 2026
675eff2
Added POL tests for all data operations, fixed script parser and impr…
Pabilo8 Aug 9, 2026
9d01ef5
Fixed Mechanical Pump texture
Pabilo8 Aug 9, 2026
402a134
Reworked Point-Of-Interest logic in multiblocks, fixes Radio Station …
Pabilo8 Aug 10, 2026
7f7c690
Initial rework of the Effect Crates, fixed sync and rendering bugs fo…
Pabilo8 Aug 10, 2026
9af676c
Fixed Advanced Capacitor Backpack charging bug
Pabilo8 Aug 11, 2026
f546949
Reworked fluids to use common textures, improved gas cloud texture, a…
Pabilo8 Aug 11, 2026
e85601d
Changed gradle build script to apply custom.gradle first
Pabilo8 Aug 11, 2026
f36f8a0
Replaced IE's IngredientStack with IngredientReference in Inserter an…
Pabilo8 Aug 12, 2026
aef50f4
Reworked Effect Crates, added storage modes and re-added Inserter upg…
Pabilo8 Aug 13, 2026
9d21448
Implemented the Chemthrower override, added particle effects and a WI…
Pabilo8 Aug 14, 2026
7bde462
Fixed Data Router GUI tooltip crash
Pabilo8 Aug 14, 2026
430d2f8
Added input validation to the Ballistic Computer, modernized code, up…
Pabilo8 Aug 15, 2026
0cdbcae
Changed conditional variables in ALM to require a True value for Bool…
Pabilo8 Aug 15, 2026
d744d96
Precision Assembler and Projectile Workshop fixes and rendering impro…
Pabilo8 Aug 16, 2026
c003f53
Added functionality for Flagpole Tesla Coil and Distress Signal upgra…
Pabilo8 Aug 16, 2026
32632ac
Fixed angle limiting in GunAimCoordinate and NBT saving in Protection…
Pabilo8 Aug 16, 2026
3f95f1f
More Emplacement works, improved server-client sync and added missing…
Pabilo8 Aug 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .editorconfig-checker.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"IgnoreDefaults": false,
"SpacesAfterTabs": false,
"NoColor": false,
"Exclude": ["Model(.*).java", ".lang", "ie_manual/(.*).md", ".sh"],
"Exclude": ["Model(.*).java", ".lang", ".md", ".sh"],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Discord](https://img.shields.io/discord/610912351142674434?logo=discord&logoColor=237289da&color=%237289da&label=Discord)](https://discord.gg/teMfm3R)
[![Become a Patron!](https://img.shields.io/badge/Become%20a%20Patron-Pabilo8-red?&logo=patreon)](https://www.patreon.com/bePatron?u=34304036)
[![Commit Activity!](https://img.shields.io/github/commit-activity/m/Team-Immersive-Intelligence/ImmersiveIntelligence)](https://github.com/Team-Immersive-Intelligence/ImmersiveIntelligence/pulse)
[![Test Status](https://img.shields.io/github/check-suites/Team-Immersive-Intelligence/ImmersiveIntelligence/dev%2Fpabilo%2Ffixes?label=Test%20Status)](https://github.com/Team-Immersive-Intelligence/ImmersiveIntelligence/actions/workflows/push.yml)
[![Test Status](https://img.shields.io/github/check-suites/Team-Immersive-Intelligence/ImmersiveIntelligence/dev%2Fmain?label=Test%20Status)](https://github.com/Team-Immersive-Intelligence/ImmersiveIntelligence/actions/workflows/push.yml)

### Description

Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@ base {
archivesName.set(mkxString('archives_base_name', mkxString('mod_id')))
}

apply from: rootProject.file('gradle/scripts/cleanroom.gradle')

def customGradle = rootProject.file('custom.gradle')
if (customGradle.exists()) {
logger.lifecycle('[Mk.X] applying local custom.gradle')
apply from: customGradle
}

apply from: rootProject.file('gradle/scripts/cleanroom.gradle')

gradle.ext.mkxScriptSwitches.each { propertyName, scriptPath ->
mkxApplyScript(propertyName as String, scriptPath as String)
}

if (mkxBool('ii_script_ide', false)) {
idea.project.settings.runConfigurations {
'Setup Mod Workspace'(Gradle) {
Expand All @@ -59,6 +58,9 @@ if (mkxBool('ii_script_ide', false)) {
'Build Mod Jar'(Gradle) {
taskNames = ['build']
}
'Run All Tests'(Gradle) {
taskNames = ['test']
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Gradle
org.gradle.jvmargs=-Xmx3G -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx5G -Dfile.encoding=UTF-8
org.gradle.welcome=never
org.gradle.console=verbose
org.gradle.parallel=true
org.gradle.caching=true

Expand Down Expand Up @@ -66,6 +68,7 @@ junit_version=5.10.2
minecraft_junit_version=1.5.1
jmeasure_version=1.0.0
modworks_version=1.1.3
resourceloader_version=1.5.5-teamii
mockito_version=4.11.0
mirage_version=2.0.3-rc3-SNAPSHOT
baubles_version=2518667
Expand Down
9 changes: 9 additions & 0 deletions gradle/scripts/ide.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ idea {
}
}

dependencies {
runtimeOnlyNonPublishable rfg.deobf("lumien:ResourceLoader:${mkxString('resourceloader_version')}")
}

tasks.named('processIdeaSettings').configure {
dependsOn tasks.named('mkxAfterSync')
}

tasks.named('runClient').configure {
extraArgs.add('--resourceLoaderAssets')
extraArgs.add(rootProject.file('src/main/resources/assets').absolutePath)
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraftforge.fml.relauncher.Side;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.config.Configurator;
import pl.pabilo8.immersiveintelligence.api.api.protection.RadiationHandler;
import pl.pabilo8.immersiveintelligence.api.data.radio.RadioNetwork;
import pl.pabilo8.immersiveintelligence.common.CommonProxy;
import pl.pabilo8.immersiveintelligence.common.IIConfigHandler;
Expand Down Expand Up @@ -104,6 +105,7 @@ public void serverAboutToStart(FMLServerAboutToStartEvent event)
IILogger.debug("Pre-World Load cleanup");
CommonProxy.refreshFluidReferences();
RadioNetwork.INSTANCE.clearDevices();
RadiationHandler.INSTANCE.cleanup();
if(Factions.enableFactions)
DiplomacyHandler.getInstance(false).init();
}
Expand Down Expand Up @@ -137,6 +139,7 @@ public void onFMLServerStopped(FMLServerStoppedEvent event)
{
IILogger.info("Post-World Unload cleanup");
RadioNetwork.INSTANCE.clearDevices();
RadiationHandler.INSTANCE.cleanup();
if(Factions.enableFactions)
DiplomacyHandler.getInstance(false).cleanup();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import net.minecraftforge.energy.IEnergyStorage;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.items.IItemHandler;
import pl.pabilo8.immersiveintelligence.api.crafting.IngredientReference;
import pl.pabilo8.immersiveintelligence.common.util.ILocalizedEnum;
import pl.pabilo8.immersiveintelligence.common.util.easynbt.EasyNBT;

import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.HashMap;
import java.util.Map.Entry;
Expand All @@ -20,7 +20,10 @@
import java.util.stream.Stream;

/**
* Registers container adapters and stores Packer task definitions.
*
* @author Pabilo8 (pabilo@iiteam.net)
* @updated 12.08.2026
* @since 19.08.2022
*/
public class PackerHandler
Expand Down Expand Up @@ -115,11 +118,11 @@ public static class PackerTask implements INBTSerializable<NBTTagCompound>
/**
* Filter for item and fluid tasks
*/
public IngredientStack stack = new IngredientStack("*");
public IngredientReference stack = new IngredientReference();
/**
* Filter for the container to be packed
*/
public IngredientStack containerFilter = new IngredientStack("*");
public IngredientReference containerFilter = new IngredientReference();
/**
* Amount of items/fluid/energy transferred after which this task expires<br>
* -1 Means task will never expire
Expand All @@ -134,24 +137,27 @@ public static class PackerTask implements INBTSerializable<NBTTagCompound>
* as long as it keeps making progress.
*/
public boolean repeat = false;
/**
* Logistic tag, acting as a filter for the container
*/
@Nullable
public LogisticTag logiTag = null;

public PackerTask()
{

}

public PackerTask(PackerPutMode mode, PackerActionType actionType, IngredientStack stack)
public PackerTask(PackerPutMode mode, PackerActionType actionType, IngredientReference stack)
{
this.mode = mode;
this.actionType = actionType;
this.stack = stack;
}

/**
* Creates a task from a legacy IE ingredient stack.
*/
public PackerTask(PackerPutMode mode, PackerActionType actionType, IngredientStack stack)
{
this(mode, actionType, IngredientReference.fromIngredientStack(stack));
}

public PackerTask(NBTTagCompound nbt)
{
deserializeNBT(nbt);
Expand All @@ -163,12 +169,11 @@ public NBTTagCompound serializeNBT()
return EasyNBT.newNBT()
.withEnum("mode", mode)
.withEnum("action_type", actionType)
.withIngredientStack("stack", stack)
.withIngredientStack("container_filter", containerFilter)
.withSerializable("stack", stack)
.withSerializable("container_filter", containerFilter)
.withInt("expiration_amount", expirationAmount)
.withBoolean("unpack", unpack)
.withBoolean("repeat_task", repeat)
.conditionally(logiTag!=null, e -> e.withSerializable("logi_tag", logiTag))
.unwrap();
}

Expand All @@ -178,23 +183,23 @@ public void deserializeNBT(NBTTagCompound nbt)
EasyNBT enbt = EasyNBT.wrapNBT(nbt);
this.mode = enbt.getEnum("mode", PackerPutMode.class);
this.actionType = enbt.getEnum("action_type", PackerActionType.class);
this.stack = enbt.getIngredientStack("stack");
this.containerFilter = enbt.getIngredientStack("container_filter");
this.stack = IngredientReference.readFromNBT(enbt.getCompound("stack"));
this.containerFilter = IngredientReference.readFromNBT(enbt.getCompound("container_filter"));
this.expirationAmount = enbt.getInt("expiration_amount");
this.unpack = enbt.getBoolean("unpack");
this.repeat = enbt.hasKey("repeat_task")&&enbt.getBoolean("repeat_task");
this.logiTag = enbt.hasKey("logi_tag")?new LogisticTag(enbt.getCompound("logi_tag")): null;
// Migrate the old separate container logistics-tag filter.
if(enbt.hasKey("logi_tag"))
this.containerFilter.withLogisticTag(new LogisticTag(enbt.getCompound("logi_tag")));
}
}

public static class LabelingTask implements INBTSerializable<NBTTagCompound>
{
public IngredientStack filter = new IngredientStack("*");
public IngredientReference filter = new IngredientReference();
public int expirationAmount = -1;
public int serialBatch = 0;
public String name = "";
@Nullable
public LogisticTag logiTagIn = null;
public LogisticTag logiTagOut = new LogisticTag();

public LabelingTask()
Expand All @@ -212,10 +217,9 @@ public NBTTagCompound serializeNBT()
{
return EasyNBT.newNBT()
.withString("name", name)
.withIngredientStack("stack", filter)
.withSerializable("stack", filter)
.withInt("expiration_amount", expirationAmount)
.withInt("serial_batch", serialBatch)
.conditionally(logiTagIn!=null, e -> e.withSerializable("logi_tag", logiTagIn))
.withSerializable("logi_tag_out", logiTagOut)
.unwrap();
}
Expand All @@ -225,10 +229,12 @@ public void deserializeNBT(NBTTagCompound nbt)
{
EasyNBT enbt = EasyNBT.wrapNBT(nbt);
this.name = enbt.getString("name");
this.filter = enbt.getIngredientStack("stack");
this.filter = IngredientReference.readFromNBT(enbt.getCompound("stack"));
this.expirationAmount = enbt.getInt("expiration_amount");
this.serialBatch = enbt.getInt("serial_batch");
this.logiTagIn = enbt.hasKey("logi_tag")?new LogisticTag(enbt.getCompound("logi_tag")): null;
// Migrate the old separate input logistics-tag filter.
if(enbt.hasKey("logi_tag"))
this.filter.withLogisticTag(new LogisticTag(enbt.getCompound("logi_tag")));
this.logiTagOut = new LogisticTag(enbt.getCompound("logi_tag_out"));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
package pl.pabilo8.immersiveintelligence.api;

import net.minecraft.potion.PotionEffect;
import pl.pabilo8.immersiveintelligence.api.ammo.AmmoRegistry;
import pl.pabilo8.immersiveintelligence.common.ammo.components.factory.AmmoComponentShrapnel;
import pl.pabilo8.immersiveintelligence.common.util.IIColor;
import pl.pabilo8.immersiveintelligence.common.util.ResLoc;

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

/**
* Registers shrapnel materials and their ammunition components.
*
* @author Pabilo8 (pabilo@iiteam.net)
* @updated 06.08.2026
* @ii-approved 0.3.1
* @since 24.05.2019
*/
public class ShrapnelHandler
{
public static HashMap<String, Shrapnel> registry = new HashMap<>();

public static Shrapnel addShrapnel(String name, IIColor color, ResLoc texture, int damage, float mass, float brightness)
public static Shrapnel addShrapnel(String name, IIColor color, int damage, float mass, float brightness)
{
//Register the shrapnel
Shrapnel shrapnel = registry.computeIfAbsent(name, s -> new Shrapnel(name, texture, color, damage, mass, brightness));
//Register an ammo component of the shrapnel
AmmoComponentShrapnel component = new AmmoComponentShrapnel(name);
AmmoRegistry.registerComponent(component);
Shrapnel shrapnel = registry.computeIfAbsent(name, s -> new Shrapnel(name, color, damage, mass, brightness));
AmmoRegistry.registerComponent(new AmmoComponentShrapnel(name));
return shrapnel;
}

Expand All @@ -31,33 +33,36 @@ public static void removeShrapnel(String shrapnel)
//TODO: 28.04.2024 remove ammo component
}

/**
* Defines the gameplay and visual properties of one shrapnel material.
*
* @author Pabilo8 (pabilo@iiteam.net)
* @since 24.05.2019
*/
public static class Shrapnel
{
//--- Properties ---//
public final String name;
public final ResLoc texture;
public final int damage;
public final IIColor color;
public final float mass, brightness;
public boolean flammable = false;
public boolean goodVsUndead = false;
private boolean disruptsRadio;
private boolean disruptsRadio = false;
public boolean fallsSlowly = false;
@Nullable
public PotionEffect potion = null;

private Shrapnel(String name, ResLoc texture, IIColor color, int damage, float mass, float brightness)
private Shrapnel(String name, IIColor color, int damage, float mass, float brightness)
{
this.name = name;
this.color = color;
this.texture = texture;
this.damage = damage;
this.mass = mass;
this.brightness = brightness;
}

//--- Setters ---//

/**
* @param flammable whether the shrapnel can be ignited and deal fire damage
* @return this
* Sets whether this shrapnel can ignite.
*/
public Shrapnel setFlammable(boolean flammable)
{
Expand All @@ -66,26 +71,47 @@ public Shrapnel setFlammable(boolean flammable)
}

/**
* @param goodVsUndead whether the shrapnel deals extra damage to the undead
* @return this
* Sets whether this shrapnel deals double damage to undead targets.
*/
public Shrapnel setGoodVsUndead(boolean goodVsUndead)
{
this.goodVsUndead = goodVsUndead;
return this;
}

/**
* Returns whether this shrapnel disrupts nearby radio devices.
*/
public boolean isDisruptsRadio()
{
return disruptsRadio;
}

/**
* @param disruptsRadio whether the shrapnel disrupts radio signals
* Sets whether this shrapnel disrupts nearby radio devices.
*/
public void setDisruptsRadio(boolean disruptsRadio)
public Shrapnel setDisruptsRadio(boolean disruptsRadio)
{
this.disruptsRadio = disruptsRadio;
return this;
}

/**
* Sets whether this shrapnel uses a long, slow-falling trajectory.
*/
public Shrapnel setFallsSlowly(boolean fallsSlowly)
{
this.fallsSlowly = fallsSlowly;
return this;
}

/**
* Sets the potion effect applied to living targets on hit.
*/
public Shrapnel setPotion(@Nullable PotionEffect potion)
{
this.potion = potion==null?null: new PotionEffect(potion);
return this;
}
}
}
Loading
Loading