Skip to content

Commit

Permalink
1.1
Browse files Browse the repository at this point in the history
- Flattened item structure before the 1.13 removal of metadata (Breaking change)
- New machine, The Loot Fabricator. All the existing pristine -> item recipes was moved to this machine
- Configurable loot tables for the Loot Fabricator.
- Added JEI support for the Loot Fabricator.
- Added support for Thermal Expansion mobs
- Added support for Twilight forest mobs (Split into 4 different zones)
- Fixed server start crashes.
- Added proper creative tab
- Made the Creeper, Skeleton & Zombie data models easier to acquire (No longer crafted with skulls)
- Added a recipe for chorus fruit (Extraterrestrial matter)
- Altered the Simulation chamber recipe to take a regular glass pane(Less microcrafting)
- Blank data models are now stackable
- Added some transmutational recipes
- Changed the polymer clay recipe (again)
- The different realm matters (Ow/Hellish/Terrestrial/Twilight) now grant experience when consumed.
  • Loading branch information
xt9 committed Jan 26, 2018
1 parent 89be4e0 commit 716a51c
Show file tree
Hide file tree
Showing 274 changed files with 4,426 additions and 1,710 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ build
# other
eclipse
run

# deps
deps
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ apply plugin: 'net.minecraftforge.gradle.forge'

def mcVersion = "1.12.2"
def modMajor = "1"
def modMinor = "0"
def modMinor = "1"
def modPatch = "0"


version = "${mcVersion}-${modMajor}.${modMinor}"
version = "${mcVersion}-${modMajor}.${modMinor}.${modPatch}"
group = "xt9.deepmoblearning" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "deepmoblearning"

Expand Down Expand Up @@ -51,6 +52,7 @@ repositories {
name = "ModMaven"
url = "modmaven.k-4u.nl"
}

}

