Skip to content

Commit

Permalink
Merge pull request #19 from Synthitic/0.0.6
Browse files Browse the repository at this point in the history
0.0.6
  • Loading branch information
Synthitic committed Jun 10, 2024
2 parents f1bd634 + ffad471 commit f1802c8
Show file tree
Hide file tree
Showing 43 changed files with 2,935 additions and 222 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ build
# other
eclipse
run
libs
libs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GCYL: CEu

## Currently in alpha. A survival play through is impossible and not supported. Find breaks in progression, overlapping recipes, missing recipes, useless recipes, etc. and submit problems and suggestions with GitHub issues.
## Currently in alpha. LV-UV should be playable. Breaking changes may come without support for your world. Find breaks in progression, overlapping recipes, missing recipes, useless recipes, etc. and submit problems and suggestions with GitHub issues.
### Accelerated playtesting is reasonable now.

Gregicality Legacy Port to CEu (specifically with reference to the Technological Journey fork)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ modGroup = com.fulltrix.gcyl

# Version of your mod.
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
modVersion = 0.0.5
modVersion = 0.0.6

# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
includeMCVersionJar = false
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/fulltrix/gcyl/CommonProxy.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.fulltrix.gcyl;

import com.fulltrix.gcyl.api.util.VirtualContainerRegistry;
import com.fulltrix.gcyl.item.GCYLCoreItems;
import com.fulltrix.gcyl.materials.GCYLMaterialOverride;
import com.fulltrix.gcyl.materials.GCYLMaterials;
Expand All @@ -20,6 +21,7 @@
import gregtech.api.recipes.recipeproperties.FusionEUToStartProperty;
import gregtech.api.unification.material.event.MaterialEvent;
import gregtech.api.unification.material.event.MaterialRegistryEvent;
import gregtech.common.ConfigHolder;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
Expand All @@ -29,6 +31,7 @@
import net.minecraftforge.common.config.Config;
import net.minecraftforge.common.config.ConfigManager;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
Expand Down Expand Up @@ -60,6 +63,8 @@ public static void forceHighTierConfig(HighTierEvent event) {
//Force enable high tier content, regardless of config option
event.enableHighTier();

ConfigHolder.machines.enableHighTierSolars = true;

//Force enable tiered casings from GCYM
GCYMConfigHolder.globalMultiblocks.enableTieredCasings = true;
//Force enable low quality gems
Expand Down Expand Up @@ -157,6 +162,11 @@ public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
//RecipeHandler.registerLargeMachineRecipes();
}

@SubscribeEvent
public static void onWorldLoadEvent(WorldEvent.Load event) {
VirtualContainerRegistry.initializeStorage(event.getWorld());
}



@SubscribeEvent
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/fulltrix/gcyl/GCYLCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import gregtech.GTInternalTags;
import gregtech.api.GregTechAPI;
import gregtech.api.cover.CoverDefinition;
import gregtech.common.blocks.BlockWireCoil;
import gregtech.common.blocks.MetaBlocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.Mod;
Expand Down Expand Up @@ -42,6 +44,11 @@ public void preInit(FMLPreInitializationEvent event) {
for (GCYLHeatingCoil.CoilType type : GCYLHeatingCoil.CoilType.values()) {
HEATING_COILS.put(HEATING_COIL.getState(type), type);
}

HEATING_COILS.remove(MetaBlocks.WIRE_COIL.getState(BlockWireCoil.CoilType.TRINIUM),BlockWireCoil.CoilType.TRINIUM);
HEATING_COILS.remove(MetaBlocks.WIRE_COIL.getState(BlockWireCoil.CoilType.TRITANIUM),BlockWireCoil.CoilType.TRITANIUM);


}

@EventHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.fulltrix.gcyl.api.util;

import com.cleanroommc.modularui.widgets.slot.ModularSlot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandlerModifiable;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;

public class ItemContainerSwitchShim implements IItemHandlerModifiable {

IItemHandlerModifiable container;
public ItemContainerSwitchShim(IItemHandlerModifiable container) {
changeInventory(container);
}

public void changeInventory(IItemHandlerModifiable container) {
this.container = container;
}

@Override
public int getSlots() {
return this.container.getSlots();
}

@Nonnull
@Override
public ItemStack getStackInSlot(int slot) {
return this.container.getStackInSlot(slot);
}

@Nonnull
@Override
public ItemStack insertItem(int slot, @Nonnull ItemStack itemStack, boolean simulate) {
return this.container.insertItem(slot, itemStack, simulate);
}

@Nonnull
@Override
public ItemStack extractItem(int slot, int amount, boolean simulate) {
return this.container.extractItem(slot, amount, simulate);
}

@Override
public int getSlotLimit(int slot) {
return this.container.getSlotLimit(slot);
}

@Override
public boolean isItemValid(int slot, @NotNull ItemStack stack) {
return IItemHandlerModifiable.super.isItemValid(slot, stack);
}

@Override
public void setStackInSlot(int i, @Nonnull ItemStack itemStack) {
this.container.setStackInSlot(i, itemStack);
}
}
Loading

0 comments on commit f1802c8

Please sign in to comment.