-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tool belt now only requires an ability slot for the first level, but has multiple later levels that each add +1 slot Shield strap is now an upgrade instead of an ability Removed pocket chain Pockets now grants 18 slots per level TODO: better support for retriving items left when the tool belt slot count changes
- Loading branch information
1 parent
4b13e1f
commit 30a2c27
Showing
35 changed files
with
385 additions
and
180 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/generated/resources/data/tconstruct/recipes/tools/modifiers/ability/tool_belt_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"type": "tconstruct:modifier", | ||
"inputs": [ | ||
{ | ||
"item": "minecraft:leather" | ||
}, | ||
{ | ||
"tag": "forge:ingots/iron" | ||
}, | ||
{ | ||
"item": "minecraft:leather" | ||
} | ||
], | ||
"tools": { | ||
"tag": "tconstruct:modifiable/armor/leggings" | ||
}, | ||
"slots": { | ||
"abilities": 1 | ||
}, | ||
"result": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 1 | ||
}, | ||
"max_level": 1 | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/tconstruct/recipes/tools/modifiers/ability/tool_belt_2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "tconstruct:modifier", | ||
"inputs": [ | ||
{ | ||
"item": "minecraft:leather" | ||
}, | ||
{ | ||
"tag": "forge:ingots/gold" | ||
}, | ||
{ | ||
"item": "minecraft:leather" | ||
} | ||
], | ||
"tools": { | ||
"tag": "tconstruct:modifiable/armor/leggings" | ||
}, | ||
"requirements": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 1, | ||
"error": "recipe.tconstruct.modifier.tool_belt" | ||
}, | ||
"result": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 1 | ||
}, | ||
"max_level": 2 | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/tconstruct/recipes/tools/modifiers/ability/tool_belt_3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "tconstruct:modifier", | ||
"inputs": [ | ||
{ | ||
"item": "minecraft:leather" | ||
}, | ||
{ | ||
"tag": "forge:ingots/rose_gold" | ||
}, | ||
{ | ||
"item": "minecraft:leather" | ||
} | ||
], | ||
"tools": { | ||
"tag": "tconstruct:modifiable/armor/leggings" | ||
}, | ||
"requirements": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 2, | ||
"error": "recipe.tconstruct.modifier.tool_belt" | ||
}, | ||
"result": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 1 | ||
}, | ||
"max_level": 3 | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/tconstruct/recipes/tools/modifiers/ability/tool_belt_4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "tconstruct:modifier", | ||
"inputs": [ | ||
{ | ||
"item": "minecraft:leather" | ||
}, | ||
{ | ||
"tag": "forge:ingots/cobalt" | ||
}, | ||
{ | ||
"item": "minecraft:leather" | ||
} | ||
], | ||
"tools": { | ||
"tag": "tconstruct:modifiable/armor/leggings" | ||
}, | ||
"requirements": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 3, | ||
"error": "recipe.tconstruct.modifier.tool_belt" | ||
}, | ||
"result": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 1 | ||
}, | ||
"max_level": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/tconstruct/recipes/tools/modifiers/ability/tool_belt_6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "tconstruct:modifier", | ||
"inputs": [ | ||
{ | ||
"item": "minecraft:leather" | ||
}, | ||
{ | ||
"tag": "forge:ingots/manyullyn" | ||
}, | ||
{ | ||
"item": "minecraft:leather" | ||
} | ||
], | ||
"tools": { | ||
"tag": "tconstruct:modifiable/armor/leggings" | ||
}, | ||
"requirements": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 5, | ||
"error": "recipe.tconstruct.modifier.tool_belt" | ||
}, | ||
"result": { | ||
"name": "tconstruct:tool_belt", | ||
"level": 1 | ||
}, | ||
"max_level": 6 | ||
} |
11 changes: 0 additions & 11 deletions
11
...rated/resources/data/tconstruct/recipes/tools/modifiers/salvage/upgrade/pocket_chain.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
src/generated/resources/data/tconstruct/recipes/tools/modifiers/upgrade/pocket_chain.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/generated/resources/data/tconstruct/tinkering/modifiers/pocket_chain.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"redirects": [ | ||
{ | ||
"id": "tconstruct:shield_strap" | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
src/generated/resources/data/tconstruct/tinkering/modifiers/pockets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"type": "tconstruct:inventory_with_menu", | ||
"size": 18 | ||
} |
11 changes: 11 additions & 0 deletions
11
src/generated/resources/data/tconstruct/tinkering/modifiers/tool_belt.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"type": "tconstruct:tool_belt", | ||
"level_slots": [ | ||
4, | ||
5, | ||
6, | ||
7, | ||
8, | ||
9 | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/slimeknights/tconstruct/library/json/serializer/GenericIntSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package slimeknights.tconstruct.library.json.serializer; | ||
|
||
import com.google.gson.JsonObject; | ||
import lombok.RequiredArgsConstructor; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
import net.minecraft.util.GsonHelper; | ||
import slimeknights.mantle.data.GenericLoaderRegistry.IGenericLoader; | ||
import slimeknights.mantle.data.GenericLoaderRegistry.IHaveLoader; | ||
|
||
import java.util.function.IntFunction; | ||
import java.util.function.ToIntFunction; | ||
|
||
/** Generic serializer for classes that just have a single int value */ | ||
@RequiredArgsConstructor | ||
public class GenericIntSerializer<T extends IHaveLoader<?>> implements IGenericLoader<T> { | ||
private final String key; | ||
private final IntFunction<T> constructor; | ||
private final ToIntFunction<T> getter; | ||
|
||
@Override | ||
public void serialize(T object, JsonObject json) { | ||
json.addProperty(key, getter.applyAsInt(object)); | ||
} | ||
|
||
@Override | ||
public T deserialize(JsonObject json) { | ||
return constructor.apply(GsonHelper.getAsInt(json, key)); | ||
} | ||
|
||
@Override | ||
public void toNetwork(T object, FriendlyByteBuf buffer) { | ||
buffer.writeVarInt(getter.applyAsInt(object)); | ||
} | ||
|
||
@Override | ||
public T fromNetwork(FriendlyByteBuf buffer) { | ||
return constructor.apply(buffer.readVarInt()); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/slimeknights/tconstruct/library/json/serializer/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@ParametersAreNonnullByDefault | ||
@MethodsReturnNonnullByDefault | ||
package slimeknights.tconstruct.library.json.serializer; | ||
|
||
import net.minecraft.MethodsReturnNonnullByDefault; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.