Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev-1.18' into dev-1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar authored Oct 1, 2024
2 parents a6d1e28 + 949d8a6 commit 754a077
Show file tree
Hide file tree
Showing 296 changed files with 3,389 additions and 2,088 deletions.
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

16 changes: 12 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,19 @@ jobs:
run: ./gradlew build --stacktrace
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Upload Artifact
uses: actions/upload-artifact@v2
- name: Upload Forge Artifact
uses: actions/upload-artifact@v4
with:
name: GregTech JAR
path: ./*/build/libs
name: GTI-forge-nightly-${{ steps.vars.outputs.sha_short }}
path: forge/build/libs
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Fabric Artifact
uses: actions/upload-artifact@v4
with:
name: GTI-fabric-nightly-${{ steps.vars.outputs.sha_short }}
path: fabric/build/libs
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion AntimatterAPI
Submodule AntimatterAPI updated 384 files
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
plugins {
id "maven-publish"
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply(false)
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply(false)
id "com.github.johnrengelman.shadow" version "7.0.0" apply(false)
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
id 'org.jetbrains.kotlin.plugin.lombok' version '2.0.20'
}

architectury {
Expand All @@ -23,6 +25,8 @@ def gitHash() {

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: "org.jetbrains.kotlin.plugin.lombok"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

loom {
Expand All @@ -43,6 +47,9 @@ subprojects {
processResources {
exclude('gtuassets1.14')
}
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies{
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:0.2.0-beta.11"))
implementation(project(path: ":tesseract-common", configuration: "namedElements"))
implementation(project(path: ":antimatter-common", configuration: "namedElements"))
implementation("io.github.gregtechintergalactical:gtcore-common:${rootProject.gt_core_version}-${rootProject.minecraft_version}:dev"){
modImplementation("io.github.gregtechintergalactical:gtcore-common:${rootProject.gt_core_version}-${rootProject.minecraft_version}"){
transitive = false
}
modImplementation("com.gtnewhorizon.structurelib:structurelib-common:${project.structurelib_version}-${project.minecraft_version}")
Expand Down
6 changes: 6 additions & 0 deletions common/src/main/java/muramasa/gregtech/GTRemapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ public static void init(){
}
return r;
});
for (int i = 0; i < 25; i++) {
remapGTCore("int_circuit_" + i, "selector_tag_"+i);
}
AntimatterRemapping.remapBlockEntity(new ResourceLocation(Ref.SHARED_ID, "fluid_pipe_polyethylene"), new ResourceLocation(Ref.SHARED_ID, "fluid_pipe_plastic"));
remap("bath_hv", "bath");
remap("coke_oven_bronze", "coke_oven");
remap("primitive_blast_furnace_bronze", "primitive_blast_furnace");
remap("heat_exchanger_ev", "large_heat_exchanger");
AntimatterRemapping.remapBlockEntity(new ResourceLocation(GTIRef.ID, "heat_exchanger"), new ResourceLocation(GTIRef.ID, "large_heat_exchanger"));
AntimatterRemapping.remapMachine("coal_boiler", SOLID_FUEL_BOILER);
AntimatterRemapping.remapMachine("pulverizer", MACERATOR);
AntimatterRemapping.remapMachine("large_macerator", LARGE_PULVERIZER);
AntimatterRemapping.remapMachine("fluid_extractor", FLUID_PRESS);
AntimatterRemapping.remapMachine("hatch_item_input", HATCH_ITEM_I);
AntimatterRemapping.remapMachine("hatch_item_output", HATCH_ITEM_O);
Expand Down Expand Up @@ -160,6 +165,7 @@ public static void init(){
remap("casing_turbine_2", "stainless_steel_turbine_casing");
remap("casing_turbine_3", "titanium_turbine_casing");
remap("casing_turbine_4", "tungstensteel_turbine_casing");
AntimatterRemapping.remap(new ResourceLocation(GTIRef.ID, "monocrystalline_silicon_boule"), new ResourceLocation(Ref.SHARED_ID, "boule_silicon"));
}

private static void remap(String oldId, String newId){
Expand Down
17 changes: 12 additions & 5 deletions common/src/main/java/muramasa/gregtech/GregTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import muramasa.antimatter.tool.IAntimatterTool;
import muramasa.antimatter.util.AntimatterPlatformUtils;
import muramasa.gregtech.block.BlockAsphalt;
import muramasa.gregtech.client.GregTechModelManager;
import muramasa.gregtech.data.Machines;
import muramasa.gregtech.data.*;
import muramasa.gregtech.datagen.*;
Expand All @@ -33,7 +34,6 @@
import muramasa.gregtech.loader.machines.generator.LargeBoilerLoader;
import muramasa.gregtech.loader.multi.*;
import muramasa.gregtech.proxy.CommonHandler;
import muramasa.gregtech.proxy.ServerHandler;
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
Expand All @@ -44,6 +44,8 @@
import java.util.Arrays;
import java.util.function.BiConsumer;

import static muramasa.antimatter.data.AntimatterMaterialTypes.PLATE;

public class GregTech extends AntimatterMod {

public static GregTech INSTANCE;
Expand All @@ -60,7 +62,6 @@ public void onRegistrarInit() {
new SpaceModRegistrar();
LOGGER.info("Loading GregTech");
INSTANCE = this;
ServerHandler.setup();


AntimatterDynamics.clientProvider(GTIRef.ID,
Expand All @@ -79,7 +80,7 @@ public static void onProviders(ProvidersEvent ev) {
});
ev.addProvider(GTIRef.ID, () -> new GregTechItemTagProvider(GTIRef.ID, GTIRef.NAME.concat(" Item Tags"),
false, p[0]));
ev.addProvider(GTIRef.ID, () -> new AntimatterFluidTagProvider(GTIRef.ID,
ev.addProvider(GTIRef.ID, () -> new GregTechFluidTagProvider(GTIRef.ID,
GTIRef.NAME.concat(" Fluid Tags"), false));
ev.addProvider(GTIRef.ID, () -> new AntimatterAdvancementProvider(GTIRef.ID,
GTIRef.NAME.concat(" Advancements"), new ProgressionAdvancements()));
Expand Down Expand Up @@ -119,6 +120,7 @@ public static void registerRecipeLoaders(IAntimatterRegistrar registrar, IRecipe
loader.accept("circuitry", Circuitry::init);
loader.accept("solid_fuel_boiler", SolidFuelBoilerLoader::init);
loader.accept("compressor", CompressorLoader::init);
loader.accept("crystallization_chamber", CrystallizationChamberLoader::init);
loader.accept("cutter", CutterLoader::init);
loader.accept("dehydrator", DehydratorLoader::init);
loader.accept("distillery", DistilleryLoader::init);
Expand All @@ -145,6 +147,7 @@ public static void registerRecipeLoaders(IAntimatterRegistrar registrar, IRecipe
loader.accept("polarizer", PolarizerLoader::init);
loader.accept("printer", PrinterLoader::init);
loader.accept("roaster", RoasterLoader::init);
loader.accept("rock_breaker", RockBreakerLoader::init);
loader.accept("scanner", ScannerLoader::init);
loader.accept("sifter", SifterLoader::init);
loader.accept("smelter", SmelterLoader::init);
Expand Down Expand Up @@ -177,6 +180,7 @@ public static <T> T get(Class<? extends T> clazz, String id) {
public void onRegistrationEvent(RegistrationEvent event, Side side) {
switch (event) {
case DATA_INIT -> {
GregTechMaterialTypes.init();
ToolTypes.init();
Materials.init();
TierMaps.init();
Expand Down Expand Up @@ -223,7 +227,7 @@ public void onRegistrationEvent(RegistrationEvent event, Side side) {
l.addAll(Arrays.asList(screwdriver_mv.getItem(), screwdriver_hv.getItem()));
l.add(GTCoreItems.BatteryRE);
if (!GregTechConfig.HARDER_CIRCUITS){
l.addAll(Arrays.asList(GTCoreItems.CircuitBoardPhenolic));
l.addAll(Arrays.asList(GTCoreItems.CircuitBoardPhenolic, PLATE.get(Materials.FiberReinforcedEpoxyResin)));
l.addAll(Arrays.asList(GregTechItems.CircuitWetware, GregTechItems.MicroProcessor, GregTechItems.IntegratedProcessor, GregTechItems.NanoProcessor, GregTechItems.QuantumProcessor));
}
});
Expand All @@ -238,7 +242,10 @@ public void onRegistrationEvent(RegistrationEvent event, Side side) {
// if (side == Dist.CLIENT) StructureInfo.init();
TierMaps.providerInit();
}
case CLIENT_DATA_INIT -> ClientData.init();
case CLIENT_DATA_INIT -> {
ClientData.init();
GregTechModelManager.init();
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions common/src/main/java/muramasa/gregtech/block/BlockCoil.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public BlockCoil(String domain, String id, CoilData coilData, Block.Properties p
}

public BlockCoil(String domain, String id, CoilData coilData) {
this(domain, id, coilData, Block.Properties.of(Material.METAL).strength(1.0f, 10.0f).sound(SoundType.METAL).isValidSpawn((blockState, blockGetter, blockPos, object) -> false));
this(domain, id, coilData, Block.Properties.of(Material.METAL).strength(1.0f, 10.0f).sound(SoundType.METAL).isValidSpawn((blockState, blockGetter, blockPos, object) -> false).requiresCorrectToolForDrops());
}

public CoilData getCoilData() {
Expand All @@ -42,7 +42,8 @@ public void appendHoverText(ItemStack p_49816_, @Nullable BlockGetter p_49817_,
tooltip.add(Utils.translatable("antimatter.tooltip.heat_capacity").append(": ").append(String.valueOf(this.coilData.heat)));
tooltip.add(Utils.translatable("tooltip.gti.coil.percentage", (int)(this.coilData.percentage * 100) + "%"));
tooltip.add(Utils.translatable("tooltip.gti.coil.maxSimultaneousRecipes", this.coilData.maxSimultaneousRecipes));
tooltip.add(Utils.translatable("tooltip.gti.coil.autoclaveBoosts", ((this.coilData.autoclaveBoosts * 10) + 100) + "%"));
}

public record CoilData(int heat, float percentage, int maxSimultaneousRecipes){}
public record CoilData(int heat, float percentage, int maxSimultaneousRecipes, int autoclaveBoosts){}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package muramasa.gregtech.blockentity.miniportals;

import muramasa.antimatter.blockentity.BlockEntityMachine;
import muramasa.antimatter.blockentity.IExtendingBlockEntity;
import muramasa.antimatter.machine.MachineState;
import muramasa.antimatter.machine.types.Machine;
import muramasa.antimatter.tool.AntimatterToolType;
Expand All @@ -17,14 +18,15 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

public abstract class BlockEntityMiniPortal extends BlockEntityMachine<BlockEntityMiniPortal> {
public abstract class BlockEntityMiniPortal extends BlockEntityMachine<BlockEntityMiniPortal> implements IExtendingBlockEntity {

public static List<BlockEntityMiniPortal>
sListWorldSide = new ArrayList<>();
Expand Down Expand Up @@ -106,6 +108,16 @@ protected boolean allowExplosionsInRain() {
return false;
}

@Override
public void onBlockUpdate(BlockPos neighbor) {
super.onBlockUpdate(neighbor);
Direction facing = Utils.getOffsetFacing(this.getBlockPos(), neighbor);
if (otherSide != null && !otherSide.isRemoved()){
BlockPos offset = otherSide.getBlockPos().relative(facing.getOpposite());
otherSide.getLevel().neighborChanged(offset, otherSide.getLevel().getBlockState(offset).getBlock(), otherSide.getBlockPos());
}
}

@Override
public InteractionResult onInteractBoth(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit, @Nullable AntimatterToolType type) {
ItemStack stack = player.getItemInHand(hand);
Expand Down Expand Up @@ -220,6 +232,14 @@ public boolean toggleMachine() {
return false;
}

@Override
public BlockEntity getExtendedBlockEntity(Direction side) {
if (otherSide != null && !otherSide.isRemoved()){
return otherSide.getCachedBlockEntity(side);
}
return this;
}

@Override
public List<String> getInfo(boolean simple) {
List<String> info = super.getInfo(simple);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ protected void calculateDurations() {
super.calculateDurations();
maxProgress = activeRecipe.getDuration();
overclock = 0;
//Divide by 2, for amps.
int tier = Utils.getVoltageTier(getMaxInputVoltage() / 2);
long voltage = getMaxInputVoltage();
int tier = Math.max(1, Utils.getVoltageTier(voltage));
int recipeTier = Utils.getVoltageTier(activeRecipe.getPower());
if (recipeTier == tier) {
EUt = activeRecipe.getPower();
Expand All @@ -37,10 +37,14 @@ protected void calculateDurations() {
} else {
EUt = activeRecipe.getPower();
maxProgress = activeRecipe.getDuration();
for (int i = 2; i < Ref.V.length; i += 2) {
if (EUt > Ref.V[tier - 1]) break;
int i = 2;
while (EUt <= Ref.V[tier - 1]){
EUt *= 4;
maxProgress /= (heatDiv >= i ? 4 : 2);
i += 2;
}
if (heatDiv > 0){
EUt = (long) (EUt * Math.pow(0.95, heatDiv));
}
}
}
Expand Down
Loading

0 comments on commit 754a077

Please sign in to comment.