Skip to content

Commit

Permalink
0.10
Browse files Browse the repository at this point in the history
- Buffed the pristine spider matter (spider eyes)
- Added creative item for data model leveling
- The deep learner now only opens while not holding shift or ctrl
    (to avoid screwing up sneaking/block placing scenarios)
- Bumped the max input rf/t for the Simulation chamber to 25k rf/t
- Bumped the internal rf buffer of the Simulation chamber to 2 million
- Slightly changed the Polymer clay recipe
  • Loading branch information
xt9 committed Dec 26, 2017
1 parent 7de5a7b commit 8cd0864
Show file tree
Hide file tree
Showing 17 changed files with 121 additions and 44 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ apply plugin: 'net.minecraftforge.gradle.forge'

def mcVersion = "1.12.2"
def modMajor = "0"
def modMinor = "9"
def modMinor = "10"


version = "${mcVersion}-${modMajor}.${modMinor}"
group = "xt9.deepmoblearning" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down Expand Up @@ -87,7 +88,6 @@ processResources {
sourceSets {
main {
java {
exclude '**/DevSpawn.java'
exclude '**/DevTooltip.java'
}
}
Expand Down
19 changes: 17 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 1.12.2
## 0.9
First beta version.


### 0.10
- Buffed the pristine spider matter (spider eyes)
- Added creative item for data model leveling
- The deep learner now only opens while not holding shift or ctrl
(to avoid screwing up sneaking/block placing scenarios)
- Bumped the max input rf/t for the Simulation chamber to 25k rf/t
- Bumped the internal rf buffer of the Simulation chamber to 2 million
- Slightly changed the Polymer clay recipe

### 0.9.0
- Added the remaining textures needed
- Mob chips now have different rf/t simulation costs in the simulation chamber
- Added charred redstone/plates to avoid mod recipe collisions
- Added more transmution recipes
- Data model leveling tweaked to be easier
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/xt9/deepmoblearning/common/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ public class Registry {
public static BlockSimulationChamber blockSimulationChamber;

public static NonNullList<ItemBase> items = NonNullList.create();
public static Item simulationChamber;
public static ItemPolymerClay polymerClay;
public static ItemCharredRedstone charredRedstone;
public static ItemCharredPlate charredPlate;
public static ItemLivingMatter livingMatter;
public static ItemPristineMatter pristineMatter;
public static ItemDeepLearner deepLearner;
public static ItemMobChip mobChip;
public static Item simulationChamber;
public static ItemCreativeModelLearner cml;

public static void registerBlocks(IForgeRegistry registry) {
blockSimulationChamber = new BlockSimulationChamber();
Expand Down Expand Up @@ -55,6 +56,8 @@ public static void registerItems(IForgeRegistry registry) {
items.add(livingMatter);
pristineMatter = new ItemPristineMatter();
items.add(pristineMatter);
cml = new ItemCreativeModelLearner();
items.add(cml);

for (Item item : items) {
registry.register(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import xt9.deepmoblearning.DeepMobLearning;
import xt9.deepmoblearning.common.items.ItemBase;

/**
* Created by xt9 on 2017-06-15.
Expand Down
28 changes: 0 additions & 28 deletions src/main/java/xt9/deepmoblearning/common/events/DevSpawn.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import xt9.deepmoblearning.common.items.ItemDeepLearner;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package xt9.deepmoblearning.common.items;

import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
import xt9.deepmoblearning.DeepConstants;
import xt9.deepmoblearning.common.CommonProxy;
import xt9.deepmoblearning.common.util.KeyboardHelper;

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

public class ItemCreativeModelLearner extends ItemBase {
public ItemCreativeModelLearner() {
super("creative_model_learner", 1);
}

@Override
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer player, @Nullable EnumHand hand) {
NonNullList<ItemStack> inv1 = player.inventory.mainInventory;
NonNullList<ItemStack> inv2 = player.inventory.offHandInventory;

if(!player.world.isRemote) {
if(KeyboardHelper.isHoldingShift()) {
findAndLevelUpModels(inv1, player, true);
findAndLevelUpModels(inv2, player, true);
} else if(KeyboardHelper.isHoldingCTRL()) {
findAndLevelUpModels(inv1, player, false);
findAndLevelUpModels(inv2, player, false);
}
}


return new ActionResult(EnumActionResult.PASS, player.getHeldItem(hand));
}

public void findAndLevelUpModels(NonNullList<ItemStack> inventory, EntityPlayer player, boolean increaseWholeTier) {
for(ItemStack inventoryStack : inventory) {
if (inventoryStack.getItem() instanceof ItemDeepLearner) {
NonNullList<ItemStack> deepLearnerInternalInv = ItemDeepLearner.getContainedItems(inventoryStack);
for (ItemStack stack : deepLearnerInternalInv) {
if (stack.getItem() instanceof ItemMobChip) {
int tier = ItemMobChip.getTier(stack);
if(tier != DeepConstants.MOB_CHIP_MAXIMUM_TIER) {
if(increaseWholeTier) {
ItemMobChip.setTier(stack, (tier + 1));
} else {
ItemMobChip.increaseMobKillCount(stack, player);
}
}

}
ItemDeepLearner.setContainedItems(inventoryStack, deepLearnerInternalInv);
}
}
}
}

@Override
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> list, ITooltipFlag flagIn) {
if(!KeyboardHelper.isHoldingShift()) {
list.add(I18n.format("deepmoblearning.holdshift"));
} else {
list.add("A creative item that levels up data models inside the Deep Learner." );
list.add("§r§oSHIFT§r§7 + §r§oRIGHT§r§7 click to increase tier.§r" );
list.add("§r§oCTRL§r§7 + §r§oRIGHT§r§7 click to simulate kills.§r" );
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public ItemDeepLearner() {
@Override
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer player, @Nullable EnumHand hand)
{
CommonProxy.openItemGui(player, hand == EnumHand.MAIN_HAND ? EntityEquipmentSlot.MAINHAND : EntityEquipmentSlot.OFFHAND);
if(!KeyboardHelper.isHoldingShift() && !KeyboardHelper.isHoldingCTRL()) {
CommonProxy.openItemGui(player, hand == EnumHand.MAIN_HAND ? EntityEquipmentSlot.MAINHAND : EntityEquipmentSlot.OFFHAND);
}
return new ActionResult(EnumActionResult.PASS, player.getHeldItem(hand));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static String getTierName(ItemStack stack, boolean getNextTierName) {
}
}

// Called by deep learners
// Called by Deep learners
public static void increaseMobKillCount(ItemStack stack, EntityPlayer player) {
// Get our current tier before increasing the kill count;
int tier = getTier(stack);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class TileEntitySimulationChamber extends TileEntity implements ITickable, IGuiTile {
private SimulationChamberHandler inventory = new SimulationChamberHandler();
// Attach a DeepEnergyStorage, don't let it extract energy (It's not a generator)
private DeepEnergyStorage energyStorage = new DeepEnergyStorage(1000000, 1024 , 0, 0);
private DeepEnergyStorage energyStorage = new DeepEnergyStorage(2000000, 25600 , 0, 0);

public HashMap<String, Animation> simulationAnimations = new HashMap<>();
public HashMap<String, String> simulationText = new HashMap<>();
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/deepmoblearning/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ item.deepmoblearning.polymer_clay.name=Polymer Clay
item.deepmoblearning.charred_redstone.name=Charred Redstone
item.deepmoblearning.charred_plate.name=Charred Plate
item.deepmoblearning.deep_learner.name=§bDeep Learner§r
item.deepmoblearning.creative_model_learner.name=Creative Model Learner

item.deepmoblearning.mob_chip.default.name=Data Model Chip
item.deepmoblearning.mob_chip.zombie.name=§bZombie Data Model§r
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "deepmoblearning:items/creative_model_learner"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
],
"result": {
"item": "minecraft:spider_eye",
"count": 8
"count": 16
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"RDR",
"GCI",
"RDR"
"GCR",
"CDC",
"RCI"
],
"key": {
"R": { "item": "deepmoblearning:charred_redstone", "data": 0 },
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8cd0864

Please sign in to comment.