src/main/java/com/Mrbysco/cactusmod/entities/AbstractSpikeEntity.java
public void readAdditionalSaveData(CompoundNBT compound) {
        super.readAdditionalSaveData(compound);
        this.ticksInGround = compound.getShort("life");
        if (compound.contains("inBlockState", 10)) {
            this.inBlockState = NBTUtil.readBlockState(compound.getCompound("inBlockState"));
        }

        this.spikeShake = compound.getByte("shake") & 255;
        this.inGround = compound.getBoolean("inGround");
        if (compound.contains("damage", 99)) {
            this.damage = compound.getDouble("damage");
        }

        this.setIsCritical(compound.getBoolean("crit"));
        this.setPierceLevel(compound.getByte("PierceLevel"));
        if (compound.contains("SoundEvent", 8)) {
            this.hitSound = Registry.SOUND_EVENT.getOptional(new ResourceLocation(compound.getString("SoundEvent"))).orElse(this.getHitEntitySound());
        }

        this.setShotFromCrossbow(compound.getBoolean("ShotFromCrossbow"));
    }
/**
     * (abstract) Protected helper method to read subclass entity data from NBT.
     */
(abstract) Protected helper method to read subclass entity data from NBT.
( abstract ) Protected helper method to read subclass entity data from NBT .
public void readAdditionalSaveData(CompoundNBT compound) {
        super.readAdditionalSaveData(compound);
        this.ticksInGround = compound.getShort("life");
        if (compound.contains("inBlockState", 10)) {
            this.inBlockState = NBTUtil.readBlockState(compound.getCompound("inBlockState"));
        }
        this.spikeShake = compound.getByte("shake") & 255;
        this.inGround = compound.getBoolean("inGround");
        if (compound.contains("damage", 99)) {
            this.damage = compound.getDouble("damage");
        }
        this.setIsCritical(compound.getBoolean("crit"));
        this.setPierceLevel(compound.getByte("PierceLevel"));
        if (compound.contains("SoundEvent", 8)) {
            this.hitSound = Registry.SOUND_EVENT.getOptional(new ResourceLocation(compound.getString("SoundEvent"))).orElse(this.getHitEntitySound());
        }
        this.setShotFromCrossbow(compound.getBoolean("ShotFromCrossbow"));
    }
public void readAdditionalSaveData ( CompoundNBT compound ) { super . readAdditionalSaveData ( compound ) ; this . ticksInGround = compound . getShort ( "life" ) ; if ( compound . contains ( "inBlockState" , 10 ) ) { this . inBlockState = NBTUtil . readBlockState ( compound . getCompound ( "inBlockState" ) ) ; } this . spikeShake = compound . getByte ( "shake" ) & 255 ; this . inGround = compound . getBoolean ( "inGround" ) ; if ( compound . contains ( "damage" , 99 ) ) { this . damage = compound . getDouble ( "damage" ) ; } this . setIsCritical ( compound . getBoolean ( "crit" ) ) ; this . setPierceLevel ( compound . getByte ( "PierceLevel" ) ) ; if ( compound . contains ( "SoundEvent" , 8 ) ) { this . hitSound = Registry . SOUND_EVENT . getOptional ( new ResourceLocation ( compound . getString ( "SoundEvent" ) ) ) . orElse ( this . getHitEntitySound ( ) ) ; } this . setShotFromCrossbow ( compound . getBoolean ( "ShotFromCrossbow" ) ) ; }
(abstract) Protected helper method to read subclass entity data from NBT.
( abstract ) Protected helper method to read subclass entity data from NBT .