dependencies {
Expand All @@ -62,6 +64,8 @@ dependencies {
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

compile files("deps/ThermalFoundation-1.12.2-2.3.7.18-universal.jar")
compile files("deps/twilightforest-1.12.2-3.5.263-universal.jar")
}

processResources {
Expand Down
19 changes: 18 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
# 1.12.2

### 1.1
- Flattened item structure before the 1.13 removal of metadata (Breaking change)
- New machine, The Loot Fabricator. All the existing pristine -> item recipes was moved to this machine
- Configurable loot tables for the Loot Fabricator.
- Added JEI support for the Loot Fabricator.
- Added support for Thermal Expansion mobs
- Added support for Twilight forest mobs (Split into 4 different zones)
- Fixed server start crashes.
- Added proper creative tab
- Made the Creeper, Skeleton & Zombie data models easier to acquire (No longer crafted with skulls)
- Added a recipe for chorus fruit (Extraterrestrial matter)
- Altered the Simulation chamber recipe to take a regular glass pane(Less microcrafting)
- Blank data models are now stackable
- Added some transmutational recipes
- Changed the polymer clay recipe (again)
- The different realm matters (Ow/Hellish/Terrestrial/Twilight) now grant experience when consumed.

### 1.0 (RC)
- Added Dragon & Slime Data models
- Added Pristine matter and resulting items for the Dragon & Slime model
- Added configuration options for RF/t costs on the data models.
- Added configuration options for pristine matter chance.
- Added configuration option for which side the Deep Learner overlay GUI should appear on.
- Added confiugration options for the required kills to tier up the models (and the kill multipliers).
- Added a Gui configuration screen.
- Added a Gui configuration screen.living_matter_overworldian.json
- Added a Factory class for mobmetadata and decoupled a lot of hardcoding from ItemMobChip
- Refactored MobMetaData classes to do their init in the factory

Expand Down
125 changes: 119 additions & 6 deletions src/main/java/xt9/deepmoblearning/DeepConstants.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package xt9.deepmoblearning;

import net.minecraftforge.fml.common.Loader;

/**
* Created by xt9 on 2017-06-08.
*/
Expand All @@ -11,25 +13,136 @@ public class DeepConstants {
// GUI ids
public static final int ITEM_DEEP_LEARNER_GUI_ID = 1;
public static final int TILE_SIMULATION_CHAMBER_GUI_ID = 2;
public static final int TILE_EXTRACTION_CHAMBER_GUI_ID = 3;

// Internal inventory sizes
public static final int DEEP_LEARNER_INTERNAL_SLOTS_SIZE = 4;
public static final int SIMULATION_CHAMBER_INTERNAL_SLOTS = 4;

// Slot references
public static final int SIMULATION_CHAMBER_CHIP_SLOT = 0;
public static final int SIMULATION_CHAMBER_DATA_MODEL_SLOT = 0;
public static final int SIMULATION_CHAMBER_INPUT_SLOT = 1;
public static final int SIMULATION_CHAMBER_OUTPUT_SLOT = 2;
public static final int SIMULATION_CHAMBER_PRISTINE_SLOT = 3;

public static final int EXTRACTION_CHAMBER_INPUT_SLOT = 0;

// Mob chip max tier
public static final int MOB_CHIP_MAXIMUM_TIER = 4;

// Config restraints
public static final int MAX_DATA_MODEL_COST = 6666;

public static final String[] MOBS = {"zombie", "skeleton", "blaze", "enderman", "wither", "witch", "spider", "creeper", "ghast", "witherskeleton", "slime", "dragon"};
public static final String[] ITEM_MOB_CHIP_KEYS = {"default", "zombie", "skeleton", "blaze", "enderman", "wither", "witch", "spider", "creeper", "ghast", "witherskeleton", "slime", "dragon"};
public static final String[] ITEM_LIVING_MATTER_KEYS = {"overworldian", "hellish", "extraterrestrial"};
public static final String[] ITEM_PRISTINE_MATTER_KEYS = MOBS;
// Loaded mod booleans
public static final boolean MOD_TE_LOADED = Loader.isModLoaded("thermalfoundation");
public static final boolean MOD_TWILIGHT_LOADED = Loader.isModLoaded("twilightforest");

public static final class LOOT {
public static final String[] CREEPER = {
"minecraft:gunpowder,64,0",
"minecraft:skull,6,4"
};

public static final String[] BLAZE = {
"minecraft:blaze_rod,22,0",
"thermalfoundation:material,32,771",
};

public static final String[] DRAGON = {
"minecraft:dragon_breath,32,0",
"minecraft:dragon_egg,1,0",
"draconicevolution:dragon_heart,1,0",
"draconicevolution:draconium_dust,64,0"
};

public static final String[] ENDERMAN = {
"minecraft:ender_pearl,6,0",
"minecraft:end_crystal,1,0"
};

public static final String[] GHAST = {
"minecraft:ghast_tear,8,0"
};

public static final String[] SKELETON = {
"minecraft:bone,64,0",
"minecraft:arrow,64,0",
"minecraft:skull,6,0",
};

public static final String[] SLIME = {
"minecraft:slime_ball,32,0",
};

public static final String[] SPIDER = {
"minecraft:spider_eye,16,0",
"minecraft:string,64,0",
"minecraft:web,8,0",
};

public static final String[] THERMALELEMENTAL = {
"thermalfoundation:material,16,772",
"thermalfoundation:material,16,770",
"minecraft:snowball,16,0",
"thermalfoundation:material,8,2050",
"thermalfoundation:material,8,2052",
"thermalfoundation:material,8,2048"
};

public static final String[] TWILIGHTFOREST = {
"twilightforest:naga_scale,16,0",
"twilightforest:charm_of_life_1,2,0",
"twilightforest:charm_of_keeping_1,2,0",
"minecraft:paper,64,0",
"minecraft:book,32,0",
};

public static final String[] TWILIGHTSWAMP = {
"twilightforest:steeleaf_ingot,16,0",
"twilightforest:ironwood_raw,8,0",
"twilightforest:fiery_ingot,5,0",
"twilightforest:hydra_chop,16,0",
"minecraft:gold_ingot,22,0",
"minecraft:red_mushroom,32,0",
"minecraft:slime_ball,16,0"
};

public static final String[] TWILIGHTDARKWOOD = {
"twilightforest:armor_shard_cluster,5,0",
"twilightforest:carminite,16,0",
"minecraft:diamond_ore,3,0",
"minecraft:emerald_ore,2,0",
"minecraft:fish,32,0"
};

public static final String[] TWILIGHTGLACIER = {
"twilightforest:arctic_fur,16,0",
"twilightforest:alpha_fur,8,0",
"minecraft:packed_ice,16,0",
"minecraft:feather,32,0",
"twilightforest:charm_of_life_2,1,0",
"twilightforest:charm_of_keeping_2,1,0",
};

public static final String[] WITCH = {
"minecraft:redstone,32,0",
"minecraft:glowstone_dust,32,0",
"minecraft:sugar,64,0",
};

public static final String[] WITHERSKELETON = {
"minecraft:skull,18,1",
"minecraft:coal,64,0"
};

public static final String[] WITHER = {
"minecraft:nether_star,3,0",
};

public static final String[] ZOMBIE = {
"minecraft:rotten_flesh,64,0",
"minecraft:iron_ingot,16,0",
"minecraft:carrot,32,0",
"minecraft:potato,32,0",
};
}
}
35 changes: 34 additions & 1 deletion src/main/java/xt9/deepmoblearning/DeepMobLearning.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package xt9.deepmoblearning;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -10,12 +12,20 @@
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.registries.IForgeRegistry;
import xt9.deepmoblearning.common.CommonProxy;
import xt9.deepmoblearning.common.Registry;
import xt9.deepmoblearning.common.config.Config;
import xt9.deepmoblearning.common.network.ConsumeLivingMatterMessage;
import xt9.deepmoblearning.common.network.ExtractionChamberChangePageMessage;
import xt9.deepmoblearning.common.network.ExtractorSetSelectedItemMessage;
import xt9.deepmoblearning.common.network.LevelUpModelMessage;

@Mod(modid = DeepConstants.MODID, version = DeepConstants.VERSION, useMetadata = true, guiFactory = "xt9.deepmoblearning.client.gui.config.GuiFactory")
@Mod(modid = DeepConstants.MODID, version = DeepConstants.VERSION, useMetadata = true, guiFactory = "xt9.deepmoblearning.client.gui.config.GuiFactory",
dependencies = "after:jei;after:thermalfoundation;after:twilightforest", acceptedMinecraftVersions = "[1.12,1.12.2]")
@Mod.EventBusSubscriber
public class DeepMobLearning {

Expand All @@ -25,11 +35,18 @@ public class DeepMobLearning {
@SidedProxy(clientSide="xt9.deepmoblearning.client.ClientProxy", serverSide="xt9.deepmoblearning.common.CommonProxy")
public static CommonProxy proxy;

public static SimpleNetworkWrapper network;

@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
Config.load();
Config.initConfigValues();

network = NetworkRegistry.INSTANCE.newSimpleChannel(DeepConstants.MODID);
network.registerMessage(ExtractorSetSelectedItemMessage.Handler.class, ExtractorSetSelectedItemMessage.class, 0, Side.SERVER);
network.registerMessage(ExtractionChamberChangePageMessage.Handler.class, ExtractionChamberChangePageMessage.class, 1, Side.SERVER);
network.registerMessage(LevelUpModelMessage.Handler.class, LevelUpModelMessage.class, 2, Side.SERVER);
network.registerMessage(ConsumeLivingMatterMessage.Handler.class, ConsumeLivingMatterMessage.class, 3, Side.SERVER);
proxy.preInit();
}

Expand Down Expand Up @@ -65,4 +82,20 @@ public void load(FMLInitializationEvent event) {
// must also be ready, so we have to register renderers during init, not earlier
proxy.registerRenderers();
}


public static CreativeTabs creativeTab = new CreativeTabs(DeepConstants.MODID) {

@SideOnly(Side.CLIENT)
@Override
public ItemStack getTabIconItem() {
return ItemStack.EMPTY;
}

@SideOnly(Side.CLIENT)
@Override
public ItemStack getIconItemStack() {
return new ItemStack(Registry.deepLearner, 1);
}
};
}
14 changes: 6 additions & 8 deletions src/main/java/xt9/deepmoblearning/client/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,29 @@
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.MinecraftForge;
import xt9.deepmoblearning.DeepConstants;
import xt9.deepmoblearning.DeepMobLearning;
import xt9.deepmoblearning.client.gui.ChipExperienceGui;
import xt9.deepmoblearning.client.gui.DataModelExperienceGui;
import xt9.deepmoblearning.client.gui.DeepLearnerGui;
import xt9.deepmoblearning.client.gui.ExtractionChamberGui;
import xt9.deepmoblearning.client.gui.SimulationChamberGui;
import xt9.deepmoblearning.common.CommonProxy;
import xt9.deepmoblearning.common.items.ItemBase;
import xt9.deepmoblearning.common.items.ItemDeepLearner;
import xt9.deepmoblearning.common.tiles.TileEntityExtractionChamber;
import xt9.deepmoblearning.common.tiles.TileEntitySimulationChamber;

/**
* Created by xt9 on 2017-06-08.
*/
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
MinecraftForge.EVENT_BUS.register(new ChipExperienceGui(Minecraft.getMinecraft()));
MinecraftForge.EVENT_BUS.register(new DataModelExperienceGui(Minecraft.getMinecraft()));
}

public void registerItemRenderer(Item item, int meta, String id) {
ResourceLocation location = new ResourceLocation(DeepConstants.MODID, id);

if(item instanceof ItemBase) {
ItemBase itemBase = (ItemBase) item;

if(itemBase.hasSubTypes()) {
location = new ResourceLocation(DeepConstants.MODID, id + "/" + itemBase.getSubNames()[meta]);
}
}

ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(location, "inventory"));
Expand All @@ -55,6 +51,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int
switch (ID) {
case DeepConstants.TILE_SIMULATION_CHAMBER_GUI_ID:
return new SimulationChamberGui((TileEntitySimulationChamber) world.getTileEntity(new BlockPos(x, y, z)), player.inventory, world);
case DeepConstants.TILE_EXTRACTION_CHAMBER_GUI_ID:
return new ExtractionChamberGui((TileEntityExtractionChamber) world.getTileEntity(new BlockPos(x, y, z)), player.inventory, world);
default:
return null;
}
Expand Down
Loading

0 comments on commit 716a51c

Please sign in to comment.