Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ability to specify result item on food eaten #23

Closed
KlemenDEV opened this issue Sep 6, 2020 · 6 comments
Closed

The ability to specify result item on food eaten #23

KlemenDEV opened this issue Sep 6, 2020 · 6 comments
Assignees
Labels
good first issue Good for new contributors to start working on new feature New feature or request

Comments

@KlemenDEV
Copy link
Contributor

Migrated from: https://mcreator.net/tracker/issue/65352

I would like to request the ability to have an item replace an item that has been eaten. So you eat fruit, you get seeds.. you drink from a cup, get the empty cup.

and not how it is done with the procedures because it doesn't always give you the item..

@ModManta
Copy link

ModManta commented Oct 1, 2020

Do you think this will be added?

@KlemenDEV
Copy link
Contributor Author

I doubt I will have time for this, but we can hope one of the contributors would add it.

@KlemenDEV
Copy link
Contributor Author

For any contributor, change is needed here:

        <#if hasProcedure(data.onEaten)>
		@Override public ItemStack onItemUseFinish(ItemStack itemStack, World world, LivingEntity entity) {
			ItemStack retval = super.onItemUseFinish(itemStack, world, entity);
			double x = entity.posX;
			double y = entity.posY;
			double z = entity.posZ;
			<@procedureOBJToCode data.onEaten/>
			return retval;
		}
        </#if>

super.onItemUseFinish(itemStack, world, entity) needs to be replaced with the custom result when this option would be enabled.

@ModManta
Copy link

ModManta commented Oct 1, 2020

I doubt I will have time for this, but we can hope one of the contributors would add it.

Ahh ok.

@ModManta
Copy link

ModManta commented Oct 1, 2020

For any contributor, change is needed here:

        <#if hasProcedure(data.onEaten)>
		@Override public ItemStack onItemUseFinish(ItemStack itemStack, World world, LivingEntity entity) {
			ItemStack retval = super.onItemUseFinish(itemStack, world, entity);
			double x = entity.posX;
			double y = entity.posY;
			double z = entity.posZ;
			<@procedureOBJToCode data.onEaten/>
			return retval;
		}
        </#if>

super.onItemUseFinish(itemStack, world, entity) needs to be replaced with the custom result when this option would be enabled.

Oh yeah. Epic. I might try and manually replace this actually. Thanks for the info! This question has been annoying me ever since the original feature request.

@ModManta
Copy link

ModManta commented Oct 2, 2020

For any contributor, change is needed here:

        <#if hasProcedure(data.onEaten)>
		@Override public ItemStack onItemUseFinish(ItemStack itemStack, World world, LivingEntity entity) {
			ItemStack retval = super.onItemUseFinish(itemStack, world, entity);
			double x = entity.posX;
			double y = entity.posY;
			double z = entity.posZ;
			<@procedureOBJToCode data.onEaten/>
			return retval;
		}
        </#if>

super.onItemUseFinish(itemStack, world, entity) needs to be replaced with the custom result when this option would be enabled.

What would I have to do to manually code it?

