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

Add tropical fish support #1521

Merged
merged 4 commits into from
Nov 4, 2018
Merged

Add tropical fish support #1521

merged 4 commits into from
Nov 4, 2018

Conversation

Snow-Pyon
Copy link

Target Minecraft versions: 1.13+
Requirements: N/A
Related issues: #1385
Description:
Adds support for tropical fish, which should add support for every entity once #1486 is merged.

This wasn't tested yet (I bet it doesn't even compile, I'll fix that later), I've made it just to receive input about how it is handled as soon as possible.

@Snow-Pyon Snow-Pyon added enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. labels Sep 7, 2018
@ShaneBeee
Copy link
Contributor

Hey snow.. Just wanted to suggest the plural of blockfish and clayfish should be ¦es instead of ¦s

@Snow-Pyon
Copy link
Author

@ShaneBeee good catch. To be honest, I automatized it with a python script since I didn't want to manually write the pattern for every type so that's why it's that way.

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Sep 8, 2018

Hey snow... so I did some testing
using:

command /test:
	trigger:
		spawn tropical fish at player

This was the outcome:
https://hastebin.com/ezexiqezip.md

@Nicofisi
Copy link
Member

Nicofisi commented Nov 3, 2018

@ShaneBeee ... the outcome was an empty page on a paste service that deletes the pastes after some time - could you please repost it on https://gist.github.com and use it next time 👀 <3

@Blueyescat
Copy link
Contributor

Blueyescat commented Nov 3, 2018

I applied the changes to 2.3-beta1 because i had issues with 2.3-alpha1, and the code @ShaneBeee send just works as expected. It spawns random tropical fishes with random colors.


Using the other fishes than tropical fish without specifying their two colors throws NPE: https://gist.github.com/Blueyescat/38a15043bb2c3ec1960077f651e12254

using "%color% <fish>" (not "fully %color%"): https://gist.github.com/Blueyescat/244e8cfc877cb5fca330b5ecc54af297

spawn brinely at player
spawn fully red brinely at player
spawn red brinely at player

However using %color%-%color% works fine.


I can't specify colors of tropical fishes like red tropical fish and red-white tropical fish, it just says can't understand effect. But its syntax is correct: [(%-color%[-%-color%]|2¦fully %-color%)] tropical fish(|1¦es)

@Snow-Pyon Snow-Pyon force-pushed the tropical-fish-support branch 2 times, most recently from 9118673 to 2d345b2 Compare November 4, 2018 09:50
It turned out to be that setting the protected matchedPattern variable
within the EntityData class is necessary for Skript to define the
correct entity type.
@Snow-Pyon Snow-Pyon removed the needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. label Nov 4, 2018
@Snow-Pyon Snow-Pyon merged commit b7c701c into master Nov 4, 2018
@Snow-Pyon Snow-Pyon deleted the tropical-fish-support branch November 4, 2018 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants