diff options
| author | Technus <daniel112092@gmail.com> | 2017-08-14 14:47:06 +0200 |
|---|---|---|
| committer | Technus <daniel112092@gmail.com> | 2017-08-14 14:47:06 +0200 |
| commit | f1f31e9e3ad4185295c18c50634cafa093e6e256 (patch) | |
| tree | 70fe2701ca481d5bd2d7a3630eb81cafd66842c0 /src/main | |
| parent | e344fe9fd7d351cdf0609a714b79b74a044b46d1 (diff) | |
| download | GT5-Unofficial-f1f31e9e3ad4185295c18c50634cafa093e6e256.tar.gz GT5-Unofficial-f1f31e9e3ad4185295c18c50634cafa093e6e256.tar.bz2 GT5-Unofficial-f1f31e9e3ad4185295c18c50634cafa093e6e256.zip | |
Merge
Diffstat (limited to 'src/main')
54 files changed, 1452 insertions, 842 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index f6d5fecbd5..34426b0075 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -26,7 +26,7 @@ import net.minecraftforge.fluids.FluidStack; import java.util.HashMap; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, dependencies = "required-after:Forge@[10.13.4.1614,);" - + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;") + + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;" + "after:miscutils;") public class TecTech { @SidedProxy(clientSide = Reference.CLIENTSIDE, serverSide = Reference.SERVERSIDE) public static CommonProxy proxy; diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index cf039bcb8d..27f1c8377b 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -12,6 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; @@ -307,17 +308,29 @@ public class Util { byte[] blockMeta,//use numbers 0-9 for casing types int horizontalOffset, int verticalOffset, int depthOffset, IGregTechTileEntity aBaseMetaTileEntity, boolean hintsOnly) { - World world = aBaseMetaTileEntity.getWorld(); + byte facing = aBaseMetaTileEntity.getFrontFacing(); + return StructureBuilder(structure,blockType,blockMeta, + horizontalOffset,verticalOffset,depthOffset, + aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()), + facing,hintsOnly); + } + + public static boolean StructureBuilder(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks + Block[] blockType,//use numbers 0-9 for casing types + byte[] blockMeta,//use numbers 0-9 for casing types + int horizontalOffset, int verticalOffset, int depthOffset, + TileEntity tileEntity, int facing, boolean hintsOnly) { + if(!tileEntity.hasWorldObj()) return false; + World world = tileEntity.getWorldObj(); if ((world.isRemote && !hintsOnly)||(!world.isRemote && hintsOnly)) return false; //TE Rotation - byte facing = aBaseMetaTileEntity.getFrontFacing(); int x, y, z, a, b, c, pointer; final int - baseX=aBaseMetaTileEntity.getXCoord(), - baseZ=aBaseMetaTileEntity.getZCoord(), - baseY=aBaseMetaTileEntity.getYCoord(); + baseX=tileEntity.xCoord, + baseZ=tileEntity.zCoord, + baseY=tileEntity.yCoord; //a,b,c - relative to block face! //x,y,z - relative to block position on map! @@ -393,18 +406,8 @@ public class Util { TecTech.proxy.hint_particle(world,x, y, z, blockType[pointer], blockMeta[pointer]); } else if ((pointer = block - ' ') >= 0) { switch(pointer){ - case 0: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 0); break; - case 1: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 1); break; - case 2: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 2); break; - case 3: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 3); break; - case 4: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 4); break; - case 5: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 5); break; - case 6: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 6); break; - case 7: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 7); break; - case 8: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 8); break; - case 9: TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 9); break; - case 10:TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 10); break; - case 11:TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 11); break; + case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: + TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, pointer); break; default:TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 12); } } else TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 15); @@ -422,18 +425,8 @@ public class Util { world.setBlock(x, y, z, blockType[pointer], blockMeta[pointer], 2); } else if ((pointer = block - ' ') >= 0) { switch(pointer){ - case 0: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 0, 2); break; - case 1: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 1,2); break; - case 2: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 2,2); break; - case 3: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 3,2); break; - case 4: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 4,2); break; - case 5: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 5, 2); break; - case 6: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 6, 2); break; - case 7: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 7,2); break; - case 8: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 8,2); break; - case 9: world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 9,2); break; - case 10:world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 10,2); break; - case 11:world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 11, 2); break; + case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: + world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, pointer, 2); break; default:world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 12, 2); } } else world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 15,2); @@ -791,4 +784,21 @@ public class Util { public static String getUniqueIdentifier(ItemStack is) { return GameRegistry.findUniqueIdentifierFor(is.getItem()).modId + ":" + is.getUnlocalizedName(); } + + + public static final String[] VN = new String[]{"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV", "UIV", "UMV", "UXV", "OpV", "MAX"}; + public static final long[] V = new long[]{8L, 32L, 128L, 512L, 2048L, 8192L, 32768L, 131072L, 524288L, 2097152L, 8388608L, 33554432L, 134217728L, 536870912L, 1073741824L, Integer.MAX_VALUE-7}; + + public static byte getTier(long l) { + byte i = -1; + + do { + ++i; + if (i >= V.length) { + return i; + } + } while(l > V[i]); + + return i; + } } diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictDequantizationInfo.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictDequantizationInfo.java index bd9da066b2..0f71d1e017 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictDequantizationInfo.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictDequantizationInfo.java @@ -26,12 +26,18 @@ public class aOredictDequantizationInfo implements iExchangeInfo { amount = qty; } - public aOredictDequantizationInfo(iHasElementalDefinition emIn, OrePrefixes prefix, Materials material, int qty) { + public aOredictDequantizationInfo(iHasElementalDefinition emIn, OrePrefixes prefix, Materials material, int qty) { in = emIn; out = OreDictionary.getOreID(prefix.name() + material.mName); amount = qty; } + public aOredictDequantizationInfo(iHasElementalDefinition emIn, OrePrefixes prefix, String materialName, int qty) { + in = emIn; + out = OreDictionary.getOreID(prefix.name() + materialName); + amount = qty; + } + @Override public iHasElementalDefinition input() { return in.clone();//MEH! diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictQuantizationInfo.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictQuantizationInfo.java index d285fddbdc..61c6a39064 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictQuantizationInfo.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/aOredictQuantizationInfo.java @@ -32,6 +32,12 @@ public class aOredictQuantizationInfo implements iExchangeInfo { out=emOut; } + public aOredictQuantizationInfo( OrePrefixes prefix, String materialName, int qty, iHasElementalDefinition emOut){ + in=OreDictionary.getOreID(prefix.name() + materialName); + amount=qty; + out=emOut; + } + @Override public Integer input() { return in; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/bTransformationInfo.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/bTransformationInfo.java index 9c9b4779ff..5434c65d8f 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/bTransformationInfo.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/bTransformationInfo.java @@ -75,8 +75,13 @@ public class bTransformationInfo { oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,name,qty)); } - public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, Materials material, int qty){ + public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, Materials material, int qty){ oredictQuantization.put(OreDictionary.getOreID(prefix.name() + material.mName),new aOredictQuantizationInfo(prefix,material,qty,em)); oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,prefix,material,qty)); } + + public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, String materialName, int qty){ + oredictQuantization.put(OreDictionary.getOreID(prefix.name() + materialName),new aOredictQuantizationInfo(prefix,materialName,qty,em)); + oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,prefix,materialName,qty)); + } } diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/dAtomDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/dAtomDefinition.java index 81be90e62f..5108c409cd 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/dAtomDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/dAtomDefinition.java @@ -4,6 +4,8 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.auxiliary.TecTechConfig; import com.github.technus.tectech.elementalMatter.classes.*; import com.github.technus.tectech.elementalMatter.interfaces.iElementalDefinition; +import com.github.technus.tectech.gtppAddon.GtppAtomLoader; +import cpw.mods.fml.common.Loader; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.objects.XSTR; @@ -727,6 +729,8 @@ public final class dAtomDefinition extends cElementalDefinition { } catch (tElementalException e) { if (TecTechConfig.DEBUG_MODE) e.printStackTrace(); } + + if(Loader.isModLoaded("miscutils")) new GtppAtomLoader().run(); } public static dAtomDefinition getFirstStableIsotope(int element) { diff --git a/src/main/java/com/github/technus/tectech/gtppAddon/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/gtppAddon/GtppAtomLoader.java new file mode 100644 index 0000000000..1cefb4c170 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/gtppAddon/GtppAtomLoader.java @@ -0,0 +1,45 @@ +package com.github.technus.tectech.gtppAddon; + +import com.github.technus.tectech.elementalMatter.classes.cElementalDefinitionStack; +import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MaterialGenerator; + +import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.getBestUnstableIsotope; +import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.getFirstStableIsotope; +import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.transformation; + +public class GtppAtomLoader implements Runnable{ + @Override + public void run() { + transformation.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(10), 144), ELEMENT.getInstance().NEON.getFluid(144)); + MaterialGenerator.generate(ELEMENT.getInstance().GERMANIUM); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(32), 144), OrePrefixes.dust, ELEMENT.getInstance().GERMANIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(34), 144), OrePrefixes.dust, ELEMENT.getInstance().SELENIUM.getUnlocalizedName(),1); + transformation.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(35), 144), ELEMENT.getInstance().BROMINE.getFluid(144)); + transformation.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(36), 144), ELEMENT.getInstance().KRYPTON.getFluid(144)); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(40), 144),OrePrefixes.dust, ELEMENT.getInstance().ZIRCONIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(43), 144),OrePrefixes.dust, ELEMENT.getInstance().TECHNETIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(44), 144),OrePrefixes.dust, ELEMENT.getInstance().RUTHENIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(45), 144),OrePrefixes.dust, ELEMENT.getInstance().RHODIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(53), 144),OrePrefixes.dust, ELEMENT.getInstance().IODINE.getUnlocalizedName(),1); + transformation.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(54), 144),ELEMENT.getInstance().XENON.getFluid(144)); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(72), 144),OrePrefixes.dust, ELEMENT.getInstance().HAFNIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(75), 144),OrePrefixes.dust, ELEMENT.getInstance().RHENIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(81), 144),OrePrefixes.dust, ELEMENT.getInstance().THALLIUM.getUnlocalizedName(),1); + + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(84),144),OrePrefixes.dust, ELEMENT.getInstance().POLONIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(85),144),OrePrefixes.dust, ELEMENT.getInstance().ASTATINE.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(87),144),OrePrefixes.dust, ELEMENT.getInstance().FRANCIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(88),144),OrePrefixes.dust, ELEMENT.getInstance().RADIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(89),144),OrePrefixes.dust, ELEMENT.getInstance().ACTINIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(91),144),OrePrefixes.dust, ELEMENT.getInstance().PROTACTINIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(93),144),OrePrefixes.dust, ELEMENT.getInstance().NEPTUNIUM.getUnlocalizedName(),1); + + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(96),144),OrePrefixes.dust, ELEMENT.getInstance().CURIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(97),144),OrePrefixes.dust, ELEMENT.getInstance().BERKELIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(98),144),OrePrefixes.dust, ELEMENT.getInstance().CALIFORNIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(99),144),OrePrefixes.dust, ELEMENT.getInstance().EINSTEINIUM.getUnlocalizedName(),1); + transformation.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(100),144),OrePrefixes.dust, ELEMENT.getInstance().FERMIUM.getUnlocalizedName(),1); + } +} diff --git a/src/main/java/com/github/technus/tectech/loader/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/BloodyRecipeLoader.java new file mode 100644 index 0000000000..b07aeb9bd8 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/loader/BloodyRecipeLoader.java @@ -0,0 +1,11 @@ +package com.github.technus.tectech.loader; + +/** + * Created by Tec on 06.08.2017. + */ +public class BloodyRecipeLoader implements Runnable { + @Override + public void run() { + + } +} diff --git a/src/main/java/com/github/technus/tectech/loader/RecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/RecipeLoader.java index cfa6191a6f..3e99920c9e 100644 --- a/src/main/java/com/github/technus/tectech/loader/RecipeLoader.java +++ b/ |
