Skip to content

Commit

Permalink
tfg craftable
Browse files Browse the repository at this point in the history
  • Loading branch information
pWn3d1337 committed Nov 21, 2017
1 parent ac7d1be commit 93deeac
Show file tree
Hide file tree
Showing 16 changed files with 192 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/main/java/techguns/TGItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public class TGItems implements ITGInitializer{
/**
* TODO DISABLE THIS BEFORE RELEASE
*/
public static boolean WRITE_ITEM_JSON = false;
public static boolean WRITE_ITEM_JSON = true;
/**
* TODO DISABLE THIS BEFORE RELEASE
*/
public static boolean WRITE_RECIPES = false;
public static boolean WRITE_RECIPES = true;


public static final ArrayList<GenericItem> ITEMLIST = new ArrayList<>();
Expand Down Expand Up @@ -215,6 +215,10 @@ public class TGItems implements ITGInitializer{
public static ItemStack ROCKET_NUKE;
public static ItemStack TACTICAL_NUKE_WARHEAD;

public static ItemStack BARREL_TITANIUM;
public static ItemStack RECEIVER_TITANIUM;
public static ItemStack PLASMA_GENERATOR;

/**
* ADDITONAL SLOT ITEMS
*/
Expand Down Expand Up @@ -437,6 +441,10 @@ public void preInit(FMLPreInitializationEvent event) {

BARREL_GAUSS = SHARED_ITEM.addsharedVariant("gaussbarrel");

BARREL_TITANIUM = SHARED_ITEM.addsharedVariant("shieldedtitaniumbarrel");
RECEIVER_TITANIUM = SHARED_ITEM.addsharedVariant("titaniumreceiver");
PLASMA_GENERATOR = SHARED_ITEM.addsharedVariant("plasmagenerator");

/**
* Additional Slot items
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/techguns/TGuns.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void preInit(FMLPreInitializationEvent event) {
BIOGUN_PROJECTILES = new ChargedProjectileSelector<BioGunProjectile>(AmmoTypes.BIO_TANK, new BioGunProjectile.Factory());
CHAINSAW_PROJECTILES = new ChargedProjectileSelector<ChainsawProjectile>(AmmoTypes.FUEL_TANK, new ChainsawProjectile.Factory());
GUIDED_MISSILE_PROJECTILES = new ChargedProjectileSelector<GuidedMissileProjectile>(AmmoTypes.ROCKETS, new GuidedMissileProjectile.Factory(), new GuidedMissileProjectile.Factory());
TFG_PROJECTILES = new ChargedProjectileSelector<TFGProjectile>(AmmoTypes.BIO_TANK, new TFGProjectile.Factory());
TFG_PROJECTILES = new ChargedProjectileSelector<TFGProjectile>(AmmoTypes.NUCLEAR_POWER_CELL, new TFGProjectile.Factory());

handcannon = new GenericGun("handcannon", new ProjectileSelector<StoneBulletProjectile>(AmmoTypes.STONE_BULLETS, new StoneBulletProjectile.Factory()), true, 12,1,30, 8.0f, TGSounds.HANDGUN_FIRE, TGSounds.HANDGUN_RELOAD,25,0.035f).setBulletSpeed(0.9f).setGravity(0.015d).setDamageDrop(10, 25, 5.0f).setAIStats(RANGE_CLOSE, 60, 0, 0).setTexture("textures/guns/handgun").setRecoiltime(12);//.setMuzzleParticle(2,0.2f);

Expand Down
13 changes: 12 additions & 1 deletion src/main/java/techguns/recipes/Recipewriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
import static techguns.TGuns.teslagun;
import static techguns.TGuns.thompson;
import static techguns.TGuns.vector;
import static techguns.TGuns.*;

import java.util.Arrays;

Expand Down Expand Up @@ -417,6 +418,13 @@ public static void registerItemRecipes(){

RecipeJsonConverter.addShapedRecipe(newStack(TGItems.BARREL_GAUSS,1), "pww","bbc", "pww", 'p', "plateTitanium", 'w', "wireGold", 'b', TGItems.BARREL_CARBON, 'c', "circuitElite");

RecipeJsonConverter.addShapedRecipe(newStack(TGItems.BARREL_TITANIUM,1), "tct","lbl", "tct", 't', "plateTitanium", 'l', "plateLead", 'b', TGItems.BARREL_CARBON, 'c', "circuitElite");

RecipeJsonConverter.addShapedRecipe(newStack(TGItems.RECEIVER_TITANIUM,1), "ttt"," rc"," t", 't', "plateTitanium", 'r', TGItems.RECEIVER_CARBON, 'c', "circuitElite");

RecipeJsonConverter.addShapedRecipe(newStack(TGItems.PLASMA_GENERATOR,1), "lcl","eae","lcl", 'l', "plateLead", 'a', TGItems.ANTI_GRAV_CORE, 'c', TGItems.COIL, 'e', TGItems.ENRICHED_URANIUM);


String[] plateTypes = {"plateIron", "plateTin"};
Arrays.stream(plateTypes).forEach(p -> {
RecipeJsonConverter.addShapedRecipe(new ItemStack(TGItems.DOOR3x3,2,0), "ppp", "sps","ppp", 's', Blocks.PISTON, 'p', p);
Expand Down Expand Up @@ -562,7 +570,10 @@ public static void addGunRecipes() {

RecipeJsonConverter.addShapedRecipe(new ItemStack(gaussrifle,1),"dpc","brs"," ae", 'b', TGItems.BARREL_GAUSS, 'r', TGItems.RECEIVER_CARBON, 's', TGItems.STOCK_CARBON, 'e', TGItems.ENERGY_CELL, 'a', TGItems.GAUSSRIFLE_SLUGS, 'd', "gemDiamond", 'p', "plateTitanium", 'c', "circuitElite");
RecipeJsonConverter.addShapedRecipe(new ItemStack(gaussrifle,1, gaussrifle.getMaxDamage()),"dpc","brs"," e", 'b', TGItems.BARREL_GAUSS, 'r', TGItems.RECEIVER_CARBON, 's', TGItems.STOCK_CARBON, 'e', TGItems.ENERGY_CELL_EMPTY, 'd', "gemDiamond", 'p', "plateTitanium", 'c', "circuitElite");


RecipeJsonConverter.addShapedRecipe(new ItemStack(tfg,1),"t ","bpr","tn ", 'b', TGItems.BARREL_TITANIUM, 'r', TGItems.RECEIVER_TITANIUM, 't', "plateTitanium", 'n', TGItems.NUCLEAR_POWERCELL, 'p', TGItems.PLASMA_GENERATOR);
RecipeJsonConverter.addShapedRecipe(new ItemStack(tfg,1,tfg.getMaxDamage()),"t ","bpr","tn ", 'b', TGItems.BARREL_TITANIUM, 'r', TGItems.RECEIVER_TITANIUM, 't', "plateTitanium", 'n', TGItems.NUCLEAR_POWERCELL_EMPTY, 'p', TGItems.PLASMA_GENERATOR);

}

public static void addArmorRecipes() {
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/techguns/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ item.techguns.pistol.name=Pistol
item.techguns.heavycloth.name=Heavy Cloth
item.techguns.gaussrifleslugs.name=Gauss Rifle Slugs
item.techguns.gaussbarrel.name=Gauss Rifle Barrel
item.techguns.shieldedtitaniumbarrel.name=Shielded Titanium Barrel
item.techguns.titaniumreceiver.name=Titanium Receiver
item.techguns.plasmagenerator.name=Plasma Generator
techguns.armorTooltip.armorvalue=Armor Value
techguns.armorTooltip.durability=Durability
techguns.armorTooltip.healthbonus=Health Bonus
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "techguns:items/plasmagenerator"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "techguns:items/shieldedtitaniumbarrel"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "techguns:items/titaniumreceiver"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"result": {
"item": "techguns:itemshared",
"data": 129
},
"pattern": [
"tct",
"lbl",
"tct"
],
"type": "forge:ore_shaped",
"key": {
"b": {
"item": "techguns:itemshared",
"data": 40
},
"c": {
"item": "#CIRCUITELITE"
},
"t": {
"item": "#PLATETITANIUM"
},
"l": {
"item": "#PLATELEAD"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"result": {
"item": "techguns:itemshared",
"data": 130
},
"pattern": [
"ttt",
" rc",
" t"
],
"type": "forge:ore_shaped",
"key": {
"r": {
"item": "techguns:itemshared",
"data": 36
},
"c": {
"item": "#CIRCUITELITE"
},
"t": {
"item": "#PLATETITANIUM"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"result": {
"item": "techguns:itemshared",
"data": 131
},
"pattern": [
"lcl",
"eae",
"lcl"
],
"type": "forge:ore_shaped",
"key": {
"a": {
"item": "techguns:itemshared",
"data": 92
},
"c": {
"item": "techguns:itemshared",
"data": 68
},
"e": {
"item": "techguns:itemshared",
"data": 98
},
"l": {
"item": "#PLATELEAD"
}
}
}
32 changes: 32 additions & 0 deletions src/main/resources/assets/techguns/recipes/tfg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"result": {
"item": "techguns:tfg"
},
"pattern": [
"t ",
"bpr",
"tn "
],
"type": "forge:ore_shaped",
"key": {
"p": {
"item": "techguns:itemshared",
"data": 131
},
"b": {
"item": "techguns:itemshared",
"data": 129
},
"r": {
"item": "techguns:itemshared",
"data": 130
},
"t": {
"item": "#PLATETITANIUM"
},
"n": {
"item": "techguns:itemshared",
"data": 31
}
}
}
33 changes: 33 additions & 0 deletions src/main/resources/assets/techguns/recipes/tfg_alt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"result": {
"item": "techguns:tfg",
"data": 20
},
"pattern": [
"t ",
"bpr",
"tn "
],
"type": "forge:ore_shaped",
"key": {
"p": {
"item": "techguns:itemshared",
"data": 131
},
"b": {
"item": "techguns:itemshared",
"data": 129
},
"r": {
"item": "techguns:itemshared",
"data": 130
},
"t": {
"item": "#PLATETITANIUM"
},
"n": {
"item": "techguns:itemshared",
"data": 32
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"animation": {}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 93deeac

Please sign in to comment.