Skip to content

Commit

Permalink
Doc updates; tested.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreyGhost committed Aug 15, 2020
1 parent a50d09e commit 90e60c8
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 79 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ How to use:<br>
2) Hold the Item you want to modify in the player's hand<br>
3) Use the up/down keys to move up and down the menu.<br>
4) Use the left/right keys to edit the value (eg scaleX)<br>
5) To select a different view (first person, third person, gui, head (for helmet)) change the VIEW menu item<br>
6) To reset the parameters for the current view, select the RESET menu item and press left or right.<br>
- You can also copy parameters from a vanilla item to your custom item:<br>
- a) Hold the vanilla item in your hand<br>
- b) Select RESET, press left or right.<br>
- c) Hold your custom item in your hand.<br>
7) When your item looks right, select PRINT and press left or right to print the current parameters to the console<br>
8) Copy the appropriate lines from the console to your item model json file<br>
5) To select a different view (eg first person, third person) use left/right to change the VIEW menu item.
6) To modify the transform for an item on the ground:
* throw your Item onto the ground, and then put another copy of your Item into the player's hand
* Use left/right to change the VIEW menu item to grnd<br>
Use the same technique for items in the gui, on your head (eg pumpkin), fixed (in picture frames), or in the
player's left hand.
7) To reset the parameters for the current view, select the RESET menu item and press left or right. Use RESET ALL (RSTALL) to reset the parameters for all views. <br>
You can also copy parameters from a vanilla item to your custom item:
* Hold the vanilla item in your hand
* Select RESET or RSTALL, press left or right.
* Hold your custom item in your hand.
8) When your item looks right, select PRINT and press left or right to print the current parameters to the console
9) Copy the appropriate lines from the console to your item model json file

The item will appear in the Helpers tab in the creative inventory.

Expand All @@ -25,7 +30,11 @@ For background information on<br>
- This link describes the structure of the JSON Item Model file (see the Item Models section halfway down):<br>
- http://minecraft.gamepedia.com/Block_models

Thanks to Romejanic for updating to 1.12.2!
As an alternative to the Item Transform Helper, you can also use BlockBench (https://blockbench.net/) to determine the correct transforms for your model, i.e. either<br>
1) Create a new model in BlockBench; or<br>
2) Import an existing model (either the json model file, or the item "generated" texture)<br>

Thanks to Romejanic for updating to 1.12.2, and to lehrj for updating to 1.16.1!

## Licence Info:
This is free and unencumbered software released into the public domain.
Expand Down
21 changes: 15 additions & 6 deletions ReadMeFirst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ How to use:
2) Hold the Item you want to modify in the player's hand
3) Use the up/down keys to move up and down the menu.
4) Use the left/right keys to edit the value (eg scaleX)
5) To select a different view (first person, third person, gui, head (for helmet)) change the VIEW menu item
6) To reset the parameters for the current view, select the RESET menu item and press left or right.
5) To select a different view (eg first person, third person) use left/right to change the VIEW menu item.
6) To modify the transform for an item on the ground:
a) throw your Item onto the ground, and then put another copy of your Item into the player's hand
b) Use left/right to change the VIEW menu item to grnd
Use the same technique for items in the gui, on your head (eg pumpkin), fixed (in picture frames), or in the
player's left hand.
7) To reset the parameters for the current view, select the RESET menu item and press left or right. Use RESET ALL (RSTALL) to reset the parameters for all views.
You can also copy parameters from a vanilla item to your custom item:
a) Hold the vanilla item in your hand
b) Select RESET, press left or right.
b) Select RESET or RSTALL, press left or right.
c) Hold your custom item in your hand.
7) When your item looks right, select PRINT and press left or right to print the current parameters to the console
8) Copy the appropriate lines from the console to your item model json file
8) When your item looks right, select PRINT and press left or right to print the current parameters to the console
9) Copy the appropriate lines from the console to your item model json file

The item will appear in the Helpers tab in the creative inventory.

Expand All @@ -25,7 +30,11 @@ For background information on
- This link describes the structure of the JSON Item Model file (see the Item Models section halfway down):
http://minecraft.gamepedia.com/Block_models

Thanks to Romejanic for updating to 1.12.2!
As an alternative to the Item Transform Helper, you can also use BlockBench (https://blockbench.net/) to determine the correct transforms for your model, i.e. either
1) Create a new model in BlockBench; or
2) Import an existing model (either the json model file, or the item "generated" texture)

Thanks to Romejanic for updating to 1.12.2, and to lehrj for updating to 1.16.1!

