#What is the current state of housing in grasscutter?

113 messages · Page 1 of 1 (latest)

crimson nacelle
#

I was wondering what the current state of housing is, how much works?

shadow mesa
#

Aside from sumeru house, most should be working

#

Questing fork had farming implemented, and I PR'd resource gain a while back - not sure if they were combined/how much of the fork's implementation was moved over

#

aside from the gadgets/activities stuff, not sure where that's at

crimson nacelle
#

Ok, I tried to enter the mansion but it didn't seem to work

shadow mesa
#

Bug introduced by questing being merged

crimson nacelle
#

Oh

#

anyway to fix it?

shadow mesa
#

Of course

#

You'll have to find the issue and then fix it in src, can pull request it so it can be merged

crimson nacelle
#

That sounds like fun

shadow mesa
#

You should have an error in your cmd from when you tried to enter that can start you on the right path

crimson nacelle
#
    at emu.grasscutter.server.packet.recv.HandlerHomeSceneJumpReq.handle(HandlerHomeSceneJumpReq.java:30)
    at emu.grasscutter.server.game.GameServerPacketHandler.handle(GameServerPacketHandler.java:91)
    at emu.grasscutter.server.game.GameSession.handleReceive(GameSession.java:214)
    at emu.grasscutter.server.game.GameSessionManager$1.lambda$handleReceive$0(GameSessionManager.java:72)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
    at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Unknown Source)
shadow mesa
#

Yeaht that'd be it

#

at emu.grasscutter.server.packet.recv.HandlerHomeSceneJumpReq.handle(HandlerHomeSceneJumpReq.java:30) -> "scene" is null there's where you get started

crimson nacelle
#

Ok

#

I have no idea what i'm looking at unfortunately

shadow mesa
#

You do want a basic understanding of java to get going

#

Since all of GC is written in java

crimson nacelle
#

the most java i know was making a minecraft mod when i was 12...

#

what does .java:30 reference

#

the 30 part

shadow mesa
#

line 30

crimson nacelle
#

ok

#

Position pos = scene.getScriptManager().getConfig().born_pos;

#

thought so

#

yeah this is a bit beyond me

shadow mesa
#

Well so you know scene is null there right

#

so where is scene coming from? Line 25

crimson nacelle
#

oh yeah

shadow mesa
#

What about that is returning null? Well sessions were changed some amount in 1.6.x iirc, so that would be a great place to investigate

crimson nacelle
#

Scene = session.getPlayer().getWorld().getSceneById(req.getIsEnterRoomScene() ? homeScene.getRoomSceneID() : realmID);

#

so

#

hm

#

So my guess is

#

.getPlayer gets the user right?

#

getWorld gets which world you're probably logged into

#

getSceneById probably gets the ID of the scene

shadow mesa
#

Correct

crimson nacelle
#

So

#

scene should be equal to the scene id of the room that you're trying to enter, right?

shadow mesa
#

That is correct

crimson nacelle
#

Ok

#

but its getting set to null for some reason

#

but why

#

i need a drink

shadow mesa
#

That's exactly what you're setting out to investigate yaegiggle

crimson nacelle
#

actually i wonder if i have intellij still installed

shadow mesa
#

more specifically the issue is on .getSceneById(req.getIsEnterRoomScene() ? homeScene.getRoomSceneId() : realmId);

crimson nacelle
#

What does the colon mean?

shadow mesa
#

if req.getIsEnterRoomScene() = true, then homeScene.getRoomSceneId(), else realmId

crimson nacelle
#

Ok

#

When does getIsEnterRoomScene get set to true

shadow mesa
#

it's being evaluated as part of the function

#

.getscenebyid

crimson nacelle
#

Ah ok

#

I guess i can test if req.getIsEnterRoomScene() is set to true

#

actulaly wait

#

homeScene.getRoomSceneId() is what is probably setting it to null

shadow mesa
#

Indeed

crimson nacelle
#

but why is getRoomSceneId() null

#

where is that defined

shadow mesa
#

from homescene, but it's not that it is null necessarily

crimson nacelle
#

oh

#

but then why is scene null

shadow mesa
#

well you're assuming getroomsceneid is null - but what about homeScene itself? Have you confirmed it is correct?

crimson nacelle
#

good point

shadow mesa
#

Also if you check getRoomSceneId(), it will not return null - if there is a null it will return 0

crimson nacelle
#

Yeah

#

where is homeScene

shadow mesa
#

it's from higher up in the .java you're in

#

var homeScene = home.getHomeSceneItem(realmId);

crimson nacelle
#

i'm so blind

#

homeScene is home.getHoemSceneItemId(realmId)

#

realmId is the current realmId + 2000

#

We want session to be the id of the room we're trying to enter, right?

shadow mesa
#

That's your game session

crimson nacelle
#

Oh

shadow mesa
#

You want scene to be the id of the room you're trying to enter

#

well, the scene that matches the id

crimson nacelle
#

Oh

shadow mesa
#

But you're being returned a 0, and thus null scene

crimson nacelle
#

Yeah thats what i was trying to say,

#

i was just looking at the wrong thing

shadow mesa
#

Maybe it's a bit mean to have sent you about it this way, there's actually a much more likely (the actual reason, I'm pretty sure) thing behind it that doesn't have to do with the actual java handling of home or scene

crimson nacelle
#

oh

#

what was it

shadow mesa
crimson nacelle
#

there's already a pr 😭

#

oh

#

wait thats you isn't it

shadow mesa
#

I just made it after confirming the issue yaegiggle

crimson nacelle
#

ah

#

i'll wait for it to finish building and download that

shadow mesa
#

It actually wasn't the scenejumpreq that made it obvious, but rather HomeSceneItem returning 0 despite mainhouse being non-null

crimson nacelle
#

oh

shadow mesa
#

Once I saw that it was pretty clear the issue was from resources rather than java handling

crimson nacelle
#

:p

#

well another day that i don't have to learn java

shadow mesa
#

ahaha

#

well good info you have either way, that's how I do much of my debugging, as primitive as it may be

crimson nacelle
#

yeah

#

well i wait for this, i'll go check out HSR finally

#

nvm it just ifnished lmfao

#

Nevermind

#
    at emu.grasscutter.server.packet.recv.HandlerHomeSceneJumpReq.handle(HandlerHomeSceneJumpReq.java:30)
    at emu.grasscutter.server.game.GameServerPacketHandler.handle(GameServerPacketHandler.java:91)
    at emu.grasscutter.server.game.GameSession.handleReceive(GameSession.java:214)
    at emu.grasscutter.server.game.GameSessionManager$1.lambda$handleReceive$0(GameSessionManager.java:72)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
    at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Unknown Source)

#

Ahhh

#

i'm not fixing this rn

#

wait wtf

#

it didn't work the first 2 times i hit f

#

but the time i jump into the door and press f it works?

shadow mesa
#

If you were already in the teapot when you started the server, it may have been due to that