Skip to content

Commit

Permalink
Miscelaenous data fixes
Browse files Browse the repository at this point in the history
Fix wrong knockback resistance on scorched stone
Fix inconsistencies in blazing blood recipe usage
Move lustrous and stringy to multi module modifiers, both have 0 modules, but eventually I want to ditch non-module modifiers in JSON
Deprecate all the non-module modifier builder methods and the loader to point people to the new methods
  • Loading branch information
KnightMiner committed May 5, 2024
1 parent fd66fe5 commit b498ddc
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"item": "tconstruct:bloodshroom_planks"
},
"cast_consumed": true,
"cooling_time": 134,
"cooling_time": 120,
"fluid": {
"amount": 250,
"amount": 200,
"tag": "tconstruct:blazing_blood"
},
"result": "tconstruct:blazewood"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"item": "tconstruct:bloodshroom_fence"
},
"cast_consumed": true,
"cooling_time": 134,
"cooling_time": 120,
"fluid": {
"amount": 250,
"amount": 200,
"tag": "tconstruct:blazing_blood"
},
"result": "tconstruct:blazewood_fence"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"item": "tconstruct:bloodshroom_planks_slab"
},
"cast_consumed": true,
"cooling_time": 95,
"cooling_time": 85,
"fluid": {
"amount": 125,
"amount": 100,
"tag": "tconstruct:blazing_blood"
},
"result": "tconstruct:blazewood_slab"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"item": "tconstruct:bloodshroom_planks_stairs"
},
"cast_consumed": true,
"cooling_time": 134,
"cooling_time": 120,
"fluid": {
"amount": 250,
"amount": 200,
"tag": "tconstruct:blazing_blood"
},
"result": "tconstruct:blazewood_stairs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
"tconstruct:plating_boots": {
"armor": 1.0,
"durability": 130,
"knockback_resistance": 0.5
"knockback_resistance": 0.05
},
"tconstruct:plating_chestplate": {
"armor": 5.0,
"durability": 160,
"knockback_resistance": 0.5
"knockback_resistance": 0.05
},
"tconstruct:plating_helmet": {
"armor": 2.0,
"durability": 110,
"knockback_resistance": 0.5
"knockback_resistance": 0.05
},
"tconstruct:plating_leggings": {
"armor": 4.0,
"durability": 150,
"knockback_resistance": 0.5
"knockback_resistance": 0.05
},
"tconstruct:plating_shield": {
"durability": 180,
"knockback_resistance": 0.5
"knockback_resistance": 0.05
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"type": "tconstruct:default"
"type": "tconstruct:composable",
"level_display": "tconstruct:default",
"tooltip_display": "always"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"type": "tconstruct:default"
"type": "tconstruct:composable",
"level_display": "tconstruct:default",
"tooltip_display": "always"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public AbstractModifierProvider(DataGenerator generator) {
*/
protected abstract void addModifiers();

/** Adds a modifier to be saved */
/** @deprecated use {@link #buildModifier(ModifierId, ICondition, JsonRedirect...)} */
@Deprecated
protected void addModifier(ModifierId id, @Nullable ICondition condition, @Nullable Modifier result, JsonRedirect... redirects) {
if (result == null && redirects.length == 0) {
throw new IllegalArgumentException("Must have either a modifier or a redirect");
Expand All @@ -46,17 +47,20 @@ protected void addModifier(ModifierId id, @Nullable ICondition condition, @Nulla
}
}

/** Adds a modifier to be saved */
/** @deprecated use {@link #buildModifier(ModifierId, JsonRedirect...)} */
@Deprecated
protected void addModifier(ModifierId id, @Nullable Modifier result, JsonRedirect... redirects) {
addModifier(id, null, result, redirects);
}

/** Adds a modifier to be saved */
/** @deprecated use {@link #buildModifier(DynamicModifier, ICondition, JsonRedirect...)} */
@Deprecated
protected void addModifier(DynamicModifier<?> id, @Nullable ICondition condition, @Nullable Modifier result, JsonRedirect... redirects) {
addModifier(id.getId(), condition, result, redirects);
}

/** Adds a modifier to be saved */
/** @deprecated use {@link #buildModifier(DynamicModifier, JsonRedirect...)} */
@Deprecated
protected void addModifier(DynamicModifier<?> id, @Nullable Modifier result, JsonRedirect... redirects) {
addModifier(id, null, result, redirects);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public class ModifierManager extends SimpleJsonResourceReloadListener {
final Map<ModifierId,Modifier> staticModifiers = new HashMap<>();
/** Map of all modifier types that are expected to load in datapacks */
private final Map<ModifierId,Class<?>> expectedDynamicModifiers = new HashMap<>();
/** Map of all modifier types that are expected to load in datapacks */
/** @deprecated use {@link slimeknights.tconstruct.library.modifiers.modules.ModifierModule#LOADER} */
@Deprecated
public static final GenericLoaderRegistry<Modifier> MODIFIER_LOADERS = new GenericLoaderRegistry<>("Modifier", false);

/** Modifiers loaded from JSON */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1114,19 +1114,19 @@ private void addCastingRecipes(Consumer<FinishedRecipe> consumer) {

// blazewood
ItemCastingRecipeBuilder.basinRecipe(TinkerMaterials.blazewood)
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 4)
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 5)
.setCast(TinkerWorld.bloodshroom, true)
.save(consumer, prefix(TinkerMaterials.blazewood, folder));
ItemCastingRecipeBuilder.basinRecipe(TinkerMaterials.blazewood.getSlab())
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 8)
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 10)
.setCast(TinkerWorld.bloodshroom.getSlab(), true)
.save(consumer, wrap(TinkerMaterials.blazewood, folder, "_slab"));
ItemCastingRecipeBuilder.basinRecipe(TinkerMaterials.blazewood.getStairs())
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 4)
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 5)
.setCast(TinkerWorld.bloodshroom.getStairs(), true)
.save(consumer, wrap(TinkerMaterials.blazewood, folder, "_stairs"));
ItemCastingRecipeBuilder.basinRecipe(TinkerMaterials.blazewood.getFence())
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 4)
.setFluidAndTime(TinkerFluids.blazingBlood, false, FluidType.BUCKET_VOLUME / 5)
.setCast(TinkerWorld.bloodshroom.getFence(), true)
.save(consumer, wrap(TinkerMaterials.blazewood, folder, "_fence"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import slimeknights.tconstruct.library.json.variable.stat.EntityConditionalStatVariable;
import slimeknights.tconstruct.library.json.variable.tool.ToolStatVariable;
import slimeknights.tconstruct.library.json.variable.tool.ToolVariable;
import slimeknights.tconstruct.library.modifiers.Modifier;
import slimeknights.tconstruct.library.modifiers.ModifierEntry;
import slimeknights.tconstruct.library.modifiers.ModifierHooks;
import slimeknights.tconstruct.library.modifiers.ModifierId;
Expand Down Expand Up @@ -393,7 +392,7 @@ protected void addModifiers() {

// traits - tier 1
buildModifier(ModifierIds.cultivated).addModule(RepairModule.builder().eachLevel(0.5f));
addModifier(ModifierIds.stringy, new Modifier());
buildModifier(ModifierIds.stringy);
buildModifier(ModifierIds.unburdened).addModule(StatBoostModule.add(ToolStats.USE_ITEM_SPEED).eachLevel(0.1f));
buildModifier(ModifierIds.depthProtection).addModule(DepthProtectionModule.builder().protection(1.25f).baselineHeight(64).neutralRange(32).build());
// traits - tier 2
Expand Down Expand Up @@ -453,7 +452,7 @@ protected void addModifiers() {
.addModule(ProtectionModule.builder().sources(DamageSourcePredicate.CAN_PROTECT, new SourceAttackerPredicate(LivingEntityPredicate.FIRE_IMMUNE)).eachLevel(1.25f));

// traits - tier 2 compat
addModifier(ModifierIds.lustrous, new Modifier());
buildModifier(ModifierIds.lustrous);
buildModifier(ModifierIds.sharpweight)
.addModule(StatBoostModule.multiplyBase(ToolStats.MINING_SPEED).eachLevel(0.1f))
.addModule(StatBoostModule.multiplyBase(ToolStats.DRAW_SPEED).eachLevel(0.15f))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ private void addArmor() {
addArmorShieldStats(MaterialIds.iron, PlatingMaterialStats.builder().durabilityFactor(15).armor(2, 4, 5, 2), StatlessMaterialStats.MAILLE);
addArmorShieldStats(MaterialIds.gold, PlatingMaterialStats.builder().durabilityFactor(7).armor(1, 3, 4, 1), StatlessMaterialStats.MAILLE);
addArmorShieldStats(MaterialIds.searedStone, PlatingMaterialStats.builder().durabilityFactor(14).armor(1, 3, 4, 2).knockbackResistance(0.1f), StatlessMaterialStats.MAILLE);
addArmorShieldStats(MaterialIds.scorchedStone, PlatingMaterialStats.builder().durabilityFactor(10).armor(1, 4, 5, 2).knockbackResistance(0.5f), StatlessMaterialStats.MAILLE);
addArmorShieldStats(MaterialIds.scorchedStone, PlatingMaterialStats.builder().durabilityFactor(10).armor(1, 4, 5, 2).knockbackResistance(0.05f), StatlessMaterialStats.MAILLE);
// tier 3
addMaterialStats(MaterialIds.nahuatl, StatlessMaterialStats.SHIELD_CORE);
addArmorShieldStats(MaterialIds.slimesteel, PlatingMaterialStats.builder().durabilityFactor(40).armor(2, 5, 6, 2), StatlessMaterialStats.MAILLE);
Expand Down

0 comments on commit b498ddc

Please sign in to comment.