--------------
Licence Info
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/itemtransformhelper/HUDtextRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public HUDtextRenderer(HUDinfoUpdateLink i_HUDinfoUpdateLink) {
public void displayHUDtext(RenderGameOverlayEvent.Text event) {
if (huDinfoUpdateLink == null || !huDinfoUpdateLink.menuVisible || huDinfoUpdateLink.itemCameraTransforms == null)
return;
ArrayList<String> displayText = new ArrayList<String>();
ArrayList<HUDinfoUpdateLink.SelectedField> selectableField = new ArrayList<HUDinfoUpdateLink.SelectedField>();
ArrayList<String> displayText = new ArrayList<>();
ArrayList<HUDinfoUpdateLink.SelectedField> selectableField = new ArrayList<>();

final HUDinfoUpdateLink.SelectedField NOT_SELECTABLE = null;

Expand Down Expand Up @@ -233,7 +233,7 @@ public enum SelectedField {
TRANSFORM(0), SCALE_X(1), SCALE_Y(2), SCALE_Z(3), ROTATE_X(4), ROTATE_Y(5), ROTATE_Z(6), TRANSLATE_X(7),
TRANSLATE_Y(8), TRANSLATE_Z(9), RESTORE_DEFAULT(10), RESTORE_DEFAULT_ALL(11), PRINT(12);

private SelectedField(int index) {
SelectedField(int index) {
fieldIndex = index;
}

Expand Down Expand Up @@ -265,8 +265,7 @@ public SelectedField getPreviousField() {

private HUDinfoUpdateLink huDinfoUpdateLink;

// copied straight from vanilla GuiIngameForge
// copied straight from vanilla GuiIngameForge
// copied straight from vanilla ForgeIngameGui
private static void drawRect(MatrixStack matrixStackIn, int left, int top, int right, int bottom, int color) {
if (left < right) {
int i = left;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/itemtransformhelper/ModelBakeEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public void modelBakeEvent(ModelBakeEvent event) {
ItemModelFlexibleCamera wrappedModel = new ItemModelFlexibleCamera(iBakedModel, itemOverrideLink);
event.getModelRegistry().put(modelKey, wrappedModel);
}
ItemTransformHelper.logger.info("Warning - The Item Transform Helper replaces your IBakedModels with a wrapped version, this");
ItemTransformHelper.logger.info(" is done even when the helper is not in your hotbar, and might cause problems if your");
ItemTransformHelper.logger.info(" IBakedModel implements an interface ItemTransformHelper doesn't know about.");
ItemTransformHelper.logger.info(" I recommend you disable the mod when you're not actively using it to transform your items.");
ItemTransformHelper.logger.warn("Warning - The Item Transform Helper replaces your IBakedModels with a wrapped version, this");
ItemTransformHelper.logger.warn(" is done even when the helper is not in your hotbar, and might cause problems if your");
ItemTransformHelper.logger.warn(" IBakedModel implements an interface ItemTransformHelper doesn't know about.");
ItemTransformHelper.logger.warn(" I recommend you disable the mod when you're not actively using it to transform your items.");
}

public ItemModelFlexibleCamera.UpdateLink getItemOverrideLink() {
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/itemtransformhelper/Notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ How to use:
2) Hold the Item you want to modify in the player's hand
3) Use the up/down keys to move up and down the menu.
4) Use the left/right keys to edit the value (eg scaleX)
5) To select a different view (first person, third person, gui, head (for helmet)) change the VIEW menu item
6) To reset the parameters for the current view, select the RESET menu item and press left or right.
5) To select a different view (eg first person, third person) use left/right to change the VIEW menu item.
6) To modify the transform for an item on the ground:
a) throw your Item onto the ground, and then put another copy of your Item into the player's hand
b) Use left/right to change the VIEW menu item to grnd
Use the same technique for items in the gui, on your head (eg pumpkin), fixed (in picture frames), or in the
player's left hand.
7) To reset the parameters for the current view, select the RESET menu item and press left or right. Use RESET ALL (RSTALL) to reset the parameters for all views.
You can also copy parameters from a vanilla item to your custom item:
a) Hold the vanilla item in your hand
b) Select RESET, press left or right.
b) Select RESET or RSTALL, press left or right.
c) Hold your custom item in your hand.
7) When your item looks right, select PRINT and press left or right to print the current parameters to the console
8) Copy the appropriate lines from the console to your item model json file
8) When your item looks right, select PRINT and press left or right to print the current parameters to the console
9) Copy the appropriate lines from the console to your item model json file

The item will appear in the Helpers tab in the creative inventory.

Expand Down
48 changes: 0 additions & 48 deletions src/main/java/itemtransformhelper/TransformationBugFix.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ modId="itemtransformhelper"
version="${file.jarVersion}"
displayName="Item Transform Helper"
credits="The Forge, MCP, and FML guys. Maruohon"
authors="TGG, Romejanic"
authors="TGG, Romejanic, lehjr"
description="Interactively change the position, scale, and rotation of an item"
[[dependencies.itemtransformhelper]]
modId="forge"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "examplemod resources",
"description": "itemtransformhelper resources",
"pack_format": 5,
"_comment": "A pack_format of 5 requires json lang files and some texture changes from 1.15. Note: we require v5 pack meta for all mods."
}
Expand Down

0 comments on commit 90e60c8

Please sign in to comment.