Browse Source

Railcraft Firestone things

Gregorius Techneticies 2 months ago
parent
commit
4359e31b97
Signed by: Gregorius Techneticies <gregoriustech@gmail.com> GPG Key ID: 1B693EA14F2FD70F

+ 1
- 0
CHANGELOG.md View File

@@ -23,6 +23,7 @@ Nothing (I tend to only add finished Stuff to the Changelog).
23 23
 [CHANGED] Barrels and Drums did not have the same Melting Points that Pipes have. I fixed that. Metal Drums now have 1.25 times more Heat Resistance, while Wooden Barrels and Plastic Cans got a properly assigned fixed Value, which in most cases should not make them burn up.
24 24
 [CHANGED] Blue Steel is Red Steel now and vice versa. This should fix my ages old fuckup of the Recipes. Everything should still be the same as before when it comes to Stats, just the Color of the Material changed. If you used Matter Fabricators to make Red/Blue Steel for some reason, you may need to check the USB Stick with the Recipe.
25 25
 [CHANGED] Oil and Natural Gas can now pass through Water. In the case of Oil this will result in Buildcraft alike Oil Fountains or puddles in the Ocean, should you be super lucky. If not, just dig a tunnel down and it happens too. XD
26
+[ADDED] Railcrafts Firestones now work as Fuel in Solid Burning Boxes and can also light TNT, Burning Boxes, Coke Ovens and the likes.
26 27
 [ADDED] In a potentially failing attempt of fixing the Nichrome Issue in Stainless Steel, I added a Version of the Recipe that takes Nichrome instead of Invar, which is ofcourse in the proper ratios. I do not know how well that will work for people using the Crucible, but better than nothing. I did the same for Ultimet and Signalum too.
27 28
 [ADDED] Barbecue Sauce (BBQ Sauce), because why not.
28 29
 [ADDED] Axes, Saws and Chainsaws can now place Saplings too. They will still place Workbenches if Saplings cant be placed.

+ 14
- 2
src/main/java/gregapi/GT_API_Proxy.java View File

@@ -870,7 +870,7 @@ public abstract class GT_API_Proxy extends Abstract_Proxy implements IGuiHandler
870 870
 					// Dollies won't work on GT6 TileEntities, so to prevent a Crash and deleted Resources, I just disable the interaction.
871 871
 					if (IL.JABBA_Dolly.equal(aStack, T, T) || IL.JABBA_Dolly_Diamond.equal(aStack, T, T)) {
872 872
 						if (aTileEntity instanceof ITileEntitySpecificPlacementBehavior) {
873
-							UT.Entities.chat(aEvent.entityPlayer, CHAT_GREG + "The Code of this Dolly is not smart enough to move this TileEntity.", CHAT_GREG + "It would crash if it actually did, so be glad I prevented that mistake.");
873
+							UT.Entities.chat(aEvent.entityPlayer, CHAT_GREG + "The Dolly Code is sadly not smart enough to move this TileEntity.", CHAT_GREG + "It would crash if it actually did, so be glad I prevented that mistake.", CHAT_GREG + "Would be great if it did work though...");
874 874
 							aEvent.setCanceled(T);
875 875
 						}
876 876
 						return;
@@ -935,7 +935,19 @@ public abstract class GT_API_Proxy extends Abstract_Proxy implements IGuiHandler
935 935
 						}
936 936
 						return;
937 937
 					}
938
-					// Make Twilight Forests Lamp of Cinders work as infinite Flint and Steel on TNT and GT6 Machines
938
+					// Make Railcrafts Firestone work as Flint and Steel on TNT and GT6 Machines
939
+					if (IL.RC_Firestone_Refined.equal(aStack, T, T) || IL.RC_Firestone_Cracked.equal(aStack, T, T)) {
940
+						List<String> tChatReturn = new ArrayListNoNulls<>();
941
+						long tDamage = IBlockToolable.Util.onToolClick(TOOL_igniter, Long.MAX_VALUE, Long.MAX_VALUE, aEvent.entityPlayer, tChatReturn, aEvent.entityPlayer.inventory, aEvent.entityPlayer.isSneaking(), aStack, aEvent.world, (byte)aEvent.face, aEvent.x, aEvent.y, aEvent.z, 0.5F, 0.5F, 0.5F);
942
+						UT.Entities.sendchat(aEvent.entityPlayer, tChatReturn, F);
943
+						if (tDamage > 0) {
944
+							aStack.damageItem((int)UT.Code.units(tDamage, 10000, 1, T), aEvent.entityPlayer);
945
+							if (aStack.getItemDamage() >= aStack.getMaxDamage()) ST.use(aEvent.entityPlayer, aStack);
946
+							aEvent.setCanceled(T);
947
+						}
948
+						return;
949
+					}
950
+					// Make Twilight Forests Lamp of Cinders work as infinite Flint and Steel on TNT and GT6 Machines. Should be a good reward for getting to it.
939 951
 					if (IL.TF_Lamp_of_Cinders.equal(aStack, T, T)) {
940 952
 						List<String> tChatReturn = new ArrayListNoNulls<>();
941 953
 						long tDamage = IBlockToolable.Util.onToolClick(TOOL_igniter, Long.MAX_VALUE, Long.MAX_VALUE, aEvent.entityPlayer, tChatReturn, aEvent.entityPlayer.inventory, aEvent.entityPlayer.isSneaking(), aStack, aEvent.world, (byte)aEvent.face, aEvent.x, aEvent.y, aEvent.z, 0.5F, 0.5F, 0.5F);

+ 5
- 3
src/main/java/gregapi/GT_API_Proxy_Client.java View File

@@ -305,9 +305,11 @@ public class GT_API_Proxy_Client extends GT_API_Proxy {
305 305
 					if (tToolTip != null) aEvent.toolTip.add(tToolTip);
306 306
 				}
307 307
 			} else {
308
-				if (IL.TF_Pick_Giant     .equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Can be repaired with Knightmetal Ingots on the Anvil"); else
309
-				if (IL.TF_Sword_Giant    .equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Can be repaired with Ironwood Ingots on the Anvil"); else
310
-				if (IL.TF_Lamp_of_Cinders.equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Can be used as a Lighter for GT6 things and TNT");
308
+				if (IL.RC_Firestone_Refined.equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Works in Burning Boxes ("+(800*EU_PER_LAVA)+" HU per Lava Block)"); else
309
+				if (IL.RC_Firestone_Cracked.equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Works in Burning Boxes ("+(600*EU_PER_LAVA)+" HU per Lava Block)"); else
310
+				if (IL.TF_Pick_Giant       .equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Can be repaired with Knightmetal Ingots on the Anvil"); else
311
+				if (IL.TF_Sword_Giant      .equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Can be repaired with Ironwood Ingots on the Anvil"); else
312
+				if (IL.TF_Lamp_of_Cinders  .equal(aEvent.itemStack, T, T)) aEvent.toolTip.add(LH.Chat.CYAN + "Can be used as a Lighter for GT6 things and TNT");
311 313
 			}
312 314
 			if (tData.hasValidMaterialData()) {
313 315
 				boolean tUnburnable = F;

+ 4
- 4
src/main/java/gregapi/data/CS.java View File

@@ -163,7 +163,7 @@ public class CS {
163 163
 
164 164
 	/** The long Names for the Voltages */
165 165
 	public static final String[] VOLTAGE_NAMES = {"Ultra Low Voltage", "Low Voltage", "Medium Voltage", "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage", "Post Ultimate Voltage 1", "Post Ultimate Voltage 2", "Post Ultimate Voltage 3", "Post Ultimate Voltage 4", "Post Ultimate Voltage 5", "Omega Voltage", "Omega Voltage"};
166
-
166
+	
167 167
 	/** The short Names for the USB Sticks */
168 168
 	public static final String[] OD_USB_STICKS = {"gt:usbstick0", "gt:usbstick1", "gt:usbstick2", "gt:usbstick3", "gt:usbstick4", "gt:usbstick5", "gt:usbstick6", "gt:usbstick7", "gt:usbstick8", "gt:usbstick9"};
169 169
 	/** The short Names for the USB Cables */
@@ -172,8 +172,8 @@ public class CS {
172 172
 	public static final String[] OD_USB_DRIVES = {"gt:usbdrive0", "gt:usbdrive1", "gt:usbdrive2", "gt:usbdrive3", "gt:usbdrive4", "gt:usbdrive5", "gt:usbdrive6", "gt:usbdrive7", "gt:usbdrive8", "gt:usbdrive9"};
173 173
 	/** The short Names for the Circuits */
174 174
 	public static final String[] OD_CIRCUITS = {"gt:circuit0", "gt:circuit1", "gt:circuit2", "gt:circuit3", "gt:circuit4", "gt:circuit5", "gt:circuit6", "gt:circuit7", "gt:circuit8", "gt:circuit9"};
175
-
176
-	/** Subtext Numbers. */
175
+	
176
+	/** Subtext Numbers from 0 to 1000. */
177 177
 	public static final String[] NUM_SUB = {
178 178
 	  "\u2080", "\u2081", "\u2082", "\u2083", "\u2084", "\u2085", "\u2086", "\u2087", "\u2088", "\u2089"
179 179
 	, "\u2081\u2080", "\u2081\u2081", "\u2081\u2082", "\u2081\u2083", "\u2081\u2084", "\u2081\u2085", "\u2081\u2086", "\u2081\u2087", "\u2081\u2088", "\u2081\u2089"
@@ -207,7 +207,7 @@ public class CS {
207 207
 	, "\u2082\u2089\u2080", "\u2082\u2089\u2081", "\u2082\u2089\u2082", "\u2082\u2089\u2083", "\u2082\u2089\u2084", "\u2082\u2089\u2085", "\u2082\u2089\u2086", "\u2082\u2089\u2087", "\u2082\u2089\u2088", "\u2082\u2089\u2089"
208 208
 	, "\u2083\u2080\u2080\u208A"
209 209
 	};
210
-
210
+	
211 211
 	/** The value of how many Voltz/Mekanism Joules are worth an EU. */
212 212
 	public static final int  J_PER_EU = 10;
213 213
 	/** The value of how many RF are worth an MJ. */

+ 1
- 1
src/main/java/gregapi/data/IL.java View File

@@ -166,7 +166,7 @@ public enum IL implements IItemContainer {
166 166
 	RC_ShuntingWire, RC_ShuntingWireFrame,
167 167
 	RC_Rail_Reinforced, RC_Rail_Electric, RC_Rail_Standard, RC_Rail_Wooden, RC_Rail_Adv, RC_Rail_HS,
168 168
 	RC_Tie_Wood, RC_Tie_Stone, RC_Bed_Wood, RC_Bed_Stone,
169
-	RC_Rebar, RC_Firestone_Cut,
169
+	RC_Rebar, RC_Firestone_Cut, RC_Firestone_Cracked, RC_Firestone_Refined,
170 170
 	RC_Post_Metal, RC_Creosote_Wood, RC_Crushed_Obsidian, RC_Concrete, RC_Stone_Abyssal, RC_Stone_Quarried,
171 171
 	RC_Crowbar_Iron, RC_Crowbar_Steel, RC_Crowbar_Thaumium, RC_Crowbar_Voidmetal,
172 172
 	RC_Creosote_Bottle, RC_Creosote_Bucket, RC_Creosote_Cell, RC_Creosote_Can, RC_Creosote_Capsule, RC_Creosote_RefractoryCapsule,

+ 4
- 3
src/main/java/gregapi/data/MT.java View File

@@ -2655,8 +2655,11 @@ public class MT {
2655 2655
 			OREMATS.Chromite                .addOreByProducts(MnO2                      , Fe2O3                     , Mg                    , OREMATS.Bromargyrite  );
2656 2656
 			OREMATS.Bromargyrite            .addOreByProducts(MnO2                      , Ag                        , OREMATS.Chromite      , OREMATS.Smithsonite   );
2657 2657
 			
2658
-			Phosphorus                      .addOreByProducts(Phosphorite               , Apatite                   , FluoriteYellow        , PO4                   );
2659 2658
 			Apatite                         .addOreByProducts(Phosphorite               , Phosphorus                , FluoriteBlue          , PO4                   );
2659
+			Phosphorus                      .addOreByProducts(Phosphorite               , Apatite                   , FluoriteYellow        , PO4                   );
2660
+			Phosphorite                     .addOreByProducts(Phosphorus                , Apatite                   , FluoriteYellow        , PO4                   );
2661
+			P                               .addOreByProducts(Phosphorus                , Apatite                   , FluoriteYellow        , PO4                   );
2662
+			PO4                             .addOreByProducts(Phosphorus                , Apatite                   , FluoriteYellow        , Phosphorite           );
2660 2663
 			
2661 2664
 			OREMATS.Zeolite                 .addOreByProducts(OREMATS.Pollucite         , NaCl                      );
2662 2665
 			OREMATS.Pollucite               .addOreByProducts(OREMATS.Zeolite           , Cs                        , Rb                    );
@@ -2818,8 +2821,6 @@ public class MT {
2818 2821
 			Marble                          .addOreByProducts(CaCO3                     );
2819 2822
 			Eclogite                        .addOreByProducts(TiO2                      );
2820 2823
 			Limestone                       .addOreByProducts(Phosphorite               );
2821
-			PO4                             .addOreByProducts(P                         );
2822
-			P                               .addOreByProducts(PO4                       );
2823 2824
 			Tanzanite                       .addOreByProducts(Opal                      );
2824 2825
 			Opal                            .addOreByProducts(Tanzanite                 );
2825 2826
 			Topaz                           .addOreByProducts(BlueTopaz                 );

+ 2
- 0
src/main/java/gregapi/load/LoaderItemList.java View File

@@ -656,6 +656,8 @@ public class LoaderItemList implements Runnable {
656 656
 		IL.RC_Bed_Stone                         .set(ST.make(MD.RC, "part.railbed"                          , 1, 1), new OreDictItemData(MT.Stone, U*6));
657 657
 		IL.RC_Rebar                             .set(ST.make(MD.RC, "part.rebar"                            , 1, 0));
658 658
 		IL.RC_Firestone_Cut                     .set(ST.make(MD.RC, "firestone.cut"                         , 1, 0), new OreDictItemData(MT.Firestone, U));
659
+		IL.RC_Firestone_Refined                 .set(ST.make(MD.RC, "firestone.refined"                     , 1, W), new OreDictItemData(MT.Firestone, U, MT.Redstone, U*36), OD.craftingFirestarter);
660
+		IL.RC_Firestone_Cracked                 .set(ST.make(MD.RC, "firestone.cracked"                     , 1, W), new OreDictItemData(MT.Firestone, U, MT.Redstone, U* 9), OD.craftingFirestarter);
659 661
 		IL.RC_Crowbar_Iron                      .set(ST.make(MD.RC, "tool.crowbar"                          , 1, 0), new OreDictItemData(ANY.Fe      , U*3).setUseVanillaDamage()); ItemsGT.SPECIAL_CASE_TOOLS.add(IL.RC_Crowbar_Iron.wild(1));
660 662
 		IL.RC_Crowbar_Steel                     .set(ST.make(MD.RC, "tool.crowbar.reinforced"               , 1, 0), new OreDictItemData(ANY.Steel   , U*3).setUseVanillaDamage()); ItemsGT.SPECIAL_CASE_TOOLS.add(IL.RC_Crowbar_Steel.wild(1));
661 663
 		IL.RC_Crowbar_Thaumium                  .set(ST.make(MD.RC, "tool.crowbar.magic"                    , 1, 0), new OreDictItemData(MT.Thaumium , U*3).setUseVanillaDamage()); ItemsGT.SPECIAL_CASE_TOOLS.add(IL.RC_Crowbar_Thaumium.wild(1));

+ 20
- 9
src/main/java/gregtech/tileentity/energy/generators/MultiTileEntityGeneratorSolid.java View File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2019 Gregorius Techneticies
2
+ * Copyright (c) 2021 GregTech-6 Team
3 3
  *
4 4
  * This file is part of GregTech.
5 5
  *
@@ -28,6 +28,7 @@ import gregapi.block.multitileentity.IMultiTileEntity.IMTE_GetCollisionBoundingB
28 28
 import gregapi.block.multitileentity.IMultiTileEntity.IMTE_OnEntityCollidedWithBlock;
29 29
 import gregapi.code.TagData;
30 30
 import gregapi.data.FM;
31
+import gregapi.data.IL;
31 32
 import gregapi.data.LH;
32 33
 import gregapi.data.LH.Chat;
33 34
 import gregapi.data.TD;
@@ -115,14 +116,24 @@ public class MultiTileEntityGeneratorSolid extends TileEntityBase09FacingSingle
115 116
 				if (mEnergy < mRate * 2) {
116 117
 					WD.fire(worldObj, getOffset(mFacing, 1), T);
117 118
 					if (addStackToSlot(1, mOutput1)) mOutput1 = null;
118
-					if (mOutput1 == null && !WD.hasCollide(worldObj, getOffsetX(mFacing), getOffsetY(mFacing), getOffsetZ(mFacing)) && !getBlockAtSide(mFacing).getMaterial().isLiquid() && WD.oxygen(worldObj, getOffsetX(mFacing), getOffsetY(mFacing), getOffsetZ(mFacing))) {
119
-						Recipe tRecipe = mRecipes.findRecipe(this, mLastRecipe, T, Long.MAX_VALUE, null, ZL_FS, slot(0));
120
-						if (tRecipe != null && tRecipe.isRecipeInputEqual(T, F, ZL_FS, slot(0))) {
121
-							mLastRecipe = tRecipe;
122
-							ItemStack[] tOutputs = tRecipe.getOutputs();
123
-							if (tOutputs.length > 0) mOutput1 = ST.copy(tOutputs[0]);
124
-							mEnergy += UT.Code.units(Math.abs(tRecipe.mEUt * tRecipe.mDuration), 10000, mEfficiency, F);
119
+					if (mOutput1 == null && slotHas(0) && !WD.hasCollide(worldObj, getOffsetX(mFacing), getOffsetY(mFacing), getOffsetZ(mFacing)) && !getBlockAtSide(mFacing).getMaterial().isLiquid() && WD.oxygen(worldObj, getOffsetX(mFacing), getOffsetY(mFacing), getOffsetZ(mFacing))) {
120
+						if (IL.RC_Firestone_Refined.equal(slot(0), T, T)) {
121
+							mEnergy += 800 * EU_PER_LAVA;
122
+							slot(0, ST.container(slot(0), F));
125 123
 							removeAllDroppableNullStacks();
124
+						} else if (IL.RC_Firestone_Cracked.equal(slot(0), T, T)) {
125
+							mEnergy += 600 * EU_PER_LAVA;
126
+							slot(0, ST.container(slot(0), F));
127
+							removeAllDroppableNullStacks();
128
+						} else {
129
+							Recipe tRecipe = mRecipes.findRecipe(this, mLastRecipe, T, Long.MAX_VALUE, null, ZL_FS, slot(0));
130
+							if (tRecipe != null && tRecipe.isRecipeInputEqual(T, F, ZL_FS, slot(0))) {
131
+								mLastRecipe = tRecipe;
132
+								ItemStack[] tOutputs = tRecipe.getOutputs();
133
+								if (tOutputs.length > 0) mOutput1 = ST.copy(tOutputs[0]);
134
+								mEnergy += UT.Code.units(Math.abs(tRecipe.mEUt * tRecipe.mDuration), 10000, mEfficiency, F);
135
+								removeAllDroppableNullStacks();
136
+							}
126 137
 						}
127 138
 					}
128 139
 				}
@@ -223,7 +234,7 @@ public class MultiTileEntityGeneratorSolid extends TileEntityBase09FacingSingle
223 234
 	// Inventory Stuff
224 235
 	private static final int[] ACCESSABLE_SLOTS = new int[] {0, 1};
225 236
 	@Override public int[] getAccessibleSlotsFromSide2(byte aSide) {return aSide == mFacing ? ZL_INTEGER : ACCESSABLE_SLOTS;}
226
-	@Override public boolean canInsertItem2 (int aSlot, ItemStack aStack, byte aSide) {return aStack != null && aSlot == 0 && aSide != mFacing && mRecipes.containsInput(aStack, this, NI);}
237
+	@Override public boolean canInsertItem2 (int aSlot, ItemStack aStack, byte aSide) {return aStack != null && aSlot == 0 && aSide != mFacing && (mRecipes.containsInput(aStack, this, NI) || IL.RC_Firestone_Refined.equal(aStack, T, T) || IL.RC_Firestone_Cracked.equal(aStack, T, T));}
227 238
 	@Override public boolean canExtractItem2(int aSlot, ItemStack aStack, byte aSide) {return aStack != null && aSlot == 1 && aSide != mFacing;}
228 239
 	@Override public boolean canDrop(int aInventorySlot) {return T;}
229 240
 	@Override public ItemStack[] getDefaultInventory(NBTTagCompound aNBT) {return new ItemStack[2];}

Loading…
Cancel
Save