mojira.dev
MC-65013

Default RangedAttribute causes crash (vanilla does not use this line)

This bug only shows up when modding and vanilla is asked to handle an S20Packet containing an attribute name that doesn't yet exist on the client entity.

The client response is to create a default attribute but the parameters that vanilla uses are wrong because the default value is less than the minimum value, which gives a crash.

the line in question is shortly after the text
throw new IllegalStateException("Server tried to update attributes of a non-living entity (actually: " + entity + ")");

The line in question is
new RangedAttribute(snapshot.func_151409_a(), 0.0D,
Double.MIN_NORMAL, Double.MAX_VALUE));

but I think it should be

new RangedAttribute(snapshot.func_151409_a(), 0.0D,
-Double.MAX_VALUE, Double.MAX_VALUE));

Comments 5

if it only shows up while modding, and doesnt effect the vanilla version, i assume this cannot be dealt with

The bug is in the vanilla code, but it is in a part that is not normally used. It is supposed to be there to prevent a crash if another part of vanilla makes a mistake, i.e. "If this object doesn't exist, create a default one and use that instead of crashing".

So currently this bug won't cause a crash but it might in the future if this line becomes necessary.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.

Ticket resolved as incomplete, because no answer in a reasonable amount of time (1+ year), if it still happens, please update the ticket.

This is still an issue in 1.14, see MC-150405.

Jamie Peterson

(Unassigned)

Unconfirmed

Minecraft 1.7.10

Retrieved