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

I find some bugs #91

Open
17183248569 opened this issue Sep 28, 2021 · 1 comment
Open

I find some bugs #91

17183248569 opened this issue Sep 28, 2021 · 1 comment

Comments

@17183248569
Copy link

gnembon/fabric-carpet#1118 (comment)

@altrisi thanks you. but after my reading and testing that script, i find some issues.

Scarpet-edit/se.sc

Lines 1943 to 1945 in 64543f2

min_pos=map(pos1,min(_,pos2:_i));
avg_pos=(pos1+pos2)/2;
entities=if(args:'include_entities',entity_area('*',avg_pos,map(avg_pos-min_pos,abs(_))),[]);

seems that the area is not correct. maybe pos2=pos2+1 could fix that ?

Scarpet-edit/se.sc

Lines 1957 to 1961 in 64543f2

palette_map:key_map(_)+=1;
state_map={
'pos'->(pos(_)-min_pos),
'state'->(keys(palette_map)~key_map(_))

seems that the one who writes the code incorrectly assumes that the map will remain its order.

if((nbt=parse_nbt(block_data(_)))!='null',

I am concerned that the unnecessary use of parse_nbt here will disrupt some of the nbt types.

@Ghoulboy78
Copy link
Owner

Ye... that part of the code is overdue for a rewrite anyways... We just havent had the time. I have fixed some of the issues on a private branch that I haven't touched for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants