Advertisement
Goy288

Stripped Logs.zs

Dec 4th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.87 KB | None | 0 0
  1.  
  2. import crafttweaker.item.IItemStack;
  3. /*
  4. import mods.contenttweaker.VanillaFactory;
  5. import mods.contenttweaker.Block;
  6. import mods.contenttweaker.BlockMaterial;
  7. import mods.contenttweaker.BlockState;
  8. */
  9. import mods.hitwithaxe.Chopping;
  10.  
  11.  
  12. /*// Vanilla \\*/
  13. //Oak
  14. registerStrippedLogRecipe("minecraft:log", 0, 4, false, "hitwithaxe:debarked_oak");
  15. //Spruce
  16. registerStrippedLogRecipe("minecraft:log", 1, 4, false, "hitwithaxe:debarked_spruce");
  17. //Birch
  18. registerStrippedLogRecipe("minecraft:log", 2, 4, false, "hitwithaxe:debarked_birch");
  19. //Jungle
  20. registerStrippedLogRecipe("minecraft:log", 3, 4, false, "hitwithaxe:debarked_jungle");
  21. //Acacia
  22. registerStrippedLogRecipe("minecraft:log2", 0, 4, false, "hitwithaxe:debarked_acacia");
  23. //Dark Oak
  24. registerStrippedLogRecipe("minecraft:log2", 1, 4, false, "hitwithaxe:debarked_dark_oak");
  25.  
  26. /*// Plants \\*/
  27. //Ashen
  28. registerStrippedLogRecipe("plants2:nether_log", 0, 5, true, "hitwithaxe:debarked_ash");
  29. //Blazing
  30. registerStrippedLogRecipe("plants2:nether_log", 1, 5, true, "hitwithaxe:debarked_blaze");
  31. //Black Kauri
  32. registerStrippedLogRecipe("plants2:log_0", 0, 5, true, "hitwithaxe:debarked_black_kauri");
  33. //Brazillian Pine
  34. registerStrippedLogRecipe("plants2:log_0", 1, 5, true, "hitwithaxe:debarked_brazillian_pine");
  35. //Incense Cedar
  36. registerStrippedLogRecipe("plants2:log_0", 2, 5, true, "hitwithaxe:debarked_incense_cedar");
  37. //Murray Pine
  38. registerStrippedLogRecipe("plants2:log_0", 3, 5, true, "hitwithaxe:debarked_murray_pine");
  39. //Crystal
  40. registerStrippedLogRecipe("plants2:crystal_log", 0, 5, true, "hitwithaxe:debarked_crystal");
  41. //Dark Crystal
  42. registerStrippedLogRecipe("plants2:crystal_log", 1, 5, true, "hitwithaxe:debarked_dark_crystal");
  43.  
  44. /*// The Betweenlands \\*/
  45. //Weedwood
  46. registerStrippedLogRecipeNoneAxis("thebetweenlands:log_weedwood", 0, 4, false, "hitwithaxe:debarked_weedwood");
  47. //Rubber
  48. Chopping.addRecipe("thebetweenlands:log_rubber", 32767, "hitwithaxe:debarked_rubber", 1, null); //None Axis
  49. //Giant Root
  50. Chopping.addRecipe("thebetweenlands:giant_root", 32767, "hitwithaxe:debarked_root", 1, null); //None Axis
  51.  
  52. /*
  53.  
  54. // Natura \\
  55. //Maple
  56. registerStrippedLogRecipe("natura:overworld_logs", 0, 4, false, "hitwithaxe:debarked_maple");
  57. //Silverbell
  58. registerStrippedLogRecipe("natura:overworld_logs", 1, 4, false, "hitwithaxe:debarked_silverbell");
  59. //Amaranth
  60. registerStrippedLogRecipe("natura:overworld_logs", 2, 4, false, "hitwithaxe:debarked_amaranth");
  61. //Tiger
  62. registerStrippedLogRecipe("natura:overworld_logs", 3, 4, false, "hitwithaxe:debarked_tiger");
  63. //Willow
  64. registerStrippedLogRecipe("natura:overworld_logs2", 0, 4, false, "hitwithaxe:debarked_willow");
  65. //Eucalyptus
  66. registerStrippedLogRecipe("natura:overworld_logs2", 1, 4, false, "hitwithaxe:debarked_eucalyptus");
  67. //Hopseed
  68. registerStrippedLogRecipe("natura:overworld_logs2", 2, 4, false, "hitwithaxe:debarked_hopseed");
  69. //Sakura
  70. registerStrippedLogRecipe("natura:overworld_logs2", 3, 4, false, "hitwithaxe:debarked_sakura");
  71.  
  72. */
  73.  
  74. /*// Rustic \\*/
  75. //Olive
  76. registerStrippedLogRecipe("rustic:log", 0, 4, false, "hitwithaxe:debarked_olive");
  77. //Ironwood
  78. registerStrippedLogRecipe("rustic:log", 1, 4, false, "hitwithaxe:debarked_ironwood");
  79.  
  80. /*
  81.  
  82. THE CODE HERE HAS BEEN DETERMINED TO BE OBSOLETE DUE TO THE COMPLETE LACK OF BLOCKSTATE FUNCTIONALITY
  83.  
  84. // Twilight Forest \\
  85. //Twilight Oak
  86. registerStrippedLogBlock("twilightforest:twilight_log", "twilight");
  87. //Canopy Tree
  88. registerStrippedLogBlock("twilightforest:twilight_log:1", "canopy_tree");
  89.  
  90. function registerStrippedLogBlock(woodItem as string, woodType as string){
  91.     var strippedLogName = "stripped_" + woodType + "_log";
  92.     var strippedLog = VanillaFactory.createBlock(strippedLogName, <blockmaterial:wood>);
  93.     strippedLog.setBlockSoundType(<soundtype:wood>);
  94.     strippedLog.setBlockHardness(2.0);
  95.     strippedLog.setBlockResistance(10.0);
  96.     strippedLog.setToolClass("axe");
  97.     strippedLog.register();
  98. }
  99.  
  100. */
  101. function registerStrippedLogRecipe(woodID as string, woodMeta as int, woodMetaIncrement as int,
  102.                                    swapOneAndZero as bool, strippedWoodID as string){
  103.     if(!swapOneAndZero){
  104.         Chopping.addRecipe(woodID, woodMeta, strippedWoodID, 1, null); //Y Axis
  105.         Chopping.addRecipe(woodID, woodMeta + woodMetaIncrement, strippedWoodID, 0, null); //X Axis
  106.     }
  107.     else{
  108.         Chopping.addRecipe(woodID, woodMeta + woodMetaIncrement, strippedWoodID, 1, null); //Y Axis
  109.         Chopping.addRecipe(woodID, woodMeta, strippedWoodID, 0, null); //X Axis
  110.     }
  111.     Chopping.addRecipe(woodID, woodMeta + (woodMetaIncrement * 2), strippedWoodID, 2, null); //Z Axis
  112. }
  113. function registerStrippedLogRecipeNoneAxis(woodID as string, woodMeta as int, woodMetaIncrement as int,
  114.                                          swapOneAndZero as bool, strippedWoodID as string){
  115.     registerStrippedLogRecipe(woodID, woodMeta, woodMetaIncrement, swapOneAndZero, strippedWoodID);
  116.     Chopping.addRecipe(woodID, woodMeta + (woodMetaIncrement * 3), strippedWoodID, 1, null); //None Axis
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement