Psi

Psi

45M Downloads

[1.12] Client Crashes when using Place Block trick with Focus Slot trick and only 1 block remains in focused slot

imrgr opened this issue ยท 3 comments

commented

Here is the exact spell i am using
{spellName:"Place Block",uuidMost:-5397796425993925180L,validSpell:1b,spellList:[{data:{key:"constantNumber",constantValue:"2"},x:3,y:1},{data:{params:{_target:4},key:"operatorEntityPosition"},x:3,y:2},{data:{params:{_ray:2,_max:0,_position:1},key:"operatorVectorRaycast"},x:3,y:3},{data:{params:{_target:2},key:"operatorEntityLook"},x:3,y:4},{data:{params:{_target:4},key:"connector"},x:3,y:5},{data:{params:{_shift:3,_position:0},key:"trickSwitchTargetSlot"},x:4,y:1},{data:{key:"selectorCaster"},x:4,y:2},{data:{params:{_vector3:0,_vector2:4,_vector1:3},key:"operatorVectorSum"},x:4,y:3},{data:{params:{_position:1},key:"trickPlaceBlock"},x:4,y:4},{data:{key:"selectorCaster"},x:4,y:5},{data:{params:{_target:3},key:"operatorEntityPosition"},x:5,y:2},{data:{params:{_ray:2,_max:0,_position:1},key:"operatorVectorRaycastAxis"},x:5,y:3},{data:{params:{_target:2},key:"operatorEntityLook"},x:5,y:4},{data:{params:{_target:3},key:"connector"},x:5,y:5}],uuidLeast:-7920731541725477038L}

Crash Report
crash-2017-07-05_19.57.37-client.txt

commented

Im getting the same issue, didnt know what made it tho so thanks! This is the spell im using

https://imgur.com/a/mUkHB
crash log: https://pastebin.com/cUVcSWkV

commented

I'm also getting the same issue in 1.11.2 with an identical stack trace to those above.

Simply use the below spell in survival mode with only a single block to the right of the CAD.

{spellName:"Place Block",uuidMost:1023715086584333860L,validSpell:1b,spellList:[0:{data:{params:{_target:4},key:"operatorEntityPosition"},x:0,y:0},1:{data:{params:{_ray:4,_max:0,_position:1},key:"operatorVectorRaycastAxis"},x:0,y:1},2:{data:{params:{_target:1},key:"connector"},x:0,y:2},3:{data:{key:"selectorCaster"},x:1,y:0},4:{data:{params:{_target:1},key:"operatorEntityLook"},x:1,y:1},5:{data:{params:{_vector3:0,_vector2:4,_vector1:3},key:"operatorVectorSum"},x:1,y:2},6:{data:{params:{_position:1},key:"trickPlaceBlock"},x:1,y:3},7:{data:{params:{_target:3},key:"operatorEntityPosition"},x:2,y:0},8:{data:{params:{_ray:3,_max:0,_position:1},key:"operatorVectorRaycast"},x:2,y:1},9:{data:{params:{_target:1},key:"connector"},x:2,y:2}],uuidLeast:-5483902554474669092L}

Also, this is a duplicate of #316

commented

This error also occurs when using the place block sequence trick, since that calls the place block trick. It causes a crash any time the trick places the last block of a stack, regardless of if it is the last of that block in the inventory.

The problem is the PieceTrickPlaceBlock.removeFromInventory function, line 119 of PieceTrickPlaceBlock.java. This line executes if and only if a stack is emptied by the trick, and calls the InventoryPlayer.setInventorySlotContents. The second argument it passes is ItemStack.EMPTY, which is defined in net.minecraft.item.ItemStack:
public static final ItemStack EMPTY = new ItemStack((Item)null);

InventoryPlayer.setInventorySlotContents calls NonNullList.set, which immediately validates that the stack being passed in is not null. Since ItemStack.Empty is null, this causes a crash.

In the crash reports, "net.minecraft.entity.player.InventoryPlayer.func_70299_a" is InventoryPlayer.setInventorySlotContents.