Misc Additions (#62)

* Fix Tinker Addons

Fixed clay cast taking over the registry name of standard casts
Added missing resources for molten quartz item (used by Iguana Tinker Tweaks)

* Prevent casting recipes of invalid clay casts

* Seared Channel

* Blank Clay Cast

* Enhance readability
This commit is contained in:
DrParadox7 authored and GitHub committed 2022-12-29 19:50:06 +01:00
1 parent 7ff7f25f73
commit 85e690c6b7
6 files changed
+55 -7

No files matched your search

@@ -765,7 +765,7 @@ public class TinkerSmeltery {
GameRegistry.addRecipe(
new ItemStack(TinkerSmeltery.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin
GameRegistry.addRecipe(
new ItemStack(TinkerSmeltery.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel
new ItemStack(TinkerSmeltery.castingChannel, 4, 1), "b b", "bbb", 'b', searedBrick); // Channel
// Slab Smeltery Components Recipes
for (int i = 0; i < 7; i++) {
@@ -1088,7 +1088,9 @@ public class TinkerSmeltery {
/ 2;
ItemStack metalCast = new ItemStack(TinkerTools.patternOutputs[iter], 1, liquidDamage[iterTwo]);
tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, fluidAmount), cast, 50);
tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, fluidAmount), clay_cast, true, 50);
if (isValidClayCast(iter)) {
tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, fluidAmount), clay_cast, true, 50);
}
Smeltery.addMelting(FluidType.getFluidType(fs), metalCast, 0, fluidAmount);
}
}
@@ -2033,4 +2035,8 @@ public class TinkerSmeltery {
return fluid;
}
public boolean isValidClayCast(int meta) {
return meta < 14 || meta == 22 || meta == 25;
}
}
@@ -1,11 +1,16 @@
package tconstruct.smeltery.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.*;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.*;
import tconstruct.library.TConstructRegistry;
import tconstruct.smeltery.TinkerSmeltery;
@@ -25,6 +30,14 @@ public class CastingChannelBlock extends BlockContainer {
setCreativeTab(TConstructRegistry.blockTab);
}
public String[] textureNames = new String[] {"searedstone", "nether_searedstone"};
public IIcon[] icons;
/* Rendering */
public String[] getTextureNames() {
return textureNames;
}
@Override
public boolean onBlockActivated(
World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
@@ -71,13 +84,34 @@ public class CastingChannelBlock extends BlockContainer {
return BlockRenderCastingChannel.renderID;
}
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("tinker:searedstone");
this.icons = new IIcon[textureNames.length];
for (int i = 0; i < this.icons.length; ++i) {
this.icons[i] = iconRegister.registerIcon("tinker:" + textureNames[i]);
}
}
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
public int damageDropped(int meta) {
return meta;
}
@Override
public TileEntity createNewTileEntity(World var1, int metadata) {
return new CastingChannelLogic();
}
@Override
public void getSubBlocks(Item id, CreativeTabs tab, List list) {
list.add(new ItemStack(id, 1, 0));
list.add(new ItemStack(id, 1, 1));
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if (meta == 0) return icons[0];
else return icons[1];
}
}
@@ -186,7 +186,7 @@ public class TinkerTools {
// Items
TinkerTools.titleIcon = new TitleIcon().setUnlocalizedName("tconstruct.titleicon");
GameRegistry.registerItem(TinkerTools.titleIcon, "titleIcon");
String[] blanks = new String[] {"blank_pattern", "blank_cast", "blank_cast"};
String[] blanks = new String[] {"blank_pattern", "blank_cast", "blank_cast", "blank_clay_cast"};
TinkerTools.blankPattern = new CraftAchievementItem(
blanks, blanks, "materials/", "tinker", TConstructRegistry.materialTab, "tconstruct.pattern")
.setUnlocalizedName("tconstruct.Pattern");
@@ -278,10 +278,17 @@ public class TinkerWeaponry {
int fluidAmount = metalPattern.getPatternCost(cast) * TConstruct.ingotLiquidValue / 2;
ItemStack metalCast = new ItemStack(patternOutputs[i], 1, liquidDamage[iterTwo]);
tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, fluidAmount), cast, 50);
tableCasting.addCastingRecipe(metalCast, new FluidStack(fs, fluidAmount), clay_cast, true, 50);
Smeltery.addMelting(FluidType.getFluidType(fs), metalCast, 0, fluidAmount);
}
}
//Register clay part casting for BowLimbs
for (int iterTwo = 0; iterTwo < TinkerSmeltery.liquids.length; iterTwo++) {
Fluid fs = TinkerSmeltery.liquids[iterTwo].getFluid();
ItemStack clay_cast = new ItemStack(clayPattern, 1, 3);
int fluidAmount = clayPattern.getPatternCost(clay_cast) * TConstruct.ingotLiquidValue / 2;
tableCasting.addCastingRecipe(new ItemStack(patternOutputs[3], 1, liquidDamage[iterTwo]), new FluidStack(fs, fluidAmount), clay_cast, true, 50);
}
ItemStack cast = new ItemStack(TinkerSmeltery.metalPattern, 1, 25);
ItemStack clay_cast = new ItemStack(TinkerSmeltery.clayPattern, 1, 25);