@KlemenDEV KlemenDEV added the good first issue Good for new contributors to start working on label Oct 6, 2020
@KlemenDEV KlemenDEV self-assigned this Oct 8, 2020
AlsoSomeoneElse referenced this issue in AlsoSomeoneElse/MCreator Dec 2, 2020
* update (#23)

* Separeted entity and other textures

Entity textures need to be re-imported and re-selectionned

* Added a converter

* Add entity option to the image editor

* Separeted painting and other textures + fix entity code

* Add possibility import textures in custom folders

Don't work yet with textures created with MCreator and textures in custom folders are not listed.

* Move textures to TextureElement and all textures are noew displayed on the Resources screen

A converter is needed to create Texture Elements for old textures, otherwise we can't use them.

* Returned to the old system for textures + added a sub folder for the Others section

* Added a fixer to move old Others textures

* Added a folder field to the image maker

* Added a folder name field to the armor and animated texture makers

* Fixed generated code

* Fixed Delete button

* Added the folder dialog for Others

* Added custom directories for sounds

* Added a resourcepack generator for Minecraft 1.16.x

(even if it's for Minecraft 1.16.2 and +)

* Update plugin.json

* Update texts.properties

* Revert "Update texts.properties"

This reverts commit 80a0191.

* Externalized new strings

* Added tests for new texture sections

* FIx TestWorkspaceDataProvider

* Fixed resource pack generator

* Added button block base

* Added pressure plate block base

* Cake block base

Some textures need to be fixed

* Added support for "Itemstack" procedure selectors

* Added dispense behavior checkbox + procedures to items (GUI needs adjustments)

* Dispense behavior localization

* Added itemstack dependency to dispense procedures

* "Itemstack procedure to code" macro + "return" procedure selectors can now have any amount of dependencies

* Same, but for 1.14

* Added code template for dispense behavior

* Minor fix

* Added templates to damage/consume/replace item after dispense success

* Added info files for the new options

* Added an option to activate redstone emission for block, with a spinner to change its power

* Centered the dispense procedures

* Update README.md

* Fix missing breaking particles texture for cakes

* Change generator status

* Update texts.properties

* Fix particle gui

* Changed some stuff in bug report template

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Create feature_request.md

* Update feature_request.md

* Moved checkbox 'Does redstone connect to block' into redstone properties box

* Fix misisng translation key

* Added shiftOnly and commandOnly fields and checkboxes, with automatically translated descriptions

* Bugfix test

* Removed mistakes

* Fix WoodButton

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* Modified Fluid icon

* Modified option

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* Updated test workspace provider to include dispense options

* Fixed bugs (loading and saving)

* Added TestWorkspace info

* Update README.md

* Update README.md

* Possible fix to test fail

* Added fields and everything

* Bugfix with block and item key generation

* More test changes

* Fixed some Generator issues

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* Fixed forgotten characters

* Hopefully fixed test fail for good

* Fixed bugs and modified tooltip order

* Added fields for Food and modified Item fields

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* Fixed wrong text

* Added fields to MusicDisc element

* Changed option order and fixed a bug

* Added fields for Tool

* Added fields for Ranged Item

* Added proper tests

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* Added fields for Plant

* Added fields for Armor

* Added proper tests

* Changed splash screen and social links

* Update LICENSE.txt

* Grammar nitpicks

* Changed potion prefixes and deleted unused image

* Modified the Generator and splash screen images

* Removed donate option, changed window titles, version and some images

* Added lever, slime and honey block bases

* Fixed some problems

* Cleaned some code and modified description plant panel to collapsible one

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Italian)

* Update README.md

* Modified MCToolkit logo and picture in README.md

Credit : Shadowdragon for the workspace in the picture

* Enlarge the image

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* New translations texts.properties (Italian)

* New translations texts.properties (Russian)

* Added Donate badge to README.md

* New translations texts.properties (French)

* New translations texts.properties (Italian)

* New translations texts.properties (Turkish)

* Modified donate button in README.md

* New Crowdin updates (#70)

* New translations texts.properties (German)

* New translations texts.properties (Turkish)

* Added donate options (main menu bar and workspace selector)

* New Crowdin updates (#74)

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* New translations texts.properties (Italian)

* New translations texts.properties (Turkish)

* New translations texts.properties (Czech) (MCreator#78)

* Fixed "Call procedure and get return value" blocks not working anymore (#75)

* Changed "Particle expiry condition" default text

* Removed unnecessary itemstack markers from "Set armor slot item" block

* Fixed "Call procedure and get return value" blocks not working

* Revert some changes

* Wait block tests

* Delete .name

* Fixed SDK name

* Modified CONTRIBUTING.md

* Modified README.md

* Add files via upload

The wait block, it works

* Add files via upload

Wait block code

* Update mcreatorapp.icns (MCreator#94)

* Update texts.properties

Localized wait block

* Update wait.json

Localized wait block

* New Crowdin updates (MCreator#95)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Italian)

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* New translations texts.properties (Italian)

* New translations texts.properties (Turkish)

Co-authored-by: AlsoSomeoneElse <2000someoneelse@gmail.com>
Co-authored-by: Max094Reikeb <maxencebekier@gmail.com>
Co-authored-by: Max094Reikeb <49318596+Max094Reikeb@users.noreply.github.com>
Co-authored-by: mctoolkit <71358938+mctoolkit@users.noreply.github.com>
Co-authored-by: Blackout03 <45116222+Blackout03@users.noreply.github.com>
Co-authored-by: cripsy_chips1234 <60465425+CrispyChips6660@users.noreply.github.com>
Co-authored-by: AlsoSomeoneElse <64546452+AlsoSomeoneElse@users.noreply.github.com>
Co-authored-by: Tye Phoenix <thebaseballbroski@gmail.com>
Co-authored-by: TBroski <68565879+TBroski@users.noreply.github.com>
Co-authored-by: NOYB <61475257+NOYBss@users.noreply.github.com>
Co-authored-by: willpill <65963376+ShockingArtist@users.noreply.github.com>

* Re added everything

* Fixed loading and localizations

* try to fix the branch (#24)

* Separeted entity and other textures

Entity textures need to be re-imported and re-selectionned

* Added a converter

* Add entity option to the image editor

* Separeted painting and other textures + fix entity code

* Add possibility import textures in custom folders

Don't work yet with textures created with MCreator and textures in custom folders are not listed.

* Move textures to TextureElement and all textures are noew displayed on the Resources screen

A converter is needed to create Texture Elements for old textures, otherwise we can't use them.

* Returned to the old system for textures + added a sub folder for the Others section

* Added a fixer to move old Others textures

* Added a folder field to the image maker

* Added a folder name field to the armor and animated texture makers

* Fixed generated code

* Fixed Delete button

* Added the folder dialog for Others

* Added custom directories for sounds

* Added a resourcepack generator for Minecraft 1.16.x

(even if it's for Minecraft 1.16.2 and +)

* Update plugin.json

* Update texts.properties

* Revert "Update texts.properties"

This reverts commit 80a0191.

* Externalized new strings

* Added tests for new texture sections

* FIx TestWorkspaceDataProvider

* Fixed resource pack generator

* Added button block base

* Added pressure plate block base

* Cake block base

Some textures need to be fixed

* Added support for "Itemstack" procedure selectors

* Added dispense behavior checkbox + procedures to items (GUI needs adjustments)

* Dispense behavior localization

* Added itemstack dependency to dispense procedures

* "Itemstack procedure to code" macro + "return" procedure selectors can now have any amount of dependencies

* Same, but for 1.14

* Added code template for dispense behavior

* Minor fix

* Added templates to damage/consume/replace item after dispense success

* Added info files for the new options

* Added an option to activate redstone emission for block, with a spinner to change its power

* Centered the dispense procedures

* Update README.md

* Fix missing breaking particles texture for cakes

* Change generator status

* Update texts.properties

* Fix particle gui

* Changed some stuff in bug report template

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Create feature_request.md

* Update feature_request.md

* Moved checkbox 'Does redstone connect to block' into redstone properties box

* Fix misisng translation key

* Added shiftOnly and commandOnly fields and checkboxes, with automatically translated descriptions

* Bugfix test

* Removed mistakes

* Fix WoodButton

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* Modified Fluid icon

* Modified option

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* Updated test workspace provider to include dispense options

* Fixed bugs (loading and saving)

* Added TestWorkspace info

* Update README.md

* Update README.md

* Possible fix to test fail

* Added fields and everything

* Bugfix with block and item key generation

* More test changes

* Fixed some Generator issues

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* Fixed forgotten characters

* Hopefully fixed test fail for good

* Fixed bugs and modified tooltip order

* Added fields for Food and modified Item fields

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* Fixed wrong text

* Added fields to MusicDisc element

* Changed option order and fixed a bug

* Added fields for Tool

* Added fields for Ranged Item

* Added proper tests

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* Added fields for Plant

* Added fields for Armor

* Added proper tests

* Changed splash screen and social links

* Update LICENSE.txt

* Grammar nitpicks

* Changed potion prefixes and deleted unused image

* Modified the Generator and splash screen images

* Removed donate option, changed window titles, version and some images

* Added lever, slime and honey block bases

* Fixed some problems

* Cleaned some code and modified description plant panel to collapsible one

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Italian)

* Update README.md

* Modified MCToolkit logo and picture in README.md

Credit : Shadowdragon for the workspace in the picture

* Enlarge the image

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* New translations texts.properties (Italian)

* New translations texts.properties (Russian)

* Added Donate badge to README.md

* New translations texts.properties (French)

* New translations texts.properties (Italian)

* New translations texts.properties (Turkish)

* Modified donate button in README.md

* New Crowdin updates (#70)

* New translations texts.properties (German)

* New translations texts.properties (Turkish)

* Added donate options (main menu bar and workspace selector)

* New Crowdin updates (#74)

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* New translations texts.properties (Italian)

* New translations texts.properties (Turkish)

* New translations texts.properties (Czech) (MCreator#78)

* Fixed "Call procedure and get return value" blocks not working anymore (#75)

* Changed "Particle expiry condition" default text

* Removed unnecessary itemstack markers from "Set armor slot item" block

* Fixed "Call procedure and get return value" blocks not working

* Revert some changes

* Wait block tests

* Delete .name

* Fixed SDK name

* Modified CONTRIBUTING.md

* Modified README.md

* Add files via upload

The wait block, it works

* Add files via upload

Wait block code

* Update mcreatorapp.icns (MCreator#94)

* Update texts.properties

Localized wait block

* Update wait.json

Localized wait block

* New Crowdin updates (MCreator#95)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Italian)

* New translations texts.properties (French)

* New translations texts.properties (German)

* New translations texts.properties (Russian)

* New translations texts.properties (Chinese Simplified)

* New translations texts.properties (Chinese Traditional)

* New translations texts.properties (Vietnamese)

* New translations texts.properties (Portuguese, Brazilian)

* New translations texts.properties (Czech)

* New translations texts.properties (Hebrew)

* New translations texts.properties (Italian)

* New translations texts.properties (Turkish)

Co-authored-by: AlsoSomeoneElse <2000someoneelse@gmail.com>
Co-authored-by: Max094Reikeb <maxencebekier@gmail.com>
Co-authored-by: Max094Reikeb <49318596+Max094Reikeb@users.noreply.github.com>
Co-authored-by: mctoolkit <71358938+mctoolkit@users.noreply.github.com>
Co-authored-by: Blackout03 <45116222+Blackout03@users.noreply.github.com>
Co-authored-by: cripsy_chips1234 <60465425+CrispyChips6660@users.noreply.github.com>
Co-authored-by: AlsoSomeoneElse <64546452+AlsoSomeoneElse@users.noreply.github.com>
Co-authored-by: Tye Phoenix <thebaseballbroski@gmail.com>
Co-authored-by: TBroski <68565879+TBroski@users.noreply.github.com>
Co-authored-by: NOYB <61475257+NOYBss@users.noreply.github.com>
Co-authored-by: willpill <65963376+ShockingArtist@users.noreply.github.com>

* Tried to fix the branch

* Should fix everything

* Fixed project JDK

Co-authored-by: AlsoSomeoneElse <2000someoneelse@gmail.com>
Co-authored-by: Max094Reikeb <maxencebekier@gmail.com>
Co-authored-by: Max094Reikeb <49318596+Max094Reikeb@users.noreply.github.com>
Co-authored-by: mctoolkit <71358938+mctoolkit@users.noreply.github.com>
Co-authored-by: Blackout03 <45116222+Blackout03@users.noreply.github.com>
Co-authored-by: cripsy_chips1234 <60465425+CrispyChips6660@users.noreply.github.com>
Co-authored-by: AlsoSomeoneElse <64546452+AlsoSomeoneElse@users.noreply.github.com>
Co-authored-by: Tye Phoenix <thebaseballbroski@gmail.com>
Co-authored-by: TBroski <68565879+TBroski@users.noreply.github.com>
Co-authored-by: NOYB <61475257+NOYBss@users.noreply.github.com>
Co-authored-by: willpill <65963376+ShockingArtist@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for new contributors to start working on new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants